azure.agrifood.farming.models package

class azure.agrifood.farming.models.ApplicationData(*, application_product_details: Optional[List[ApplicationProductDetail]] = None, avg_material: Optional[Measure] = None, total_material: Optional[Measure] = None, area: Optional[Measure] = None, source: Optional[str] = None, operation_modified_date_time: Optional[datetime.datetime] = None, operation_start_date_time: Optional[datetime.datetime] = None, operation_end_date_time: Optional[datetime.datetime] = None, associated_boundary_id: Optional[str] = None, operation_boundary_id: Optional[str] = None, status: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of application data resource.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters
  • application_product_details (list[ApplicationProductDetail]) – Application product details.

  • avg_material (Measure) – Schema for storing measurement reading and unit.

  • total_material (Measure) – Schema for storing measurement reading and unit.

  • area (Measure) – Schema for storing measurement reading and unit.

  • source (str) – Source of the operation data.

  • operation_modified_date_time (datetime) – Modified date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ. Note: this will be specified by the source provider itself.

  • operation_start_date_time (datetime) – Start date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • operation_end_date_time (datetime) – End date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • associated_boundary_id (str) – Optional boundary ID of the field for which operation was applied.

  • operation_boundary_id (str) – Optional boundary ID of the actual area for which operation was applied inside the specified field.

  • status (str) – Status of the resource.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

Variables
  • attachments_link (str) – Link for attachments.

  • farmer_id (str) – Farmer ID which belongs to the operation data.

  • id (str) – Unique resource ID.

  • e_tag (str) – The ETag value to implement optimistic concurrency.

  • created_date_time (datetime) – Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • modified_date_time (datetime) – Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.ApplicationDataListResponse(*, value: Optional[List[ApplicationData]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[ApplicationData]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.ApplicationProductDetail(*, product_name: Optional[str] = None, is_carrier: Optional[bool] = False, avg_material: Optional[Measure] = None, total_material: Optional[Measure] = None, **kwargs)[source]

Schema of product used during application.

Parameters
  • product_name (str) – Name of the product applied.

  • is_carrier (bool) – A flag indicating whether product is a carrier for a tank mix.

  • avg_material (Measure) – Schema for storing measurement reading and unit.

  • total_material (Measure) – Schema for storing measurement reading and unit.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.Attachment(*, resource_id: Optional[str] = None, resource_type: Optional[str] = None, status: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, **kwargs)[source]

Schema of attachment resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • farmer_id (str) – Farmer id for this attachment.

  • original_file_name (str) – Original File Name for this attachment.

  • id (str) – Unique id.

  • created_date_time (datetime) – Date when resource was created.

  • modified_date_time (datetime) – Date when resource was last modified.

  • e_tag (str) – The ETag value to implement optimistic concurrency.

Parameters
  • resource_id (str) – Associated Resource id for this attachment.

  • resource_type (str) – Associated Resource type for this attachment i.e. Farmer, Farm, Field, SeasonalField, Boundary, FarmOperationApplicationData, HarvestData, TillageData, PlantingData.

  • status (str) – Status of the resource.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of resource.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.AttachmentListResponse(*, value: Optional[List[Attachment]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[Attachment]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.Boundary(*, parent_id: Optional[str] = None, geometry: Optional[GeoJsonObject] = None, is_primary: Optional[bool] = None, status: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of boundary resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • farmer_id (str) – Farmer ID.

  • acreage (float) – Boundary area in acres.

  • parent_type (str) – Type of the parent it belongs to.

  • id (str) – Unique resource ID.

  • e_tag (str) – The ETag value to implement optimistic concurrency.

  • created_date_time (datetime) – Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • modified_date_time (datetime) – Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

Parameters
  • parent_id (str) – ID of the parent(field or seasonalField) it belongs to.

  • geometry (GeoJsonObject) – GeoJSON abstract class.

  • is_primary (bool) – Is the boundary primary.

  • status (str) – Status of the resource.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.BoundaryListResponse(*, value: Optional[List[Boundary]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[Boundary]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.BoundaryOverlapResponse(*, boundary_acreage: Optional[float] = None, other_boundary_acreage: Optional[float] = None, intersecting_acreage: Optional[float] = None, **kwargs)[source]

Schema of boundary overlap response.

Parameters
  • boundary_acreage (float) – Acreage of Main boundary.

  • other_boundary_acreage (float) – Acreage of other boundary.

  • intersecting_acreage (float) – Acreage of intersecting boundary.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.CascadeDeleteJob(*, farmer_id: str, resource_id: str, resource_type: str, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of cascade delete job.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • farmer_id (str) – Required. Farmer ID.

  • resource_id (str) – Required. The id of the resource.

  • resource_type (str) – Required. The type of the resource.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

Variables
  • id (str) – Unique job id.

  • status (str) – Status of the job. Possible values: ‘Waiting’, ‘Running’, ‘Succeeded’, ‘Failed’, ‘Cancelled’.

  • duration_in_seconds (float) – Duration of the job in seconds.

  • message (str) – Status message to capture more details of the job.

  • created_date_time (datetime) – Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • last_action_date_time (datetime) – Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • start_time (datetime) – Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • end_time (datetime) – Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.Crop(*, phenotype: Optional[str] = None, status: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of crop resource.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters
  • phenotype (str) – Crop phenotype.

  • status (str) – Status of the resource.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

Variables
  • id (str) – Unique resource ID.

  • e_tag (str) – The ETag value to implement optimistic concurrency.

  • created_date_time (datetime) – Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • modified_date_time (datetime) – Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.CropListResponse(*, value: Optional[List[Crop]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[Crop]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.CropVariety(*, brand: Optional[str] = None, product: Optional[str] = None, status: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of crop variety resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • crop_id (str) – ID of the crop it belongs to.

  • id (str) – Unique resource ID.

  • e_tag (str) – The ETag value to implement optimistic concurrency.

  • created_date_time (datetime) – Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • modified_date_time (datetime) – Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

Parameters
  • brand (str) – CropVariety Brand.

  • product (str) – CropVariety product.

  • status (str) – Status of the resource.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.CropVarietyListResponse(*, value: Optional[List[CropVariety]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[CropVariety]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.Error(*, code: Optional[str] = None, message: Optional[str] = None, target: Optional[str] = None, details: Optional[List[Error]] = None, innererror: Optional[InnerError] = None, **kwargs)[source]

An error from the Azure AgPlatform service.

Parameters
  • code (str) – Server-defined set of error codes.

  • message (str) – Human-readable representation of the error.

  • target (str) – Target of the error.

  • details (list[Error]) – Array of details about specific errors that led to this reported error.

  • innererror (InnerError) –

    Inner error containing list of errors.

    <see href="https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object">InnerError reference document</see>.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.ErrorResponse(*, error: Optional[Error] = None, trace_id: Optional[str] = None, **kwargs)[source]

An error response from the Azure AgPlatform service.

<see href="https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses">ErrorResponse reference document.</see>.

param error

An error from the Azure AgPlatform service.

type error

~azure.agrifood.farming.models.Error

param trace_id

Unique trace ID.

type trace_id

str

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.Farm(*, status: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of farm resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • farmer_id (str) – Farmer ID.

  • id (str) – Unique resource ID.

  • e_tag (str) – The ETag value to implement optimistic concurrency.

  • created_date_time (datetime) – Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • modified_date_time (datetime) – Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

Parameters
  • status (str) – Status of the resource.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.FarmListResponse(*, value: Optional[List[Farm]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[Farm]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.FarmOperationDataIngestionJob(*, farmer_id: str, auth_provider_id: str, start_year: int, operations: Optional[List[str]] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of farm operation data ingestion job.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • farmer_id (str) – Required. Farmer ID.

  • auth_provider_id (str) – Required. Authentication provider ID.

  • operations (list[str]) – List of operation types for which data needs to be downloaded. Available values: AllOperations, Application, Planting, Harvest, Tillage.

  • start_year (int) – Required. Start Year (Minimum = 2000, Maximum = CurrentYear).

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

Variables
  • id (str) – Unique job id.

  • status (str) – Status of the job. Possible values: ‘Waiting’, ‘Running’, ‘Succeeded’, ‘Failed’, ‘Cancelled’.

  • duration_in_seconds (float) – Duration of the job in seconds.

  • message (str) – Status message to capture more details of the job.

  • created_date_time (datetime) – Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • last_action_date_time (datetime) – Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • start_time (datetime) – Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • end_time (datetime) – Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.Farmer(*, status: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of farmer resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Unique resource ID.

  • e_tag (str) – The ETag value to implement optimistic concurrency.

  • created_date_time (datetime) – Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • modified_date_time (datetime) – Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

Parameters
  • status (str) – Status of the resource.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.FarmerListResponse(*, value: Optional[List[Farmer]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[Farmer]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.Field(*, farm_id: Optional[str] = None, status: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of field resource.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters
  • farm_id (str) – ID of the associated Farm.

  • status (str) – Status of the resource.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

Variables
  • farmer_id (str) – Farmer ID.

  • primary_boundary_id (str) – Primary boundary id.

  • boundary_ids (list[str]) – Boundary Ids.

  • id (str) – Unique resource ID.

  • e_tag (str) – The ETag value to implement optimistic concurrency.

  • created_date_time (datetime) – Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • modified_date_time (datetime) – Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.FieldListResponse(*, value: Optional[List[Field]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[Field]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.GeoJsonObject(**kwargs)[source]

GeoJSON abstract class.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: MultiPolygon, Point, Polygon.

All required parameters must be populated in order to send to Azure.

Parameters

type (str or GeoJsonObjectType) – Required. GeoJSON object type.Constant filled by server. Possible values include: “Point”, “Polygon”, “MultiPolygon”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.HarvestData(*, total_yield: Optional[Measure] = None, avg_yield: Optional[Measure] = None, total_wet_mass: Optional[Measure] = None, avg_wet_mass: Optional[Measure] = None, avg_moisture: Optional[Measure] = None, avg_speed: Optional[Measure] = None, harvest_product_details: Optional[List[HarvestProductDetail]] = None, area: Optional[Measure] = None, source: Optional[str] = None, operation_modified_date_time: Optional[datetime.datetime] = None, operation_start_date_time: Optional[datetime.datetime] = None, operation_end_date_time: Optional[datetime.datetime] = None, associated_boundary_id: Optional[str] = None, operation_boundary_id: Optional[str] = None, status: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of harvest data resource.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters
  • total_yield (Measure) – Schema for storing measurement reading and unit.

  • avg_yield (Measure) – Schema for storing measurement reading and unit.

  • total_wet_mass (Measure) – Schema for storing measurement reading and unit.

  • avg_wet_mass (Measure) – Schema for storing measurement reading and unit.

  • avg_moisture (Measure) – Schema for storing measurement reading and unit.

  • avg_speed (Measure) – Schema for storing measurement reading and unit.

  • harvest_product_details (list[HarvestProductDetail]) – Harvest product details.

  • area (Measure) – Schema for storing measurement reading and unit.

  • source (str) – Source of the operation data.

  • operation_modified_date_time (datetime) – Modified date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ. Note: this will be specified by the source provider itself.

  • operation_start_date_time (datetime) – Start date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • operation_end_date_time (datetime) – End date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • associated_boundary_id (str) – Optional boundary ID of the field for which operation was applied.

  • operation_boundary_id (str) – Optional boundary ID of the actual area for which operation was applied inside the specified field.

  • status (str) – Status of the resource.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

Variables
  • attachments_link (str) – Link for attachments.

  • farmer_id (str) – Farmer ID which belongs to the operation data.

  • id (str) – Unique resource ID.

  • e_tag (str) – The ETag value to implement optimistic concurrency.

  • created_date_time (datetime) – Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • modified_date_time (datetime) – Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.HarvestDataListResponse(*, value: Optional[List[HarvestData]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[HarvestData]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.HarvestProductDetail(*, product_name: Optional[str] = None, area: Optional[Measure] = None, total_yield: Optional[Measure] = None, avg_yield: Optional[Measure] = None, avg_moisture: Optional[Measure] = None, total_wet_mass: Optional[Measure] = None, avg_wet_mass: Optional[Measure] = None, **kwargs)[source]

Schema of product used during harvesting.

Parameters
  • product_name (str) – Name of the product.

  • area (Measure) – Schema for storing measurement reading and unit.

  • total_yield (Measure) – Schema for storing measurement reading and unit.

  • avg_yield (Measure) – Schema for storing measurement reading and unit.

  • avg_moisture (Measure) – Schema for storing measurement reading and unit.

  • total_wet_mass (Measure) – Schema for storing measurement reading and unit.

  • avg_wet_mass (Measure) – Schema for storing measurement reading and unit.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.ImageFile(*, name: str, file_link: Optional[str] = None, image_format: Union[str, ImageFormat, None] = None, resolution: Optional[float] = None, **kwargs)[source]

Schema of image file resource.

All required parameters must be populated in order to send to Azure.

Parameters
  • file_link (str) – Link of the image file.

  • name (str) – Required. Name of the image file.

  • image_format (str or ImageFormat) – Supported image formats for scene resource. Possible values include: “TIF”.

  • resolution (float) – Resolution of image file in meters.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.ImageProcessingRasterizeJob(*, farmer_id: str, shapefile_attachment_id: str, shapefile_column_names: List[str], name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

ImageProcessingRasterizeJob.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • farmer_id (str) – Required. Farmer ID.

  • shapefile_attachment_id (str) – Required. Shapefile attachment ID.

  • shapefile_column_names (list[str]) – Required. List of shapefile column names to create raster attachments.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

Variables
  • id (str) – Unique job id.

  • status (str) – Status of the job. Possible values: ‘Waiting’, ‘Running’, ‘Succeeded’, ‘Failed’, ‘Cancelled’.

  • duration_in_seconds (float) – Duration of the job in seconds.

  • message (str) – Status message to capture more details of the job.

  • created_date_time (datetime) – Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • last_action_date_time (datetime) – Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • start_time (datetime) – Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • end_time (datetime) – Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.InnerError(*, additional_properties: Optional[Dict[str, Any]] = None, code: Optional[str] = None, innererror: Optional[InnerError] = None, **kwargs)[source]

Inner error containing list of errors.

<see href="https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object">InnerError reference document</see>.

param additional_properties

Unmatched properties from the message are deserialized to this collection.

type additional_properties

dict[str, any]

param code

Specific error code than was provided by the containing error.

type code

str

param innererror

Inner error containing list of errors.

<see href="https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object">InnerError reference document</see>.

type innererror

~azure.agrifood.farming.models.InnerError

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.Location(*, latitude: float, longitude: float, **kwargs)[source]

Location model class.

All required parameters must be populated in order to send to Azure.

Parameters
  • latitude (float) – Required. Latitude of the location.

  • longitude (float) – Required. Longitude of the location.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.Measure(*, unit: Optional[str] = None, value: Optional[float] = None, **kwargs)[source]

Schema for storing measurement reading and unit.

Parameters
  • unit (str) – Data unit.

  • value (float) – Data value.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.MultiPolygon(*, coordinates: List[List[List[List[float]]]], **kwargs)[source]

MultiPolygon geometry.

All required parameters must be populated in order to send to Azure.

Parameters
  • coordinates (list[list[list[list[float]]]]) – Required. Gets or sets Coordinates of GeoJSON Object. It must be an array of polygons, each polygon contains list of linear rings. For Polygons with more than one of these rings, the first MUST be the exterior ring, and any others MUST be interior rings.

  • type (str or GeoJsonObjectType) – Required. GeoJSON object type.Constant filled by server. Possible values include: “Point”, “Polygon”, “MultiPolygon”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.MultiPolygonCoordinates(*, coordinates: List[List[List[List[float]]]], **kwargs)[source]

Schema of multi polygon coordinates.

All required parameters must be populated in order to send to Azure.

Parameters

coordinates (list[list[list[list[float]]]]) – Required. Gets or sets Coordinates of GeoJSON Object. It must be an array of polygons, each polygon contains list of linear rings. For Polygons with more than one of these rings, the first MUST be the exterior ring, and any others MUST be interior rings.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.OAuthConnectRequest(*, farmer_id: str, o_auth_provider_id: str, user_redirect_link: str, user_redirect_state: Optional[str] = None, **kwargs)[source]

Get OAuth config query parameters.

All required parameters must be populated in order to send to Azure.

Parameters
  • farmer_id (str) – Required. ID of the farmer.

  • o_auth_provider_id (str) – Required. ID of the OAuthProvider.

  • user_redirect_link (str) – Required. Link to redirect the user to, at the end of the oauth flow.

  • user_redirect_state (str) – State to provide back when redirecting the user, at the end of the oauth flow.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.OAuthProvider(*, app_id: Optional[str] = None, app_secret: Optional[str] = None, api_key: Optional[str] = None, is_production_app: Optional[bool] = False, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of OAuth provider resource.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters
  • app_id (str) – OAuth App ID for given OAuth Provider.

  • app_secret (str) – OAuth App secret for given Provider. Note: Won’t be sent in response.

  • api_key (str) – OAuth Api key for given Provider. Note: currently Applicable to Climate provider. Won’t be sent in response.

  • is_production_app (bool) – An optional flag to determine if the App is ready to be used for Production scenarios in the provider side or not. (Default value: false) Note: Currently applicable for JohnDeere.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

Variables
  • id (str) – Unique OAuth provider ID.

  • e_tag (str) – The ETag value to implement optimistic concurrency.

  • created_date_time (datetime) – Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • modified_date_time (datetime) – Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.OAuthProviderListResponse(*, value: Optional[List[OAuthProvider]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[OAuthProvider]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.OAuthToken(*, farmer_id: str, auth_provider_id: str, is_valid: Optional[bool] = True, **kwargs)[source]

Schema of OAuth token resource.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • farmer_id (str) – Required. Farmer ID for this OAuth config.

  • auth_provider_id (str) – Required. ID of the OAuth provider resource containing app information.

  • is_valid (bool) – An optional flag indicating whether the token is a valid or expired (Default value: true).

Variables
  • e_tag (str) – The ETag value to implement optimistic concurrency.

  • created_date_time (datetime) – Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • modified_date_time (datetime) – Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.OAuthTokenListResponse(*, value: Optional[List[OAuthToken]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[OAuthToken]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.Paths1LxjoxzFarmersFarmeridAttachmentsAttachmentidPatchRequestbodyContentMultipartFormDataSchema(*, file: Optional[IO] = None, farmer_id: Optional[str] = None, resource_id: Optional[str] = None, resource_type: Optional[str] = None, original_file_name: Optional[str] = None, id: Optional[str] = None, status: Optional[str] = None, created_date_time: Optional[str] = None, modified_date_time: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, e_tag: Optional[str] = None, **kwargs)[source]

Paths1LxjoxzFarmersFarmeridAttachmentsAttachmentidPatchRequestbodyContentMultipartFormDataSchema.

Parameters
  • file (IO) – File to be uploaded.

  • farmer_id (str) – Farmer id for this attachment.

  • resource_id (str) – Associated Resource id for this attachment.

  • resource_type (str) – Associated Resource type for this attachment i.e. Farmer, Farm, Field, SeasonalField, Boundary, FarmOperationApplicationData, HarvestData, TillageData, PlantingData.

  • original_file_name (str) – Original File Name for this attachment.

  • id (str) – Unique id.

  • status (str) – Status of the resource.

  • created_date_time (str) – Date when resource was created.

  • modified_date_time (str) – Date when resource was last modified.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of resource.

  • e_tag (str) – The ETag value to implement optimistic concurrency.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.PlantingData(*, avg_planting_rate: Optional[Measure] = None, total_material: Optional[Measure] = None, avg_material: Optional[Measure] = None, planting_product_details: Optional[List[PlantingProductDetail]] = None, area: Optional[Measure] = None, source: Optional[str] = None, operation_modified_date_time: Optional[datetime.datetime] = None, operation_start_date_time: Optional[datetime.datetime] = None, operation_end_date_time: Optional[datetime.datetime] = None, associated_boundary_id: Optional[str] = None, operation_boundary_id: Optional[str] = None, status: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of planting data resource.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters
  • avg_planting_rate (Measure) – Schema for storing measurement reading and unit.

  • total_material (Measure) – Schema for storing measurement reading and unit.

  • avg_material (Measure) – Schema for storing measurement reading and unit.

  • planting_product_details (list[PlantingProductDetail]) – Planting product details.

  • area (Measure) – Schema for storing measurement reading and unit.

  • source (str) – Source of the operation data.

  • operation_modified_date_time (datetime) – Modified date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ. Note: this will be specified by the source provider itself.

  • operation_start_date_time (datetime) – Start date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • operation_end_date_time (datetime) – End date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • associated_boundary_id (str) – Optional boundary ID of the field for which operation was applied.

  • operation_boundary_id (str) – Optional boundary ID of the actual area for which operation was applied inside the specified field.

  • status (str) – Status of the resource.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

Variables
  • attachments_link (str) – Link for attachments.

  • farmer_id (str) – Farmer ID which belongs to the operation data.

  • id (str) – Unique resource ID.

  • e_tag (str) – The ETag value to implement optimistic concurrency.

  • created_date_time (datetime) – Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • modified_date_time (datetime) – Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.PlantingDataListResponse(*, value: Optional[List[PlantingData]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[PlantingData]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.PlantingProductDetail(*, product_name: Optional[str] = None, area: Optional[Measure] = None, total_material: Optional[Measure] = None, avg_material: Optional[Measure] = None, **kwargs)[source]

Schema for Planting product detail.

Parameters
  • product_name (str) – Name of the product.

  • area (Measure) – Schema for storing measurement reading and unit.

  • total_material (Measure) – Schema for storing measurement reading and unit.

  • avg_material (Measure) – Schema for storing measurement reading and unit.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.Point(*, coordinates: List[float], **kwargs)[source]

Point geometry.

All required parameters must be populated in order to send to Azure.

Parameters
  • coordinates (list[float]) – Required. Gets or sets the coordinate of this point. It must be an array of 2 or 3 elements for a 2D or 3D system.

  • type (str or GeoJsonObjectType) – Required. GeoJSON object type.Constant filled by server. Possible values include: “Point”, “Polygon”, “MultiPolygon”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.PointCoordinates(*, coordinates: List[float], **kwargs)[source]

Schema of the coordinates of a point.

All required parameters must be populated in order to send to Azure.

Parameters

coordinates (list[float]) – Required. Gets or sets the coordinate of this point. It must be an array of 2 or 3 elements for a 2D or 3D system.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.Polygon(*, coordinates: List[List[List[float]]], **kwargs)[source]

Polygon geometry.

All required parameters must be populated in order to send to Azure.

Parameters
  • coordinates (list[list[list[float]]]) – Required. Gets or sets type of the GeoJSON Object. It must be an array of linear ring coordinate arrays. For Polygons with more than one of these rings, the first MUST be the exterior ring, and any others MUST be interior rings.

  • type (str or GeoJsonObjectType) – Required. GeoJSON object type.Constant filled by server. Possible values include: “Point”, “Polygon”, “MultiPolygon”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.PolygonCoordinates(*, coordinates: List[List[List[float]]], **kwargs)[source]

Schema of polygon coordinates.

All required parameters must be populated in order to send to Azure.

Parameters

coordinates (list[list[list[float]]]) – Required. Gets or sets type of the GeoJSON Object. It must be an array of linear ring coordinate arrays. For Polygons with more than one of these rings, the first MUST be the exterior ring, and any others MUST be interior rings.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.SatelliteData(*, image_names: Optional[List[str]] = None, image_formats: Optional[List[str]] = None, image_resolutions: Optional[List[float]] = None, **kwargs)[source]

Data Model for SatelliteIngestionJobRequest.

Parameters
  • image_names (list[str]) – List of ImageNames.

  • image_formats (list[str]) – List of ImageFormats. Available value: TIF.

  • image_resolutions (list[float]) – List of ImageResolutions in meters. Available values: 10, 20, 60.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.SatelliteDataIngestionJob(*, farmer_id: str, boundary_id: str, start_date_time: datetime.datetime, end_date_time: datetime.datetime, provider: Union[str, DataProvider, None] = None, source: Union[str, Source, None] = None, data: Optional[SatelliteData] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of satellite data ingestion job.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • farmer_id (str) – Required. Farmer ID.

  • boundary_id (str) – Required. The id of the boundary object for which satellite data is being fetched.

  • start_date_time (datetime) – Required. Start Date.

  • end_date_time (datetime) – Required. End Date.

  • provider (str or DataProvider) – Provider of satellite data. Possible values include: “Microsoft”.

  • source (str or Source) – Source of satellite data. Possible values include: “Sentinel_2_L2A”.

  • data (SatelliteData) – Data Model for SatelliteIngestionJobRequest.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

Variables
  • id (str) – Unique job id.

  • status (str) – Status of the job. Possible values: ‘Waiting’, ‘Running’, ‘Succeeded’, ‘Failed’, ‘Cancelled’.

  • duration_in_seconds (float) – Duration of the job in seconds.

  • message (str) – Status message to capture more details of the job.

  • created_date_time (datetime) – Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • last_action_date_time (datetime) – Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • start_time (datetime) – Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • end_time (datetime) – Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.Scene(*, scene_date_time: Optional[datetime.datetime] = None, provider: Optional[str] = None, source: Optional[str] = None, image_files: Optional[List[ImageFile]] = None, image_format: Union[str, ImageFormat, None] = None, cloud_cover_percentage: Optional[float] = None, dark_pixel_percentage: Optional[float] = None, ndvi_median_value: Optional[float] = None, boundary_id: Optional[str] = None, farmer_id: Optional[str] = None, id: Optional[str] = None, **kwargs)[source]

Schema of scene resource.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters
  • scene_date_time (datetime) – Date-time of the scene, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • provider (str) – Data provider of the scene.

  • source (str) – Data source of the scene.

  • image_files (list[ImageFile]) – Collection of image files.

  • image_format (str or ImageFormat) – Supported image formats for scene resource. Possible values include: “TIF”.

  • cloud_cover_percentage (float) – Cloud cover percentage of the scene.

  • dark_pixel_percentage (float) – Dark pixel percentage of the scene.

  • ndvi_median_value (float) – Median of NDVI of the scene.

  • boundary_id (str) – Boundary ID which belongs to the scene.

  • farmer_id (str) – Farmer ID which belongs to the scene.

  • id (str) – Unique scene resource ID.

Variables

e_tag (str) – The ETag value to implement optimistic concurrency.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.SceneListResponse(*, value: Optional[List[Scene]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[Scene]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.SearchBoundaryQuery(*, ids: Optional[List[str]] = None, names: Optional[List[str]] = None, property_filters: Optional[List[str]] = None, statuses: Optional[List[str]] = None, min_created_date_time: Optional[datetime.datetime] = None, max_created_date_time: Optional[datetime.datetime] = None, min_last_modified_date_time: Optional[datetime.datetime] = None, max_last_modified_date_time: Optional[datetime.datetime] = None, max_page_size: Optional[int] = 50, skip_token: Optional[str] = None, is_primary: Optional[bool] = None, parent_type: Optional[str] = None, parent_ids: Optional[List[str]] = None, min_acreage: Optional[float] = None, max_acreage: Optional[float] = None, intersects_with_geometry: Optional[GeoJsonObject] = None, **kwargs)[source]

SearchAllBoundaries and SearchBoundaries parameters.

Parameters
  • ids (list[str]) – Ids of the resource.

  • names (list[str]) – Names of the resource.

  • property_filters (list[str]) – Filters on key-value pairs within the Properties object. eg. “{testKey} eq {testValue}”.

  • statuses (list[str]) – Statuses of the resource.

  • min_created_date_time (datetime) – Minimum creation date of resource (inclusive).

  • max_created_date_time (datetime) – Maximum creation date of resource (inclusive).

  • min_last_modified_date_time (datetime) – Minimum last modified date of resource (inclusive).

  • max_last_modified_date_time (datetime) – Maximum last modified date of resource (inclusive).

  • max_page_size (int) – Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50.

  • skip_token (str) – Skip token for getting next set of results.

  • is_primary (bool) – Is the boundary primary.

  • parent_type (str) – Type of the parent it belongs to.

  • parent_ids (list[str]) – Parent Ids of the resource.

  • min_acreage (float) – Minimum acreage of the boundary (inclusive).

  • max_acreage (float) – Maximum acreage of the boundary (inclusive).

  • intersects_with_geometry (GeoJsonObject) – GeoJSON abstract class.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.Season(*, start_date_time: Optional[datetime.datetime] = None, end_date_time: Optional[datetime.datetime] = None, year: Optional[int] = None, status: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of season resource.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters
  • start_date_time (datetime) – Season start datetime, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • end_date_time (datetime) – Season end datetime, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • year (int) – Season year.

  • status (str) – Status of the resource.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

Variables
  • id (str) – Unique resource ID.

  • e_tag (str) – The ETag value to implement optimistic concurrency.

  • created_date_time (datetime) – Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • modified_date_time (datetime) – Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.SeasonListResponse(*, value: Optional[List[Season]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[Season]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.SeasonalField(*, farm_id: Optional[str] = None, field_id: Optional[str] = None, season_id: Optional[str] = None, crop_variety_ids: Optional[List[str]] = None, crop_id: Optional[str] = None, avg_yield_value: Optional[float] = None, avg_yield_unit: Optional[str] = None, avg_seed_population_value: Optional[float] = None, avg_seed_population_unit: Optional[str] = None, planting_date_time: Optional[datetime.datetime] = None, status: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of seasonal field resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • farmer_id (str) – Farmer ID.

  • primary_boundary_id (str) – Primary boundary id.

  • boundary_ids (list[str]) – Boundary Ids.

  • id (str) – Unique resource ID.

  • e_tag (str) – The ETag value to implement optimistic concurrency.

  • created_date_time (datetime) – Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • modified_date_time (datetime) – Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

Parameters
  • farm_id (str) – ID of the associated Farm.

  • field_id (str) – ID of the associated Field.

  • season_id (str) – ID of the season it belongs to.

  • crop_variety_ids (list[str]) – CropVariety ids.

  • crop_id (str) – ID of the crop it belongs to.

  • avg_yield_value (float) – Average yield value of the seasonal field.

  • avg_yield_unit (str) – Unit of the average yield value attribute.

  • avg_seed_population_value (float) – Average seed population value of the seasonal field.

  • avg_seed_population_unit (str) – Unit of average seed population value attribute.

  • planting_date_time (datetime) – Planting datetime, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • status (str) – Status of the resource.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.SeasonalFieldListResponse(*, value: Optional[List[SeasonalField]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[SeasonalField]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.TillageData(*, tillage_depth: Optional[Measure] = None, tillage_pressure: Optional[Measure] = None, area: Optional[Measure] = None, source: Optional[str] = None, operation_modified_date_time: Optional[datetime.datetime] = None, operation_start_date_time: Optional[datetime.datetime] = None, operation_end_date_time: Optional[datetime.datetime] = None, associated_boundary_id: Optional[str] = None, operation_boundary_id: Optional[str] = None, status: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of tillage data resource.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters
  • tillage_depth (Measure) – Schema for storing measurement reading and unit.

  • tillage_pressure (Measure) – Schema for storing measurement reading and unit.

  • area (Measure) – Schema for storing measurement reading and unit.

  • source (str) – Source of the operation data.

  • operation_modified_date_time (datetime) – Modified date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ. Note: this will be specified by the source provider itself.

  • operation_start_date_time (datetime) – Start date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • operation_end_date_time (datetime) – End date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • associated_boundary_id (str) – Optional boundary ID of the field for which operation was applied.

  • operation_boundary_id (str) – Optional boundary ID of the actual area for which operation was applied inside the specified field.

  • status (str) – Status of the resource.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

Variables
  • attachments_link (str) – Link for attachments.

  • farmer_id (str) – Farmer ID which belongs to the operation data.

  • id (str) – Unique resource ID.

  • e_tag (str) – The ETag value to implement optimistic concurrency.

  • created_date_time (datetime) – Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • modified_date_time (datetime) – Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.TillageDataListResponse(*, value: Optional[List[TillageData]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[TillageData]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.WeatherData(*, farmer_id: str, boundary_id: str, extension_id: str, location: azure.agrifood.farming.models._models_py3.Location, date_time: datetime.datetime, extension_version: str, weather_data_type: str, granularity: str, unit_system_code: Optional[str] = None, cloud_cover: Optional[Measure] = None, dew_point: Optional[Measure] = None, growing_degree_day: Optional[Measure] = None, precipitation: Optional[Measure] = None, pressure: Optional[Measure] = None, relative_humidity: Optional[Measure] = None, soil_moisture: Optional[Measure] = None, soil_temperature: Optional[Measure] = None, temperature: Optional[Measure] = None, visibility: Optional[Measure] = None, wet_bulb_temperature: Optional[Measure] = None, wind_chill: Optional[Measure] = None, wind_direction: Optional[Measure] = None, wind_gust: Optional[Measure] = None, wind_speed: Optional[Measure] = None, id: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of weather data.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • farmer_id (str) – Required. Farmer ID.

  • boundary_id (str) – Required. Boundary ID.

  • extension_id (str) – Required. ID of the weather extension.

  • location (Location) – Required. Location model class.

  • date_time (datetime) – Required. Date-time of the weather data, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • unit_system_code (str) – Unit System like US/SI etc.

  • extension_version (str) – Required. Version of the weather data extension.

  • weather_data_type (str) – Required. Type of weather data (forecast/historical).

  • granularity (str) – Required. Granularity of weather data (daily/hourly).

  • cloud_cover (Measure) – Schema for storing measurement reading and unit.

  • dew_point (Measure) – Schema for storing measurement reading and unit.

  • growing_degree_day (Measure) – Schema for storing measurement reading and unit.

  • precipitation (Measure) – Schema for storing measurement reading and unit.

  • pressure (Measure) – Schema for storing measurement reading and unit.

  • relative_humidity (Measure) – Schema for storing measurement reading and unit.

  • soil_moisture (Measure) – Schema for storing measurement reading and unit.

  • soil_temperature (Measure) – Schema for storing measurement reading and unit.

  • temperature (Measure) – Schema for storing measurement reading and unit.

  • visibility (Measure) – Schema for storing measurement reading and unit.

  • wet_bulb_temperature (Measure) – Schema for storing measurement reading and unit.

  • wind_chill (Measure) – Schema for storing measurement reading and unit.

  • wind_direction (Measure) – Schema for storing measurement reading and unit.

  • wind_gust (Measure) – Schema for storing measurement reading and unit.

  • wind_speed (Measure) – Schema for storing measurement reading and unit.

  • id (str) – Weather data ID.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

Variables
  • e_tag (str) – The ETag value to implement optimistic concurrency.

  • created_date_time (datetime) – Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

  • modified_date_time (datetime) – Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.WeatherDataDeleteJob(*, extension_id: str, farmer_id: str, boundary_id: str, weather_data_type: Optional[str] = None, granularity: Optional[str] = None, start_date_time: Optional[datetime.datetime] = None, end_date_time: Optional[datetime.datetime] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of weather data delete job.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • extension_id (str) – Required. ID of the extension to be used for the providerInput. eg. DTN.ClearAg.

  • farmer_id (str) – Required. The id of the farmer object for which weather data is being fetched.

  • boundary_id (str) – Required. The id of the boundary object for which weather data is being fetched.

  • weather_data_type (str) – Type of weather data. Possible values include: ‘forecast’ , ‘historical’.

  • granularity (str) – Granularity of weather data. Possible values include: ‘daily’ , ‘hourly’.

  • start_date_time (datetime) – Weather data start UTC date-time (inclusive), sample format: yyyy-MM-ddTHH:mm:ssZ.

  • end_date_time (datetime) – Weather data end UTC date-time (inclusive), sample format: yyyy-MM-ddTHH:mm:ssZ.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

Variables
  • id (str) – Unique job id.

  • status (str) – Status of the job. Possible values: ‘Waiting’, ‘Running’, ‘Succeeded’, ‘Failed’, ‘Cancelled’.

  • duration_in_seconds (float) – Duration of the job in seconds.

  • message (str) – Status message to capture more details of the job.

  • created_date_time (datetime) – Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • last_action_date_time (datetime) – Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • start_time (datetime) – Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • end_time (datetime) – Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.WeatherDataIngestionJob(*, boundary_id: str, farmer_id: str, extension_id: str, extension_api_name: str, extension_api_input: Dict[str, Any], extension_data_provider_app_id: Optional[str] = None, extension_data_provider_api_key: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, **kwargs)[source]

Schema of weather ingestion job.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • boundary_id (str) – Required. The id of the boundary object for which weather data is being fetched.

  • farmer_id (str) – Required. The id of the farmer object for which weather data is being fetched.

  • extension_id (str) – Required. ID of the extension to be used for the providerInput. eg. DTN.ClearAg.

  • extension_api_name (str) – Required. Extension api name to which request is to be made.

  • extension_api_input (dict[str, any]) – Required. Extension api input dictionary which would be used to feed request query/body/parameter information.

  • extension_data_provider_app_id (str) – App id of the weather data provider.

  • extension_data_provider_api_key (str) – Api key of the weather data provider.

  • name (str) – Name to identify resource.

  • description (str) – Textual description of the resource.

  • properties (dict[str, any]) – A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string and numeral values are supported.

Variables
  • id (str) – Unique job id.

  • status (str) – Status of the job. Possible values: ‘Waiting’, ‘Running’, ‘Succeeded’, ‘Failed’, ‘Cancelled’.

  • duration_in_seconds (float) – Duration of the job in seconds.

  • message (str) – Status message to capture more details of the job.

  • created_date_time (datetime) – Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • last_action_date_time (datetime) – Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • start_time (datetime) – Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.

  • end_time (datetime) – Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.WeatherDataListResponse(*, value: Optional[List[WeatherData]] = None, skip_token: Optional[str] = None, next_link: Optional[str] = None, **kwargs)[source]

Paged response contains list of requested objects and a URL link to get the next set of results.

Parameters
  • value (list[WeatherData]) – List of requested objects.

  • skip_token (str) – Token used in retrieving the next page. If null, there are no additional pages.

  • next_link (str) – Continuation link (absolute URI) to the next page of results in the list.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.agrifood.farming.models.DataProvider[source]

Provider of satellite data.

MICROSOFT = 'Microsoft'
class azure.agrifood.farming.models.GeoJsonObjectType[source]

GeoJSON object type.

MULTI_POLYGON = 'MultiPolygon'
POINT = 'Point'
POLYGON = 'Polygon'
class azure.agrifood.farming.models.ImageFormat[source]

Supported image formats for scene resource.

TIF = 'TIF'
class azure.agrifood.farming.models.Source[source]

Source of satellite data.

SENTINEL2_L2_A = 'Sentinel_2_L2A'