Class AttachmentsBaseClient

java.lang.Object
com.azure.verticals.agrifood.farming.AttachmentsBaseClient

public final class AttachmentsBaseClient extends Object
Initializes a new instance of the AttachmentsBaseClient type.
  • Method Details

    • listByFarmerId

      public DynamicRequest listByFarmerId(String farmerId)
      Returns a paginated list of attachment resources under a particular farmer.

      Optional Query Parameters

      Optional Query Parameters
      NameTypeDescription
      resourceIdsList<String>Resource Ids of the resource.
      resourceTypesList<String>Resource Types of the resource.
      idsList<String>Ids of the resource.
      namesList<String>Names of the resource.
      propertyFiltersList<String>Filters on key-value pairs within the Properties object. eg. "{testKey} eq {testValue}".
      statusesList<String>Statuses of the resource.
      minCreatedDateTimeOffsetDateTimeMinimum creation date of resource (inclusive).
      maxCreatedDateTimeOffsetDateTimeMaximum creation date of resource (inclusive).
      minLastModifiedDateTimeOffsetDateTimeMinimum last modified date of resource (inclusive).
      maxLastModifiedDateTimeOffsetDateTimeMaximum last modified date of resource (inclusive).
      maxPageSizeIntegerMaximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50.
      skipTokenStringSkip token for getting next set of results.

      Response Body Schema

      
       {
           value: [
               {
                   farmerId: String
                   resourceId: String
                   resourceType: String
                   originalFileName: String
                   id: String
                   status: String
                   createdDateTime: OffsetDateTime
                   modifiedDateTime: OffsetDateTime
                   name: String
                   description: String
                   eTag: String
               }
           ]
           skipToken: String
           nextLink: String
       }
       
      Parameters:
      farmerId - ID of the associated farmer.
      Returns:
      a DynamicRequest where customizations can be made before sent to the service.
    • get

      public DynamicRequest get(String farmerId, String attachmentId)
      Gets a specified attachment resource under a particular farmer.

      Response Body Schema

      
       {
           farmerId: String
           resourceId: String
           resourceType: String
           originalFileName: String
           id: String
           status: String
           createdDateTime: OffsetDateTime
           modifiedDateTime: OffsetDateTime
           name: String
           description: String
           eTag: String
       }
       
      Parameters:
      farmerId - ID of the associated farmer.
      attachmentId - ID of the attachment.
      Returns:
      a DynamicRequest where customizations can be made before sent to the service.
    • createOrUpdate

      public DynamicRequest createOrUpdate(String farmerId, String attachmentId)
      Creates or updates an attachment resource under a particular farmer.

      Optional Header Parameters

      Optional Header Parameters
      NameTypeDescription
      contentLengthLongThe contentLength parameter

      Request Body Schema

      
       Flux<ByteBuffer>
       

      Response Body Schema

      
       {
           farmerId: String
           resourceId: String
           resourceType: String
           originalFileName: String
           id: String
           status: String
           createdDateTime: OffsetDateTime
           modifiedDateTime: OffsetDateTime
           name: String
           description: String
           eTag: String
       }
       
      Parameters:
      farmerId - ID of the associated farmer resource.
      attachmentId - ID of the attachment resource.
      Returns:
      a DynamicRequest where customizations can be made before sent to the service.
    • delete

      public DynamicRequest delete(String farmerId, String attachmentId)
      Deletes a specified attachment resource under a particular farmer.
      Parameters:
      farmerId - ID of the farmer.
      attachmentId - ID of the attachment.
      Returns:
      a DynamicRequest where customizations can be made before sent to the service.
    • download

      public DynamicRequest download(String farmerId, String attachmentId)
      Downloads and returns attachment as response for the given input filePath.
      Parameters:
      farmerId - ID of the associated farmer.
      attachmentId - ID of attachment to be downloaded.
      Returns:
      a DynamicRequest where customizations can be made before sent to the service.
    • listByFarmerIdNext

      public DynamicRequest listByFarmerIdNext(String nextLink)
      Get the next page of items.

      Response Body Schema

      
       {
           value: [
               {
                   farmerId: String
                   resourceId: String
                   resourceType: String
                   originalFileName: String
                   id: String
                   status: String
                   createdDateTime: OffsetDateTime
                   modifiedDateTime: OffsetDateTime
                   name: String
                   description: String
                   eTag: String
               }
           ]
           skipToken: String
           nextLink: String
       }
       
      Parameters:
      nextLink - The nextLink parameter.
      Returns:
      a DynamicRequest where customizations can be made before sent to the service.
    • invoke

      public DynamicRequest invoke()
      Create an empty DynamicRequest with the serializer and pipeline initialized for this client.
      Returns:
      a DynamicRequest where customizations can be made before sent to the service.