Class PolicyController.Builder (1.42.0)

public static final class PolicyController.Builder extends GeneratedMessageV3.Builder<PolicyController.Builder> implements PolicyControllerOrBuilder

Configuration for Policy Controller

Protobuf type google.cloud.gkehub.configmanagement.v1beta.PolicyController

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllExemptableNamespaces(Iterable<String> values)

public PolicyController.Builder addAllExemptableNamespaces(Iterable<String> values)

The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster.

repeated string exemptable_namespaces = 4;

Parameter
Name Description
values Iterable<String>

The exemptableNamespaces to add.

Returns
Type Description
PolicyController.Builder

This builder for chaining.

addExemptableNamespaces(String value)

public PolicyController.Builder addExemptableNamespaces(String value)

The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster.

repeated string exemptable_namespaces = 4;

Parameter
Name Description
value String

The exemptableNamespaces to add.

Returns
Type Description
PolicyController.Builder

This builder for chaining.

addExemptableNamespacesBytes(ByteString value)

public PolicyController.Builder addExemptableNamespacesBytes(ByteString value)

The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster.

repeated string exemptable_namespaces = 4;

Parameter
Name Description
value ByteString

The bytes of the exemptableNamespaces to add.

Returns
Type Description
PolicyController.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PolicyController.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
PolicyController.Builder
Overrides

build()

public PolicyController build()
Returns
Type Description
PolicyController

buildPartial()

public PolicyController buildPartial()
Returns
Type Description
PolicyController

clear()

public PolicyController.Builder clear()
Returns
Type Description
PolicyController.Builder
Overrides

clearAuditIntervalSeconds()

public PolicyController.Builder clearAuditIntervalSeconds()

Sets the interval for Policy Controller Audit Scans (in seconds). When set to 0, this disables audit functionality altogether.

optional int64 audit_interval_seconds = 3;

Returns
Type Description
PolicyController.Builder

This builder for chaining.

clearEnabled()

public PolicyController.Builder clearEnabled()

Enables the installation of Policy Controller. If false, the rest of PolicyController fields take no effect.

bool enabled = 1;

Returns
Type Description
PolicyController.Builder

This builder for chaining.

clearExemptableNamespaces()

public PolicyController.Builder clearExemptableNamespaces()

The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster.

repeated string exemptable_namespaces = 4;

Returns
Type Description
PolicyController.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public PolicyController.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
PolicyController.Builder
Overrides

clearLogDeniesEnabled()

public PolicyController.Builder clearLogDeniesEnabled()

Logs all denies and dry run failures.

bool log_denies_enabled = 6;

Returns
Type Description
PolicyController.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public PolicyController.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
PolicyController.Builder
Overrides

clearReferentialRulesEnabled()

public PolicyController.Builder clearReferentialRulesEnabled()

Enables the ability to use Constraint Templates that reference to objects other than the object currently being evaluated.

bool referential_rules_enabled = 5;

Returns
Type Description
PolicyController.Builder

This builder for chaining.

clearTemplateLibraryInstalled()

public PolicyController.Builder clearTemplateLibraryInstalled()

Installs the default template library along with Policy Controller.

optional bool template_library_installed = 2;

Returns
Type Description
PolicyController.Builder

This builder for chaining.

clone()

public PolicyController.Builder clone()
Returns
Type Description
PolicyController.Builder
Overrides

getAuditIntervalSeconds()

public long getAuditIntervalSeconds()

Sets the interval for Policy Controller Audit Scans (in seconds). When set to 0, this disables audit functionality altogether.

optional int64 audit_interval_seconds = 3;

Returns
Type Description
long

The auditIntervalSeconds.

getDefaultInstanceForType()

public PolicyController getDefaultInstanceForType()
Returns
Type Description
PolicyController

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEnabled()

public boolean getEnabled()

Enables the installation of Policy Controller. If false, the rest of PolicyController fields take no effect.

bool enabled = 1;

Returns
Type Description
boolean

The enabled.

getExemptableNamespaces(int index)

public String getExemptableNamespaces(int index)

The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster.

repeated string exemptable_namespaces = 4;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The exemptableNamespaces at the given index.

getExemptableNamespacesBytes(int index)

public ByteString getExemptableNamespacesBytes(int index)

The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster.

