Class PolicyContentSpec.Builder (1.54.0)

public static final class PolicyContentSpec.Builder extends GeneratedMessageV3.Builder<PolicyContentSpec.Builder> implements PolicyContentSpecOrBuilder

PolicyContentSpec defines the user's desired content configuration on the cluster.

Protobuf type google.cloud.gkehub.policycontroller.v1beta.PolicyContentSpec

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PolicyContentSpec build()
Returns
Type Description
PolicyContentSpec

buildPartial()

public PolicyContentSpec buildPartial()
Returns
Type Description
PolicyContentSpec

clear()

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

clearBundles()

public PolicyContentSpec.Builder clearBundles()
Returns
Type Description
PolicyContentSpec.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTemplateLibrary()

public PolicyContentSpec.Builder clearTemplateLibrary()

Configures the installation of the Template Library.

.google.cloud.gkehub.policycontroller.v1beta.TemplateLibraryConfig template_library = 2;

Returns
Type Description
PolicyContentSpec.Builder

clone()

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

containsBundles(String key)

public boolean containsBundles(String key)

map of bundle name to BundleInstallSpec. The bundle name maps to the bundleName key in the policycontroller.gke.io/constraintData annotation on a constraint.

map<string, .google.cloud.gkehub.policycontroller.v1beta.BundleInstallSpec> bundles = 1;

Parameter
Name Description
key String
Returns
Type Description
boolean

getBundles() (deprecated)

public Map<String,BundleInstallSpec> getBundles()

Use #getBundlesMap() instead.

Returns
Type Description
Map<String,BundleInstallSpec>

getBundlesCount()

public int getBundlesCount()

map of bundle name to BundleInstallSpec. The bundle name maps to the bundleName key in the policycontroller.gke.io/constraintData annotation on a constraint.

map<string, .google.cloud.gkehub.policycontroller.v1beta.BundleInstallSpec> bundles = 1;

Returns
Type Description
int

getBundlesMap()

public Map<String,BundleInstallSpec> getBundlesMap()

map of bundle name to BundleInstallSpec. The bundle name maps to the bundleName key in the policycontroller.gke.io/constraintData annotation on a constraint.

map<string, .google.cloud.gkehub.policycontroller.v1beta.BundleInstallSpec> bundles = 1;

Returns
Type Description
Map<String,BundleInstallSpec>

getBundlesOrDefault(String key, BundleInstallSpec defaultValue)

public BundleInstallSpec getBundlesOrDefault(String key, BundleInstallSpec defaultValue)

map of bundle name to BundleInstallSpec. The bundle name maps to the bundleName key in the policycontroller.gke.io/constraintData annotation on a constraint.

map<string, .google.cloud.gkehub.policycontroller.v1beta.BundleInstallSpec> bundles = 1;

Parameters
Name Description
key String
defaultValue BundleInstallSpec
Returns
Type Description
BundleInstallSpec

getBundlesOrThrow(String key)

public BundleInstallSpec getBundlesOrThrow(String key)

map of bundle name to BundleInstallSpec. The bundle name maps to the bundleName key in the policycontroller.gke.io/constraintData annotation on a constraint.

map<string, .google.cloud.gkehub.policycontroller.v1beta.BundleInstallSpec> bundles = 1;

Parameter
Name Description
key String
Returns
Type Description
BundleInstallSpec

getDefaultInstanceForType()

public PolicyContentSpec getDefaultInstanceForType()
Returns
Type Description
PolicyContentSpec

getDescriptorForType()

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

getMutableBundles() (deprecated)

public Map<String,BundleInstallSpec> getMutableBundles()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,BundleInstallSpec>

getTemplateLibrary()

public TemplateLibraryConfig getTemplateLibrary()

Configures the installation of the Template Library.

.google.cloud.gkehub.policycontroller.v1beta.TemplateLibraryConfig template_library = 2;

Returns
Type Description
TemplateLibraryConfig

The templateLibrary.

getTemplateLibraryBuilder()

public TemplateLibraryConfig.Builder getTemplateLibraryBuilder()

Configures the installation of the Template Library.

