Class PolicyController.Builder (1.1.0)

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

Configuration for Policy Controller

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The exemptableNamespaces to add.

Returns
TypeDescription
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
NameDescription
valueString

The exemptableNamespaces to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the exemptableNamespaces to add.

Returns
TypeDescription
PolicyController.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PolicyController.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
PolicyController.Builder
Overrides

build()

public PolicyController build()
Returns
TypeDescription
PolicyController

buildPartial()

public PolicyController buildPartial()
Returns
TypeDescription
PolicyController

clear()

public PolicyController.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
PolicyController.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public PolicyController.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
PolicyController.Builder
Overrides

clearLogDeniesEnabled()

public PolicyController.Builder clearLogDeniesEnabled()

Logs all denies and dry run failures.

bool log_denies_enabled = 6;

Returns
TypeDescription
PolicyController.Builder

This builder for chaining.

clearMutationEnabled()

public PolicyController.Builder clearMutationEnabled()

Enable users to try out mutation for PolicyController.

bool mutation_enabled = 7;

Returns
TypeDescription
PolicyController.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public PolicyController.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
PolicyController.Builder

This builder for chaining.

clone()

public PolicyController.Builder clone()
Returns
TypeDescription
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
TypeDescription
long

The auditIntervalSeconds.

getDefaultInstanceForType()

public PolicyController getDefaultInstanceForType()
Returns
TypeDescription
PolicyController

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the exemptableNamespaces.

getLogDeniesEnabled()

public boolean getLogDeniesEnabled()

Logs all denies and dry run failures.

bool log_denies_enabled = 6;

Returns
TypeDescription
boolean

The logDeniesEnabled.

getMutationEnabled()

public boolean getMutationEnabled()

Enable users to try out mutation for PolicyController.

bool mutation_enabled = 7;

Returns
TypeDescription
boolean

The mutationEnabled.

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
TypeDescription
boolean

The referentialRulesEnabled.

getTemplateLibraryInstalled()

public boolean getTemplateLibraryInstalled()

Installs the default template library along with Policy Controller.

optional bool template_library_installed = 2;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the templateLibraryInstalled field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(PolicyController other)

public PolicyController.Builder mergeFrom(PolicyController other)
Parameter
NameDescription
otherPolicyController
Returns
TypeDescription
PolicyController.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PolicyController.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PolicyController.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public PolicyController.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
PolicyController.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PolicyController.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuelong

The auditIntervalSeconds to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The enabled to set.

Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The exemptableNamespaces to set.

Returns
TypeDescription
PolicyController.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public PolicyController.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueboolean

The logDeniesEnabled to set.

Returns
TypeDescription
PolicyController.Builder

This builder for chaining.

setMutationEnabled(boolean value)

public PolicyController.Builder setMutationEnabled(boolean value)

Enable users to try out mutation for PolicyController.

bool mutation_enabled = 7;

Parameter
NameDescription
valueboolean

The mutationEnabled to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The referentialRulesEnabled to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueboolean

The templateLibraryInstalled to set.

Returns
TypeDescription
PolicyController.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final PolicyController.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
PolicyController.Builder
Overrides