Google Cloud Resource Settings V1 Client - Class Setting (1.1.3)

Reference documentation and code samples for the Google Cloud Resource Settings V1 Client class Setting.

The schema for settings.

Generated from protobuf message google.cloud.resourcesettings.v1.Setting

Namespace

Google \ Cloud \ ResourceSettings \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

The resource name of the setting. Must be in one of the following forms: * projects/{project_number}/settings/{setting_name} * folders/{folder_id}/settings/{setting_name} * organizations/{organization_id}/settings/{setting_name} For example, "/projects/123/settings/gcp-enableMyFeature"

↳ metadata Google\Cloud\ResourceSettings\V1\SettingMetadata

Output only. Metadata about a setting which is not editable by the end user.

↳ local_value Google\Cloud\ResourceSettings\V1\Value

The configured value of the setting at the given parent resource (ignoring the resource hierarchy). The data type of Value must always be consistent with the data type defined in Setting.metadata.

↳ effective_value Google\Cloud\ResourceSettings\V1\Value

Output only. The computed effective value of the setting at the given parent resource (based on the resource hierarchy). The effective value evaluates to one of the following options in the given order (the next option is used if the previous one does not exist): 1. the local setting value on the given resource: Setting.local_value 2. if one of the given resource's ancestors have a local setting value, the local value at the nearest such ancestor 3. the setting's default value: SettingMetadata.default_value 4. an empty value (defined as a Value with all fields unset) The data type of Value must always be consistent with the data type defined in Setting.metadata.

↳ etag string

A fingerprint used for optimistic concurrency. See UpdateSetting for more details.

getName

The resource name of the setting. Must be in one of the following forms:

  • projects/{project_number}/settings/{setting_name}
  • folders/{folder_id}/settings/{setting_name}
  • organizations/{organization_id}/settings/{setting_name} For example, "/projects/123/settings/gcp-enableMyFeature"
Returns
TypeDescription
string

setName

The resource name of the setting. Must be in one of the following forms:

  • projects/{project_number}/settings/{setting_name}
  • folders/{folder_id}/settings/{setting_name}
  • organizations/{organization_id}/settings/{setting_name} For example, "/projects/123/settings/gcp-enableMyFeature"
Parameter
NameDescription
var string
Returns
TypeDescription
$this

getMetadata

Output only. Metadata about a setting which is not editable by the end user.

Returns
TypeDescription
Google\Cloud\ResourceSettings\V1\SettingMetadata|null

hasMetadata

clearMetadata

setMetadata

Output only. Metadata about a setting which is not editable by the end user.

Parameter
NameDescription
var Google\Cloud\ResourceSettings\V1\SettingMetadata
Returns
TypeDescription
$this

getLocalValue

The configured value of the setting at the given parent resource (ignoring the resource hierarchy). The data type of Value must always be consistent with the data type defined in Setting.metadata.

Returns
TypeDescription
Google\Cloud\ResourceSettings\V1\Value|null

hasLocalValue

clearLocalValue

setLocalValue

The configured value of the setting at the given parent resource (ignoring the resource hierarchy). The data type of Value must always be consistent with the data type defined in Setting.metadata.

Parameter
NameDescription
var Google\Cloud\ResourceSettings\V1\Value
Returns
TypeDescription
$this

getEffectiveValue

Output only. The computed effective value of the setting at the given parent resource (based on the resource hierarchy).

The effective value evaluates to one of the following options in the given order (the next option is used if the previous one does not exist):

  1. the local setting value on the given resource: Setting.local_value
  2. if one of the given resource's ancestors have a local setting value, the local value at the nearest such ancestor
  3. the setting's default value: SettingMetadata.default_value
  4. an empty value (defined as a Value with all fields unset) The data type of Value must always be consistent with the data type defined in Setting.metadata.
Returns
TypeDescription
Google\Cloud\ResourceSettings\V1\Value|null

hasEffectiveValue

clearEffectiveValue

setEffectiveValue

Output only. The computed effective value of the setting at the given parent resource (based on the resource hierarchy).

The effective value evaluates to one of the following options in the given order (the next option is used if the previous one does not exist):

  1. the local setting value on the given resource: Setting.local_value
  2. if one of the given resource's ancestors have a local setting value, the local value at the nearest such ancestor
  3. the setting's default value: SettingMetadata.default_value
  4. an empty value (defined as a Value with all fields unset) The data type of Value must always be consistent with the data type defined in Setting.metadata.
Parameter
NameDescription
var Google\Cloud\ResourceSettings\V1\Value
Returns
TypeDescription
$this

getEtag

A fingerprint used for optimistic concurrency. See UpdateSetting for more details.

Returns
TypeDescription
string

setEtag

A fingerprint used for optimistic concurrency. See UpdateSetting for more details.

Parameter
NameDescription
var string
Returns
TypeDescription
$this