.google.cloud.gkehub.policycontroller.v1beta.TemplateLibraryConfig template_library = 2;

Returns
Type Description
TemplateLibraryConfig.Builder

getTemplateLibraryOrBuilder()

public TemplateLibraryConfigOrBuilder getTemplateLibraryOrBuilder()

Configures the installation of the Template Library.

.google.cloud.gkehub.policycontroller.v1beta.TemplateLibraryConfig template_library = 2;

Returns
Type Description
TemplateLibraryConfigOrBuilder

hasTemplateLibrary()

public boolean hasTemplateLibrary()

Configures the installation of the Template Library.

.google.cloud.gkehub.policycontroller.v1beta.TemplateLibraryConfig template_library = 2;

Returns
Type Description
boolean

Whether the templateLibrary field is set.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(PolicyContentSpec other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeTemplateLibrary(TemplateLibraryConfig value)

public PolicyContentSpec.Builder mergeTemplateLibrary(TemplateLibraryConfig value)

Configures the installation of the Template Library.

.google.cloud.gkehub.policycontroller.v1beta.TemplateLibraryConfig template_library = 2;

Parameter
Name Description
value TemplateLibraryConfig
Returns
Type Description
PolicyContentSpec.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllBundles(Map<String,BundleInstallSpec> values)

public PolicyContentSpec.Builder putAllBundles(Map<String,BundleInstallSpec> values)

map of bundle name to BundleInstallSpec. The bundle name maps to the bundleName key in the policycontroller.gke.io/constraintData annotation on a constraint.

map<string, .google.cloud.gkehub.policycontroller.v1beta.BundleInstallSpec> bundles = 1;

Parameter
Name Description
values Map<String,BundleInstallSpec>
Returns
Type Description
PolicyContentSpec.Builder

putBundles(String key, BundleInstallSpec value)

public PolicyContentSpec.Builder putBundles(String key, BundleInstallSpec value)

map of bundle name to BundleInstallSpec. The bundle name maps to the bundleName key in the policycontroller.gke.io/constraintData annotation on a constraint.

map<string, .google.cloud.gkehub.policycontroller.v1beta.BundleInstallSpec> bundles = 1;

Parameters
Name Description
key String
value BundleInstallSpec
Returns
Type Description
PolicyContentSpec.Builder

putBundlesBuilderIfAbsent(String key)

public BundleInstallSpec.Builder putBundlesBuilderIfAbsent(String key)

map of bundle name to BundleInstallSpec. The bundle name maps to the bundleName key in the policycontroller.gke.io/constraintData annotation on a constraint.

map<string, .google.cloud.gkehub.policycontroller.v1beta.BundleInstallSpec> bundles = 1;

Parameter
Name Description
key String
Returns
Type Description
BundleInstallSpec.Builder

removeBundles(String key)

public PolicyContentSpec.Builder removeBundles(String key)

map of bundle name to BundleInstallSpec. The bundle name maps to the bundleName key in the policycontroller.gke.io/constraintData annotation on a constraint.

map<string, .google.cloud.gkehub.policycontroller.v1beta.BundleInstallSpec> bundles = 1;

Parameter
Name Description
key String
Returns
Type Description
PolicyContentSpec.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setTemplateLibrary(TemplateLibraryConfig value)

public PolicyContentSpec.Builder setTemplateLibrary(TemplateLibraryConfig value)

Configures the installation of the Template Library.

.google.cloud.gkehub.policycontroller.v1beta.TemplateLibraryConfig template_library = 2;

Parameter
Name Description
value TemplateLibraryConfig
Returns
Type Description
PolicyContentSpec.Builder

setTemplateLibrary(TemplateLibraryConfig.Builder builderForValue)

public PolicyContentSpec.Builder setTemplateLibrary(TemplateLibraryConfig.Builder builderForValue)

Configures the installation of the Template Library.

.google.cloud.gkehub.policycontroller.v1beta.TemplateLibraryConfig template_library = 2;

Parameter
Name Description
builderForValue TemplateLibraryConfig.Builder
Returns
Type Description
PolicyContentSpec.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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