Class DeidentifyTemplate.Builder

  • All Implemented Interfaces:
    DeidentifyTemplateOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    DeidentifyTemplate

    public static final class DeidentifyTemplate.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<DeidentifyTemplate.Builder>
    implements DeidentifyTemplateOrBuilder
     DeidentifyTemplates contains instructions on how to de-identify content.
     See https://cloud.google.com/dlp/docs/concepts-templates to learn more.
     
    Protobuf type google.privacy.dlp.v2.DeidentifyTemplate
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<DeidentifyTemplate.Builder>
      • clear

        public DeidentifyTemplate.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<DeidentifyTemplate.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<DeidentifyTemplate.Builder>
      • getDefaultInstanceForType

        public DeidentifyTemplate getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public DeidentifyTemplate build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public DeidentifyTemplate buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public DeidentifyTemplate.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<DeidentifyTemplate.Builder>
      • setField

        public DeidentifyTemplate.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<DeidentifyTemplate.Builder>
      • clearField

        public DeidentifyTemplate.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<DeidentifyTemplate.Builder>
      • clearOneof

        public DeidentifyTemplate.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<DeidentifyTemplate.Builder>
      • setRepeatedField

        public DeidentifyTemplate.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                           int index,
                                                           Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DeidentifyTemplate.Builder>
      • addRepeatedField

        public DeidentifyTemplate.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                           Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DeidentifyTemplate.Builder>
      • mergeFrom

        public DeidentifyTemplate.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<DeidentifyTemplate.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<DeidentifyTemplate.Builder>
      • mergeFrom

        public DeidentifyTemplate.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<DeidentifyTemplate.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         Output only. The template name.
        
         The template will have one of the following formats:
         `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
         `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getName in interface DeidentifyTemplateOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Output only. The template name.
        
         The template will have one of the following formats:
         `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
         `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getNameBytes in interface DeidentifyTemplateOrBuilder
        Returns:
        The bytes for name.
      • setName

        public DeidentifyTemplate.Builder setName​(String value)
         Output only. The template name.
        
         The template will have one of the following formats:
         `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
         `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public DeidentifyTemplate.Builder clearName()
         Output only. The template name.
        
         The template will have one of the following formats:
         `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
         `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setNameBytes

        public DeidentifyTemplate.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Output only. The template name.
        
         The template will have one of the following formats:
         `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
         `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getDisplayNameBytes

        public com.google.protobuf.ByteString getDisplayNameBytes()
         Display name (max 256 chars).
         
        string display_name = 2;
        Specified by:
        getDisplayNameBytes in interface DeidentifyTemplateOrBuilder
        Returns:
        The bytes for displayName.
      • setDisplayName

        public DeidentifyTemplate.Builder setDisplayName​(String value)
         Display name (max 256 chars).
         
        string display_name = 2;
        Parameters:
        value - The displayName to set.
        Returns:
        This builder for chaining.
      • clearDisplayName

        public DeidentifyTemplate.Builder clearDisplayName()
         Display name (max 256 chars).
         
        string display_name = 2;
        Returns:
        This builder for chaining.
      • setDisplayNameBytes

        public DeidentifyTemplate.Builder setDisplayNameBytes​(com.google.protobuf.ByteString value)
         Display name (max 256 chars).
         
        string display_name = 2;
        Parameters:
        value - The bytes for displayName to set.
        Returns:
        This builder for chaining.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         Short description (max 256 chars).
         
        string description = 3;
        Specified by:
        getDescriptionBytes in interface DeidentifyTemplateOrBuilder
        Returns:
        The bytes for description.
      • setDescription

        public DeidentifyTemplate.Builder setDescription​(String value)
         Short description (max 256 chars).
         
        string description = 3;
        Parameters:
        value - The description to set.
        Returns:
        This builder for chaining.
      • clearDescription

        public DeidentifyTemplate.Builder clearDescription()
         Short description (max 256 chars).
         
        string description = 3;
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public DeidentifyTemplate.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
         Short description (max 256 chars).
         
        string description = 3;
        Parameters:
        value - The bytes for description to set.
        Returns:
        This builder for chaining.
      • hasCreateTime

        public boolean hasCreateTime()
         Output only. The creation timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCreateTime in interface DeidentifyTemplateOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. The creation timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTime in interface DeidentifyTemplateOrBuilder
        Returns:
        The createTime.
      • setCreateTime

        public DeidentifyTemplate.Builder setCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The creation timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setCreateTime

        public DeidentifyTemplate.Builder setCreateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. The creation timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeCreateTime

        public DeidentifyTemplate.Builder mergeCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The creation timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearCreateTime

        public DeidentifyTemplate.Builder clearCreateTime()
         Output only. The creation timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
         Output only. The creation timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. The creation timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTimeOrBuilder in interface DeidentifyTemplateOrBuilder
      • hasUpdateTime

        public boolean hasUpdateTime()
         Output only. The last update timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasUpdateTime in interface DeidentifyTemplateOrBuilder
        Returns:
        Whether the updateTime field is set.
      • getUpdateTime

        public com.google.protobuf.Timestamp getUpdateTime()
         Output only. The last update timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTime in interface DeidentifyTemplateOrBuilder
        Returns:
        The updateTime.
      • setUpdateTime

        public DeidentifyTemplate.Builder setUpdateTime​(com.google.protobuf.Timestamp value)
         Output only. The last update timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setUpdateTime

        public DeidentifyTemplate.Builder setUpdateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. The last update timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeUpdateTime

        public DeidentifyTemplate.Builder mergeUpdateTime​(com.google.protobuf.Timestamp value)
         Output only. The last update timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearUpdateTime

        public DeidentifyTemplate.Builder clearUpdateTime()
         Output only. The last update timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getUpdateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
         Output only. The last update timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getUpdateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
         Output only. The last update timestamp of an inspectTemplate.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTimeOrBuilder in interface DeidentifyTemplateOrBuilder
      • hasDeidentifyConfig

        public boolean hasDeidentifyConfig()
         The core content of the template.
         
        .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6;
        Specified by:
        hasDeidentifyConfig in interface DeidentifyTemplateOrBuilder
        Returns:
        Whether the deidentifyConfig field is set.
      • clearDeidentifyConfig

        public DeidentifyTemplate.Builder clearDeidentifyConfig()
         The core content of the template.
         
        .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6;
      • getDeidentifyConfigBuilder

        public DeidentifyConfig.Builder getDeidentifyConfigBuilder()
         The core content of the template.
         
        .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6;
      • setUnknownFields

        public final DeidentifyTemplate.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DeidentifyTemplate.Builder>
      • mergeUnknownFields

        public final DeidentifyTemplate.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DeidentifyTemplate.Builder>