1.9.1 (latest) 1.9.0 1.8.0 1.7.0 1.6.1 1.5.0 1.4.1 1.3.1 1.2.0 1.1.0 1.0.2 0.32.0 0.31.0 0.30.0 0.29.3 0.28.1 0.27.0 0.26.1 0.25.0 0.24.0 0.23.0 0.22.0 0.21.1 0.20.1 0.19.0 0.18.0 0.17.3 Reference documentation and code samples for the Cloud Asset V1 API class Google::Cloud::OrgPolicy::V1::Policy.

Defines a Cloud Organization `Policy` which is used to specify `Constraints`
for configurations of Cloud Platform resources.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #boolean_policy

    def boolean_policy() -> ::Google::Cloud::OrgPolicy::V1::Policy::BooleanPolicy

**Returns**

- ([::Google::Cloud::OrgPolicy::V1::Policy::BooleanPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-OrgPolicy-V1-Policy-BooleanPolicy)) --- For boolean `Constraints`, whether to enforce the `Constraint` or not.


  Note: The following fields are mutually exclusive: `boolean_policy`, `list_policy`, `restore_default`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #boolean_policy=

    def boolean_policy=(value) -> ::Google::Cloud::OrgPolicy::V1::Policy::BooleanPolicy

**Parameter**

- **value** ([::Google::Cloud::OrgPolicy::V1::Policy::BooleanPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-OrgPolicy-V1-Policy-BooleanPolicy)) --- For boolean `Constraints`, whether to enforce the `Constraint` or not.


  Note: The following fields are mutually exclusive: `boolean_policy`, `list_policy`, `restore_default`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::OrgPolicy::V1::Policy::BooleanPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-OrgPolicy-V1-Policy-BooleanPolicy)) --- For boolean `Constraints`, whether to enforce the `Constraint` or not.


  Note: The following fields are mutually exclusive: `boolean_policy`, `list_policy`, `restore_default`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #constraint

    def constraint() -> ::String

**Returns**

- (::String) --- The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`.


  Immutable after creation.

### #constraint=

    def constraint=(value) -> ::String

**Parameter**

- **value** (::String) --- The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`.


  Immutable after creation.
**Returns**

- (::String) --- The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`.


  Immutable after creation.

### #etag

    def etag() -> ::String

**Returns**

- (::String) --- An opaque tag indicating the current version of the `Policy`, used for concurrency control.


  When the `Policy` is returned from either a `GetPolicy` or a
  `ListOrgPolicy` request, this `etag` indicates the version of the current
  `Policy` to use when executing a read-modify-write loop.

  When the `Policy` is returned from a `GetEffectivePolicy` request, the
  `etag` will be unset.

  When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
  that was returned from a `GetOrgPolicy` request as part of a
  read-modify-write loop for concurrency control. Not setting the `etag`in a
  `SetOrgPolicy` request will result in an unconditional write of the
  `Policy`.

### #etag=

    def etag=(value) -> ::String

**Parameter**

- **value** (::String) --- An opaque tag indicating the current version of the `Policy`, used for concurrency control.


  When the `Policy` is returned from either a `GetPolicy` or a
  `ListOrgPolicy` request, this `etag` indicates the version of the current
  `Policy` to use when executing a read-modify-write loop.

  When the `Policy` is returned from a `GetEffectivePolicy` request, the
  `etag` will be unset.

  When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
  that was returned from a `GetOrgPolicy` request as part of a
  read-modify-write loop for concurrency control. Not setting the `etag`in a
  `SetOrgPolicy` request will result in an unconditional write of the
  `Policy`.
**Returns**

- (::String) --- An opaque tag indicating the current version of the `Policy`, used for concurrency control.


  When the `Policy` is returned from either a `GetPolicy` or a
  `ListOrgPolicy` request, this `etag` indicates the version of the current
  `Policy` to use when executing a read-modify-write loop.

  When the `Policy` is returned from a `GetEffectivePolicy` request, the
  `etag` will be unset.

  When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
  that was returned from a `GetOrgPolicy` request as part of a
  read-modify-write loop for concurrency control. Not setting the `etag`in a
  `SetOrgPolicy` request will result in an unconditional write of the
  `Policy`.

### #list_policy

    def list_policy() -> ::Google::Cloud::OrgPolicy::V1::Policy::ListPolicy

**Returns**

- ([::Google::Cloud::OrgPolicy::V1::Policy::ListPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-OrgPolicy-V1-Policy-ListPolicy)) --- List of values either allowed or disallowed.


  Note: The following fields are mutually exclusive: `list_policy`, `boolean_policy`, `restore_default`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #list_policy=

    def list_policy=(value) -> ::Google::Cloud::OrgPolicy::V1::Policy::ListPolicy

**Parameter**

- **value** ([::Google::Cloud::OrgPolicy::V1::Policy::ListPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-OrgPolicy-V1-Policy-ListPolicy)) --- List of values either allowed or disallowed.


  Note: The following fields are mutually exclusive: `list_policy`, `boolean_policy`, `restore_default`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::OrgPolicy::V1::Policy::ListPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-OrgPolicy-V1-Policy-ListPolicy)) --- List of values either allowed or disallowed.


  Note: The following fields are mutually exclusive: `list_policy`, `boolean_policy`, `restore_default`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #restore_default

    def restore_default() -> ::Google::Cloud::OrgPolicy::V1::Policy::RestoreDefault

**Returns**

- ([::Google::Cloud::OrgPolicy::V1::Policy::RestoreDefault](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-OrgPolicy-V1-Policy-RestoreDefault)) --- Restores the default behavior of the constraint; independent of `Constraint` type.


  Note: The following fields are mutually exclusive: `restore_default`, `list_policy`, `boolean_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #restore_default=

    def restore_default=(value) -> ::Google::Cloud::OrgPolicy::V1::Policy::RestoreDefault

**Parameter**

- **value** ([::Google::Cloud::OrgPolicy::V1::Policy::RestoreDefault](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-OrgPolicy-V1-Policy-RestoreDefault)) --- Restores the default behavior of the constraint; independent of `Constraint` type.


  Note: The following fields are mutually exclusive: `restore_default`, `list_policy`, `boolean_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::OrgPolicy::V1::Policy::RestoreDefault](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-OrgPolicy-V1-Policy-RestoreDefault)) --- Restores the default behavior of the constraint; independent of `Constraint` type.


  Note: The following fields are mutually exclusive: `restore_default`, `list_policy`, `boolean_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Protobuf-Timestamp)) --- The time stamp the `Policy` was previously updated. This is set by the server, not specified by the caller, and represents the last time a call to `SetOrgPolicy` was made for that `Policy`. Any value set by the client will be ignored.

### #update_time=

    def update_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Protobuf-Timestamp)) --- The time stamp the `Policy` was previously updated. This is set by the server, not specified by the caller, and represents the last time a call to `SetOrgPolicy` was made for that `Policy`. Any value set by the client will be ignored.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Protobuf-Timestamp)) --- The time stamp the `Policy` was previously updated. This is set by the server, not specified by the caller, and represents the last time a call to `SetOrgPolicy` was made for that `Policy`. Any value set by the client will be ignored.

### #version

    def version() -> ::Integer

**Returns**

- (::Integer) --- Version of the `Policy`. Default version is 0;

### #version=

    def version=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Version of the `Policy`. Default version is 0;
**Returns**

- (::Integer) --- Version of the `Policy`. Default version is 0;