Struct googapis::google::cloud::orgpolicy::v2::Constraint[][src]

pub struct Constraint {
    pub name: String,
    pub display_name: String,
    pub description: String,
    pub constraint_default: i32,
    pub constraint_type: Option<ConstraintType>,
}
Expand description

A constraint describes a way to restrict resource’s configuration. For example, you could enforce a constraint that controls which cloud services can be activated across an organization, or whether a Compute Engine instance can have serial port connections established. Constraints can be configured by the organization’s policy adminstrator to fit the needs of the organzation by setting a policy that includes constraints at different locations in the organization’s resource hierarchy. Policies are inherited down the resource hierarchy from higher levels, but can also be overridden. For details about the inheritance rules please read about [policies][google.cloud.OrgPolicy.v2.Policy].

Constraints have a default behavior determined by the constraint_default field, which is the enforcement behavior that is used in the absence of a policy being defined or inherited for the resource in question.

Fields

name: String

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

For example, “/projects/123/constraints/compute.disableSerialPortAccess”.

display_name: String

The human readable name.

Mutable.

description: String

Detailed description of what this Constraint controls as well as how and where it is enforced.

Mutable.

constraint_default: i32

The evaluation behavior of this constraint in the absence of ‘Policy’.

constraint_type: Option<ConstraintType>

The type of restrictions for this Constraint.

Immutable after creation.

Implementations

Returns the enum value of constraint_default, or the default if the field is set to an invalid enum value.

Sets constraint_default to the provided enum value.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Returns the encoded length of the message without a length delimiter.

Clears the message, resetting all fields to their default.

Encodes the message to a buffer. Read more

Encodes the message to a newly allocated buffer.

Encodes the message with a length-delimiter to a buffer. Read more

Encodes the message with a length-delimiter to a newly allocated buffer.

Decodes an instance of the message from a buffer. Read more

Decodes a length-delimited instance of the message from the buffer.

Decodes an instance of the message from a buffer, and merges it into self. Read more

Decodes a length-delimited instance of the message from buffer, and merges it into self. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Wrap the input message T in a tonic::Request

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more