Class Attachment

java.lang.Object
com.microsoft.graph.models.Entity
com.microsoft.graph.models.Attachment
All Implemented Interfaces:
com.microsoft.kiota.serialization.AdditionalDataHolder, com.microsoft.kiota.serialization.Parsable, com.microsoft.kiota.store.BackedModel
Direct Known Subclasses:
FileAttachment, ItemAttachment, ReferenceAttachment

@Generated("com.microsoft.kiota") public class Attachment extends Entity implements com.microsoft.kiota.serialization.Parsable
  • Constructor Details

    • Attachment

      public Attachment()
      Instantiates a new Attachment and sets the default values.
  • Method Details

    • createFromDiscriminatorValue

      @Nonnull public static Attachment createFromDiscriminatorValue(@Nonnull com.microsoft.kiota.serialization.ParseNode parseNode)
      Creates a new instance of the appropriate class based on discriminator value
      Parameters:
      parseNode - The parse node to use to read the discriminator value and create the object
      Returns:
      a Attachment
    • getContentType

      @Nullable public String getContentType()
      Gets the contentType property value. The MIME type.
      Returns:
      a String
    • getFieldDeserializers

      @Nonnull public Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>> getFieldDeserializers()
      The deserialization information for the current model
      Specified by:
      getFieldDeserializers in interface com.microsoft.kiota.serialization.Parsable
      Overrides:
      getFieldDeserializers in class Entity
      Returns:
      a Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>>
    • getIsInline

      @Nullable public Boolean getIsInline()
      Gets the isInline property value. true if the attachment is an inline attachment; otherwise, false.
      Returns:
      a Boolean
    • getLastModifiedDateTime

      @Nullable public OffsetDateTime getLastModifiedDateTime()
      Gets the lastModifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
      Returns:
      a OffsetDateTime
    • getName

      @Nullable public String getName()
      Gets the name property value. The attachment's file name.
      Returns:
      a String
    • getSize

      @Nullable public Integer getSize()
      Gets the size property value. The length of the attachment in bytes.
      Returns:
      a Integer
    • serialize

      public void serialize(@Nonnull com.microsoft.kiota.serialization.SerializationWriter writer)
      Serializes information the current object
      Specified by:
      serialize in interface com.microsoft.kiota.serialization.Parsable
      Overrides:
      serialize in class Entity
      Parameters:
      writer - Serialization writer to use to serialize this model
    • setContentType

      public void setContentType(@Nullable String value)
      Sets the contentType property value. The MIME type.
      Parameters:
      value - Value to set for the contentType property.
    • setIsInline

      public void setIsInline(@Nullable Boolean value)
      Sets the isInline property value. true if the attachment is an inline attachment; otherwise, false.
      Parameters:
      value - Value to set for the isInline property.
    • setLastModifiedDateTime

      public void setLastModifiedDateTime(@Nullable OffsetDateTime value)
      Sets the lastModifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
      Parameters:
      value - Value to set for the lastModifiedDateTime property.
    • setName

      public void setName(@Nullable String value)
      Sets the name property value. The attachment's file name.
      Parameters:
      value - Value to set for the name property.
    • setSize

      public void setSize(@Nullable Integer value)
      Sets the size property value. The length of the attachment in bytes.
      Parameters:
      value - Value to set for the size property.