Share via


MicrosoftGraphAttachmentItem Class

  • java.lang.Object
    • com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphAttachmentItem

Implements

public final class MicrosoftGraphAttachmentItem
implements JsonSerializable<MicrosoftGraphAttachmentItem>

attachmentItem.

Constructor Summary

Constructor Description
MicrosoftGraphAttachmentItem()

Creates an instance of MicrosoftGraphAttachmentItem class.

Method Summary

Modifier and Type Method and Description
Map<String,Object> additionalProperties()

Get the additionalProperties property: attachmentItem.

MicrosoftGraphAttachmentType attachmentType()

Get the attachmentType property: attachmentType.

String contentType()

Get the contentType property: The nature of the data in the attachment.

static MicrosoftGraphAttachmentItem fromJson(JsonReader jsonReader)

Reads an instance of MicrosoftGraphAttachmentItem from the JsonReader.

Boolean isInline()

Get the isInline property: true if the attachment is an inline attachment; otherwise, false.

String name()

Get the name property: The display name of the attachment.

Long size()

Get the size property: The length of the attachment in bytes.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

MicrosoftGraphAttachmentItem withAdditionalProperties(Map<String,Object> additionalProperties)

Set the additionalProperties property: attachmentItem.

MicrosoftGraphAttachmentItem withAttachmentType(MicrosoftGraphAttachmentType attachmentType)

Set the attachmentType property: attachmentType.

MicrosoftGraphAttachmentItem withContentType(String contentType)

Set the contentType property: The nature of the data in the attachment.

MicrosoftGraphAttachmentItem withIsInline(Boolean isInline)

Set the isInline property: true if the attachment is an inline attachment; otherwise, false.

MicrosoftGraphAttachmentItem withName(String name)

Set the name property: The display name of the attachment.

MicrosoftGraphAttachmentItem withSize(Long size)

Set the size property: The length of the attachment in bytes.

Methods inherited from java.lang.Object

Constructor Details

MicrosoftGraphAttachmentItem

public MicrosoftGraphAttachmentItem()

Creates an instance of MicrosoftGraphAttachmentItem class.

Method Details

additionalProperties

public Map<String,Object> additionalProperties()

Get the additionalProperties property: attachmentItem.

Returns:

the additionalProperties value.

attachmentType

public MicrosoftGraphAttachmentType attachmentType()

Get the attachmentType property: attachmentType.

Returns:

the attachmentType value.

contentType

public String contentType()

Get the contentType property: The nature of the data in the attachment. Optional.

Returns:

the contentType value.

fromJson

public static MicrosoftGraphAttachmentItem fromJson(JsonReader jsonReader)

Reads an instance of MicrosoftGraphAttachmentItem from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of MicrosoftGraphAttachmentItem if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the MicrosoftGraphAttachmentItem.

isInline

public Boolean isInline()

Get the isInline property: true if the attachment is an inline attachment; otherwise, false. Optional.

Returns:

the isInline value.

name

public String name()

Get the name property: The display name of the attachment. This can be a descriptive string and does not have to be the actual file name. Required.

Returns:

the name value.

size

public Long size()

Get the size property: The length of the attachment in bytes. Required.

Returns:

the size value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAdditionalProperties

public MicrosoftGraphAttachmentItem withAdditionalProperties(Map<String,Object> additionalProperties)

Set the additionalProperties property: attachmentItem.

Parameters:

additionalProperties - the additionalProperties value to set.

Returns:

the MicrosoftGraphAttachmentItem object itself.

withAttachmentType

public MicrosoftGraphAttachmentItem withAttachmentType(MicrosoftGraphAttachmentType attachmentType)

Set the attachmentType property: attachmentType.

Parameters:

attachmentType - the attachmentType value to set.

Returns:

the MicrosoftGraphAttachmentItem object itself.

withContentType

public MicrosoftGraphAttachmentItem withContentType(String contentType)

Set the contentType property: The nature of the data in the attachment. Optional.

Parameters:

contentType - the contentType value to set.

Returns:

the MicrosoftGraphAttachmentItem object itself.

withIsInline

public MicrosoftGraphAttachmentItem withIsInline(Boolean isInline)

Set the isInline property: true if the attachment is an inline attachment; otherwise, false. Optional.

Parameters:

isInline - the isInline value to set.

Returns:

the MicrosoftGraphAttachmentItem object itself.

withName

public MicrosoftGraphAttachmentItem withName(String name)

Set the name property: The display name of the attachment. This can be a descriptive string and does not have to be the actual file name. Required.

Parameters:

name - the name value to set.

Returns:

the MicrosoftGraphAttachmentItem object itself.

withSize

public MicrosoftGraphAttachmentItem withSize(Long size)

Set the size property: The length of the attachment in bytes. Required.

Parameters:

size - the size value to set.

Returns:

the MicrosoftGraphAttachmentItem object itself.

Applies to