Class AttachmentRequest

java.lang.Object
com.microsoft.graph.http.BaseRequest<Attachment>
com.microsoft.graph.requests.AttachmentRequest
All Implemented Interfaces:
com.microsoft.graph.http.IHttpRequest

public class AttachmentRequest extends com.microsoft.graph.http.BaseRequest<Attachment>
The class for the Attachment Request.
  • Constructor Details

    • AttachmentRequest

      public AttachmentRequest(@Nonnull String requestUrl, @Nonnull com.microsoft.graph.core.IBaseClient<?> client, @Nullable List<? extends com.microsoft.graph.options.Option> requestOptions, @Nonnull Class<? extends Attachment> responseClass)
      The request for the Attachment
      Parameters:
      requestUrl - the request URL
      client - the service client
      requestOptions - the options for this request
      responseClass - the class of the response
    • AttachmentRequest

      public AttachmentRequest(@Nonnull String requestUrl, @Nonnull com.microsoft.graph.core.IBaseClient<?> client, @Nullable List<? extends com.microsoft.graph.options.Option> requestOptions)
      The request for the Attachment
      Parameters:
      requestUrl - the request URL
      client - the service client
      requestOptions - the options for this request
  • Method Details

    • getAsync

      @Nonnull public CompletableFuture<Attachment> getAsync()
      Gets the Attachment from the service
      Returns:
      a future with the result
    • get

      @Nullable public Attachment get() throws com.microsoft.graph.core.ClientException
      Gets the Attachment from the service
      Returns:
      the Attachment from the request
      Throws:
      com.microsoft.graph.core.ClientException - this exception occurs if the request was unable to complete for any reason
    • deleteAsync

      @Nonnull public CompletableFuture<Attachment> deleteAsync()
      Delete this item from the service
      Returns:
      a future with the deletion result
    • delete

      @Nullable public Attachment delete() throws com.microsoft.graph.core.ClientException
      Delete this item from the service
      Returns:
      the resulting response if the service returns anything on deletion
      Throws:
      com.microsoft.graph.core.ClientException - if there was an exception during the delete operation
    • patchAsync

      @Nonnull public CompletableFuture<Attachment> patchAsync(@Nonnull Attachment sourceAttachment)
      Patches this Attachment with a source
      Parameters:
      sourceAttachment - the source object with updates
      Returns:
      a future with the result
    • patch

      @Nullable public Attachment patch(@Nonnull Attachment sourceAttachment) throws com.microsoft.graph.core.ClientException
      Patches this Attachment with a source
      Parameters:
      sourceAttachment - the source object with updates
      Returns:
      the updated Attachment
      Throws:
      com.microsoft.graph.core.ClientException - this exception occurs if the request was unable to complete for any reason
    • postAsync

      @Nonnull public CompletableFuture<Attachment> postAsync(@Nonnull Attachment newAttachment)
      Creates a Attachment with a new object
      Parameters:
      newAttachment - the new object to create
      Returns:
      a future with the result
    • post

      @Nullable public Attachment post(@Nonnull Attachment newAttachment) throws com.microsoft.graph.core.ClientException
      Creates a Attachment with a new object
      Parameters:
      newAttachment - the new object to create
      Returns:
      the created Attachment
      Throws:
      com.microsoft.graph.core.ClientException - this exception occurs if the request was unable to complete for any reason
    • putAsync

      @Nonnull public CompletableFuture<Attachment> putAsync(@Nonnull Attachment newAttachment)
      Creates a Attachment with a new object
      Parameters:
      newAttachment - the object to create/update
      Returns:
      a future with the result
    • put

      @Nullable public Attachment put(@Nonnull Attachment newAttachment) throws com.microsoft.graph.core.ClientException
      Creates a Attachment with a new object
      Parameters:
      newAttachment - the object to create/update
      Returns:
      the created Attachment
      Throws:
      com.microsoft.graph.core.ClientException - this exception occurs if the request was unable to complete for any reason
    • select

      @Nonnull public AttachmentRequest select(@Nonnull String value)
      Sets the select clause for the request
      Parameters:
      value - the select clause
      Returns:
      the updated request
    • expand

      @Nonnull public AttachmentRequest expand(@Nonnull String value)
      Sets the expand clause for the request
      Parameters:
      value - the expand clause
      Returns:
      the updated request