repeated string exemptable_namespaces = 4;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the exemptableNamespaces at the given index.

getExemptableNamespacesCount()

public int getExemptableNamespacesCount()

The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster.

repeated string exemptable_namespaces = 4;

Returns
Type Description
int

The count of exemptableNamespaces.

getExemptableNamespacesList()

public ProtocolStringList getExemptableNamespacesList()

The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster.

repeated string exemptable_namespaces = 4;

Returns
Type Description
ProtocolStringList

A list containing the exemptableNamespaces.

getLogDeniesEnabled()

public boolean getLogDeniesEnabled()

Logs all denies and dry run failures.

bool log_denies_enabled = 6;

Returns
Type Description
boolean

The logDeniesEnabled.

getReferentialRulesEnabled()

public boolean getReferentialRulesEnabled()

Enables the ability to use Constraint Templates that reference to objects other than the object currently being evaluated.

bool referential_rules_enabled = 5;

Returns
Type Description
boolean

The referentialRulesEnabled.

getTemplateLibraryInstalled()

public boolean getTemplateLibraryInstalled()

Installs the default template library along with Policy Controller.

optional bool template_library_installed = 2;

Returns
Type Description
boolean

The templateLibraryInstalled.

hasAuditIntervalSeconds()

public boolean hasAuditIntervalSeconds()

Sets the interval for Policy Controller Audit Scans (in seconds). When set to 0, this disables audit functionality altogether.

optional int64 audit_interval_seconds = 3;

Returns
Type Description
boolean

Whether the auditIntervalSeconds field is set.

hasTemplateLibraryInstalled()

public boolean hasTemplateLibraryInstalled()

Installs the default template library along with Policy Controller.

optional bool template_library_installed = 2;

Returns
Type Description
boolean

Whether the templateLibraryInstalled field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(PolicyController other)

public PolicyController.Builder mergeFrom(PolicyController other)
Parameter
Name Description
other PolicyController
Returns
Type Description
PolicyController.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PolicyController.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PolicyController.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public PolicyController.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
PolicyController.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PolicyController.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
PolicyController.Builder
Overrides

setAuditIntervalSeconds(long value)

public PolicyController.Builder setAuditIntervalSeconds(long value)

Sets the interval for Policy Controller Audit Scans (in seconds). When set to 0, this disables audit functionality altogether.

optional int64 audit_interval_seconds = 3;

Parameter
Name Description
value long

The auditIntervalSeconds to set.

Returns
Type Description
PolicyController.Builder

This builder for chaining.

setEnabled(boolean value)

public PolicyController.Builder setEnabled(boolean value)

Enables the installation of Policy Controller. If false, the rest of PolicyController fields take no effect.

bool enabled = 1;

Parameter
Name Description
value boolean

The enabled to set.

Returns
Type Description
PolicyController.Builder

This builder for chaining.

setExemptableNamespaces(int index, String value)

public PolicyController.Builder setExemptableNamespaces(int index, String value)

The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster.

repeated string exemptable_namespaces = 4;

Parameters
Name Description
index int

The index to set the value at.

value String

The exemptableNamespaces to set.

Returns
Type Description
PolicyController.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public PolicyController.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
PolicyController.Builder
Overrides

setLogDeniesEnabled(boolean value)

public PolicyController.Builder setLogDeniesEnabled(boolean value)

Logs all denies and dry run failures.

bool log_denies_enabled = 6;

Parameter
Name Description
value boolean

The logDeniesEnabled to set.

Returns
Type Description
PolicyController.Builder

This builder for chaining.

setReferentialRulesEnabled(boolean value)

public PolicyController.Builder setReferentialRulesEnabled(boolean value)

Enables the ability to use Constraint Templates that reference to objects other than the object currently being evaluated.

bool referential_rules_enabled = 5;

Parameter
Name Description
value boolean

The referentialRulesEnabled to set.

Returns
Type Description
PolicyController.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public PolicyController.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
PolicyController.Builder
Overrides

setTemplateLibraryInstalled(boolean value)

public PolicyController.Builder setTemplateLibraryInstalled(boolean value)

Installs the default template library along with Policy Controller.

optional bool template_library_installed = 2;

Parameter
Name Description
value boolean

The templateLibraryInstalled to set.

Returns
Type Description
PolicyController.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final PolicyController.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
PolicyController.Builder
Overrides