Class CropProductsClient
java.lang.Object
com.azure.verticals.agrifood.farming.CropProductsClient
Initializes a new instance of the synchronous FarmBeatsClient type.
-
Method Summary
Modifier and TypeMethodDescriptioncom.azure.core.http.rest.Response<com.azure.core.util.BinaryData>
createOrUpdateWithResponse
(String cropProductId, com.azure.core.util.BinaryData cropProduct, com.azure.core.http.rest.RequestOptions requestOptions) Creates or updates a crop Product resource.com.azure.core.http.rest.Response<Void>
deleteWithResponse
(String cropProductId, com.azure.core.http.rest.RequestOptions requestOptions) Deletes a specified crop Product resource.com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>
getWithResponse
(String cropProductId, com.azure.core.http.rest.RequestOptions requestOptions) Gets a specified crop Product resource.com.azure.core.http.rest.PagedIterable<com.azure.core.util.BinaryData>
list
(com.azure.core.http.rest.RequestOptions requestOptions) Returns a paginated list of crop product resources.
-
Method Details
-
list
public com.azure.core.http.rest.PagedIterable<com.azure.core.util.BinaryData> list(com.azure.core.http.rest.RequestOptions requestOptions) Returns a paginated list of crop product resources.Query Parameters
Query Parameters Name Type Required Description cropIds List<String> No CropIds of the resource. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String)
to add string to array.brands List<String> No Brands of the resource. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String)
to add string to array.products List<String> No Products of the resource. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String)
to add string to array.traits List<String> No Traits of the resource. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String)
to add string to array.ids List<String> No Ids of the resource. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String)
to add string to array.names List<String> No Names of the resource. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String)
to add string to array.propertyFilters List<String> No Filters on key-value pairs within the Properties object. eg. "{testKey} eq {testValue}". Call RequestOptions.addQueryParam(java.lang.String, java.lang.String)
to add string to array.statuses List<String> No Statuses of the resource. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String)
to add string to array.minCreatedDateTime OffsetDateTime No Minimum creation date of resource (inclusive). maxCreatedDateTime OffsetDateTime No Maximum creation date of resource (inclusive). minLastModifiedDateTime OffsetDateTime No Minimum last modified date of resource (inclusive). maxLastModifiedDateTime OffsetDateTime No Maximum last modified date of resource (inclusive). maxPageSize Integer No Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50. skipToken String No Skip token for getting next set of results. RequestOptions.addQueryParam(java.lang.String, java.lang.String)
Response Body Schema
{ cropIds (Optional): [ String (Optional) ] brand: String (Optional) product: String (Optional) trait: String (Optional) relativeMaturity (Optional): { unit: String (Optional) value: Double (Optional) } treatments (Optional): [ String (Optional) ] id: String (Optional) eTag: String (Optional) status: String (Optional) createdDateTime: OffsetDateTime (Optional) modifiedDateTime: OffsetDateTime (Optional) source: String (Optional) name: String (Optional) description: String (Optional) createdBy: String (Optional) modifiedBy: String (Optional) properties (Optional): { String: Object (Optional) } }
- Parameters:
requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- paged response contains list of requested objects and a URL link to get the next set of results as
paginated response with
PagedIterable
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
getWithResponse
public com.azure.core.http.rest.Response<com.azure.core.util.BinaryData> getWithResponse(String cropProductId, com.azure.core.http.rest.RequestOptions requestOptions) Gets a specified crop Product resource.Response Body Schema
{ cropIds (Optional): [ String (Optional) ] brand: String (Optional) product: String (Optional) trait: String (Optional) relativeMaturity (Optional): { unit: String (Optional) value: Double (Optional) } treatments (Optional): [ String (Optional) ] id: String (Optional) eTag: String (Optional) status: String (Optional) createdDateTime: OffsetDateTime (Optional) modifiedDateTime: OffsetDateTime (Optional) source: String (Optional) name: String (Optional) description: String (Optional) createdBy: String (Optional) modifiedBy: String (Optional) properties (Optional): { String: Object (Optional) } }
- Parameters:
cropProductId
- Id of the crop Product.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a specified crop Product resource along with
Response
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
createOrUpdateWithResponse
public com.azure.core.http.rest.Response<com.azure.core.util.BinaryData> createOrUpdateWithResponse(String cropProductId, com.azure.core.util.BinaryData cropProduct, com.azure.core.http.rest.RequestOptions requestOptions) Creates or updates a crop Product resource.Request Body Schema
{ cropIds (Optional): [ String (Optional) ] brand: String (Optional) product: String (Optional) trait: String (Optional) relativeMaturity (Optional): { unit: String (Optional) value: Double (Optional) } treatments (Optional): [ String (Optional) ] id: String (Optional) eTag: String (Optional) status: String (Optional) createdDateTime: OffsetDateTime (Optional) modifiedDateTime: OffsetDateTime (Optional) source: String (Optional) name: String (Optional) description: String (Optional) createdBy: String (Optional) modifiedBy: String (Optional) properties (Optional): { String: Object (Optional) } }
Response Body Schema
{ cropIds (Optional): [ String (Optional) ] brand: String (Optional) product: String (Optional) trait: String (Optional) relativeMaturity (Optional): { unit: String (Optional) value: Double (Optional) } treatments (Optional): [ String (Optional) ] id: String (Optional) eTag: String (Optional) status: String (Optional) createdDateTime: OffsetDateTime (Optional) modifiedDateTime: OffsetDateTime (Optional) source: String (Optional) name: String (Optional) description: String (Optional) createdBy: String (Optional) modifiedBy: String (Optional) properties (Optional): { String: Object (Optional) } }
- Parameters:
cropProductId
- Id of the crop Product resource.cropProduct
- Crop Product resource payload to create or update.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- schema of crop product resource along with
Response
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
deleteWithResponse
public com.azure.core.http.rest.Response<Void> deleteWithResponse(String cropProductId, com.azure.core.http.rest.RequestOptions requestOptions) Deletes a specified crop Product resource.- Parameters:
cropProductId
- Id of the crop Product.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the
Response
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-