Package com.google.cloud.asset.v1
Class AnalyzerOrgPolicy.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AnalyzerOrgPolicy.Builder>
com.google.cloud.asset.v1.AnalyzerOrgPolicy.Builder
- All Implemented Interfaces:
AnalyzerOrgPolicyOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- AnalyzerOrgPolicy
public static final class AnalyzerOrgPolicy.Builder
extends com.google.protobuf.GeneratedMessage.Builder<AnalyzerOrgPolicy.Builder>
implements AnalyzerOrgPolicyOrBuilder
This organization policy message is a modified version of the one defined in the Organization Policy system. This message contains several fields defined in the original organization policy with some new fields for analysis purpose.Protobuf type
google.cloud.asset.v1.AnalyzerOrgPolicy-
Method Summary
Modifier and TypeMethodDescriptionaddAllRules(Iterable<? extends AnalyzerOrgPolicy.Rule> values) List of rules for this organization policy.addRules(int index, AnalyzerOrgPolicy.Rule value) List of rules for this organization policy.addRules(int index, AnalyzerOrgPolicy.Rule.Builder builderForValue) List of rules for this organization policy.addRules(AnalyzerOrgPolicy.Rule value) List of rules for this organization policy.addRules(AnalyzerOrgPolicy.Rule.Builder builderForValue) List of rules for this organization policy.List of rules for this organization policy.addRulesBuilder(int index) List of rules for this organization policy.build()clear()The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy applies to.The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy is set.If `inherit_from_parent` is true, Rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy.Ignores policies set above this resource and restores the default behavior of the constraint at this resource.List of rules for this organization policy.The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy applies to.com.google.protobuf.ByteStringThe [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy applies to.The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy is set.com.google.protobuf.ByteStringThe [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy is set.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanIf `inherit_from_parent` is true, Rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy.booleangetReset()Ignores policies set above this resource and restores the default behavior of the constraint at this resource.getRules(int index) List of rules for this organization policy.getRulesBuilder(int index) List of rules for this organization policy.List of rules for this organization policy.intList of rules for this organization policy.List of rules for this organization policy.getRulesOrBuilder(int index) List of rules for this organization policy.List<? extends AnalyzerOrgPolicy.RuleOrBuilder>List of rules for this organization policy.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(AnalyzerOrgPolicy other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) removeRules(int index) List of rules for this organization policy.setAppliedResource(String value) The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy applies to.setAppliedResourceBytes(com.google.protobuf.ByteString value) The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy applies to.setAttachedResource(String value) The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy is set.setAttachedResourceBytes(com.google.protobuf.ByteString value) The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy is set.setInheritFromParent(boolean value) If `inherit_from_parent` is true, Rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy.setReset(boolean value) Ignores policies set above this resource and restores the default behavior of the constraint at this resource.setRules(int index, AnalyzerOrgPolicy.Rule value) List of rules for this organization policy.setRules(int index, AnalyzerOrgPolicy.Rule.Builder builderForValue) List of rules for this organization policy.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<AnalyzerOrgPolicy.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<AnalyzerOrgPolicy.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<AnalyzerOrgPolicy.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AnalyzerOrgPolicy.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<AnalyzerOrgPolicy.Builder>
-
mergeFrom
public AnalyzerOrgPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AnalyzerOrgPolicy.Builder>- Throws:
IOException
-
getAttachedResource
The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy is set. Notice that some type of constraints are defined with default policy. This field will be empty for them.
string attached_resource = 1;- Specified by:
getAttachedResourcein interfaceAnalyzerOrgPolicyOrBuilder- Returns:
- The attachedResource.
-
getAttachedResourceBytes
public com.google.protobuf.ByteString getAttachedResourceBytes()The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy is set. Notice that some type of constraints are defined with default policy. This field will be empty for them.
string attached_resource = 1;- Specified by:
getAttachedResourceBytesin interfaceAnalyzerOrgPolicyOrBuilder- Returns:
- The bytes for attachedResource.
-
setAttachedResource
The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy is set. Notice that some type of constraints are defined with default policy. This field will be empty for them.
string attached_resource = 1;- Parameters:
value- The attachedResource to set.- Returns:
- This builder for chaining.
-
clearAttachedResource
The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy is set. Notice that some type of constraints are defined with default policy. This field will be empty for them.
string attached_resource = 1;- Returns:
- This builder for chaining.
-
setAttachedResourceBytes
The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy is set. Notice that some type of constraints are defined with default policy. This field will be empty for them.
string attached_resource = 1;- Parameters:
value- The bytes for attachedResource to set.- Returns:
- This builder for chaining.
-
getAppliedResource
The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy applies to. For any user defined org policies, this field has the same value as the [attached_resource] field. Only for default policy, this field has the different value.
string applied_resource = 5;- Specified by:
getAppliedResourcein interfaceAnalyzerOrgPolicyOrBuilder- Returns:
- The appliedResource.
-
getAppliedResourceBytes
public com.google.protobuf.ByteString getAppliedResourceBytes()The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy applies to. For any user defined org policies, this field has the same value as the [attached_resource] field. Only for default policy, this field has the different value.
string applied_resource = 5;- Specified by:
getAppliedResourceBytesin interfaceAnalyzerOrgPolicyOrBuilder- Returns:
- The bytes for appliedResource.
-
setAppliedResource
The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy applies to. For any user defined org policies, this field has the same value as the [attached_resource] field. Only for default policy, this field has the different value.
string applied_resource = 5;- Parameters:
value- The appliedResource to set.- Returns:
- This builder for chaining.
-
clearAppliedResource
The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy applies to. For any user defined org policies, this field has the same value as the [attached_resource] field. Only for default policy, this field has the different value.
string applied_resource = 5;- Returns:
- This builder for chaining.
-
setAppliedResourceBytes
The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of an organization/folder/project resource where this organization policy applies to. For any user defined org policies, this field has the same value as the [attached_resource] field. Only for default policy, this field has the different value.
string applied_resource = 5;- Parameters:
value- The bytes for appliedResource to set.- Returns:
- This builder for chaining.
-
getRulesList
List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2;- Specified by:
getRulesListin interfaceAnalyzerOrgPolicyOrBuilder
-
getRulesCount
public int getRulesCount()List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2;- Specified by:
getRulesCountin interfaceAnalyzerOrgPolicyOrBuilder
-
getRules
List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2;- Specified by:
getRulesin interfaceAnalyzerOrgPolicyOrBuilder
-
setRules
List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2; -
setRules
public AnalyzerOrgPolicy.Builder setRules(int index, AnalyzerOrgPolicy.Rule.Builder builderForValue) List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2; -
addRules
List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2; -
addRules
List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2; -
addRules
List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2; -
addRules
public AnalyzerOrgPolicy.Builder addRules(int index, AnalyzerOrgPolicy.Rule.Builder builderForValue) List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2; -
addAllRules
List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2; -
clearRules
List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2; -
removeRules
List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2; -
getRulesBuilder
List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2; -
getRulesOrBuilder
List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2;- Specified by:
getRulesOrBuilderin interfaceAnalyzerOrgPolicyOrBuilder
-
getRulesOrBuilderList
List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2;- Specified by:
getRulesOrBuilderListin interfaceAnalyzerOrgPolicyOrBuilder
-
addRulesBuilder
List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2; -
addRulesBuilder
List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2; -
getRulesBuilderList
List of rules for this organization policy.
repeated .google.cloud.asset.v1.AnalyzerOrgPolicy.Rule rules = 2; -
getInheritFromParent
public boolean getInheritFromParent()If `inherit_from_parent` is true, Rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the effective root for evaluation.
bool inherit_from_parent = 3;- Specified by:
getInheritFromParentin interfaceAnalyzerOrgPolicyOrBuilder- Returns:
- The inheritFromParent.
-
setInheritFromParent
If `inherit_from_parent` is true, Rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the effective root for evaluation.
bool inherit_from_parent = 3;- Parameters:
value- The inheritFromParent to set.- Returns:
- This builder for chaining.
-
clearInheritFromParent
If `inherit_from_parent` is true, Rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the effective root for evaluation.
bool inherit_from_parent = 3;- Returns:
- This builder for chaining.
-
getReset
public boolean getReset()Ignores policies set above this resource and restores the default behavior of the constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
bool reset = 4;- Specified by:
getResetin interfaceAnalyzerOrgPolicyOrBuilder- Returns:
- The reset.
-
setReset
Ignores policies set above this resource and restores the default behavior of the constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
bool reset = 4;- Parameters:
value- The reset to set.- Returns:
- This builder for chaining.
-
clearReset
Ignores policies set above this resource and restores the default behavior of the constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
bool reset = 4;- Returns:
- This builder for chaining.
-