Class MimePartType.Builder
java.lang.Object
security.whisper.javastix.coo.types.MimePartType.Builder
- Enclosing class:
MimePartType
Builds instances of type
MimePartType.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionfinal MimePartType.BuilderInitializes the optional valuebodyto body.final MimePartType.BuilderInitializes the optional valuebodyto body.final MimePartType.BuilderbodyRawRef(String bodyRawRef) Initializes the optional valuebodyRawRefto bodyRawRef.final MimePartType.BuilderbodyRawRef(Optional<String> bodyRawRef) Initializes the optional valuebodyRawRefto bodyRawRef.build()Builds a newMimePartType.final MimePartType.BuildercontentDisposition(String contentDisposition) Initializes the optional valuecontentDispositionto contentDisposition.final MimePartType.BuildercontentDisposition(Optional<String> contentDisposition) Initializes the optional valuecontentDispositionto contentDisposition.final MimePartType.BuildercontentType(String contentType) Initializes the optional valuecontentTypeto contentType.final MimePartType.BuildercontentType(Optional<String> contentType) Initializes the optional valuecontentTypeto contentType.final MimePartType.BuildercustomProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.final MimePartType.Builderfrom(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.final MimePartType.Builderfrom(MimePartTypeObj instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.types.MimePartTypeObjinstance.final MimePartType.BuilderputAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap.final MimePartType.BuilderputCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.final MimePartType.BuilderputCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap.
-
Method Details
-
from
Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.types.MimePartTypeObjinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
body
Initializes the optional valuebodyto body.- Parameters:
body- The value for body- Returns:
thisbuilder for chained invocation
-
body
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the contents of the MIME part if the content_type is not provided OR starts with text/") public final MimePartType.Builder body(Optional<String> body) Initializes the optional valuebodyto body.- Parameters:
body- The value for body- Returns:
thisbuilder for use in a chained invocation
-
bodyRawRef
Initializes the optional valuebodyRawRefto bodyRawRef.- Parameters:
bodyRawRef- The value for bodyRawRef- Returns:
thisbuilder for chained invocation
-
bodyRawRef
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the contents of non-textual MIME parts, that is those whose content_type does not start with text/") public final MimePartType.Builder bodyRawRef(Optional<String> bodyRawRef) Initializes the optional valuebodyRawRefto bodyRawRef.- Parameters:
bodyRawRef- The value for bodyRawRef- Returns:
thisbuilder for use in a chained invocation
-
contentType
Initializes the optional valuecontentTypeto contentType.- Parameters:
contentType- The value for contentType- Returns:
thisbuilder for chained invocation
-
contentType
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the value of the \'Content-Type\' header field of the MIME part.") public final MimePartType.Builder contentType(Optional<String> contentType) Initializes the optional valuecontentTypeto contentType.- Parameters:
contentType- The value for contentType- Returns:
thisbuilder for use in a chained invocation
-
contentDisposition
@CanIgnoreReturnValue public final MimePartType.Builder contentDisposition(String contentDisposition) Initializes the optional valuecontentDispositionto contentDisposition.- Parameters:
contentDisposition- The value for contentDisposition- Returns:
thisbuilder for chained invocation
-
contentDisposition
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the value of the \'Content-Disposition\' header field of the MIME part.") public final MimePartType.Builder contentDisposition(Optional<String> contentDisposition) Initializes the optional valuecontentDispositionto contentDisposition.- Parameters:
contentDisposition- The value for contentDisposition- Returns:
thisbuilder for use in a chained invocation
-
putCustomProperty
Put one entry to thecustomPropertiesmap.- Parameters:
key- The key in the customProperties mapvalue- The associated value in the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
putCustomProperty
@CanIgnoreReturnValue public final MimePartType.Builder putCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
customProperties
@CanIgnoreReturnValue public final MimePartType.Builder customProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
putAllCustomProperties
@CanIgnoreReturnValue public final MimePartType.Builder putAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newMimePartType.- Returns:
- An immutable instance of MimePartType
- Throws:
IllegalStateException- if any required attributes are missing
-