gfwapiclient.resources.fourwings.report.models.response

Global Fishing Watch (GFW) API Python Client - 4Wings Report API Response Models.

Module Contents

Classes

FourWingsReportItem

4Wings report entry.

FourWingsReportResult

Result for 4Wings Report API endpoint.

Data

API

gfwapiclient.resources.fourwings.report.models.response.__all__ = ['FourWingsReportItem', 'FourWingsReportResult']
class gfwapiclient.resources.fourwings.report.models.response.FourWingsReportItem(/, **data: typing.Any)

Bases: gfwapiclient.http.models.ResultItem

4Wings report entry.

Represents a single entry in the 4Wings report result.

Attributes:
date (Optional[str]):

The date of the report entry.

detections (Optional[int]):

The number of detections.

flag (Optional[str]):

The vessel’s flag.

gear_type (Optional[str]):

The vessel’s gear type.

hours (Optional[float]):

The number of hours.

vessel_ids (Optional[int]):

The number of vessel IDs.

vessel_id (Optional[str]):

The vessel ID.

vessel_type (Optional[str]):

The vessel type.

entry_timestamp (Optional[datetime.datetime]):

The entry timestamp.

exit_timestamp (Optional[datetime.datetime]):

The exit timestamp.

first_transmission_date (Optional[datetime.datetime]):

The first transmission date.

last_transmission_date (Optional[datetime.datetime]):

The last transmission date.

imo (Optional[str]):

The IMO number.

mmsi (Optional[str]):

The MMSI number.

call_sign (Optional[str]):

The call sign.

dataset (Optional[str]):

The dataset.

report_dataset (Optional[str]):

The dataset used to create the report.

ship_name (Optional[str]):

The ship name.

lat (Optional[float]):

The latitude.

lon (Optional[float]):

The longitude.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

date: Optional[str] = 'Field(...)'
detections: Optional[int] = 'Field(...)'
flag: Optional[str] = 'Field(...)'
gear_type: Optional[str] = 'Field(...)'
hours: Optional[float] = 'Field(...)'
vessel_ids: Optional[int] = 'Field(...)'
vessel_id: Optional[str] = 'Field(...)'
vessel_type: Optional[str] = 'Field(...)'
entry_timestamp: Optional[datetime.datetime] = 'Field(...)'
exit_timestamp: Optional[datetime.datetime] = 'Field(...)'
first_transmission_date: Optional[datetime.datetime] = 'Field(...)'
last_transmission_date: Optional[datetime.datetime] = 'Field(...)'
imo: Optional[str] = 'Field(...)'
mmsi: Optional[str] = 'Field(...)'
call_sign: Optional[str] = 'Field(...)'
dataset: Optional[str] = 'Field(...)'
report_dataset: Optional[str] = 'Field(...)'
ship_name: Optional[str] = 'Field(...)'
lat: Optional[float] = 'Field(...)'
lon: Optional[float] = 'Field(...)'
classmethod empty_datetime_str_to_none(value: Any) Optional[Any]

Convert any empty datetime string to None.

Args:
value (Any):

The value to validate.

Returns:
Optional[datetime.datetime]:

The validated datetime or None.

class gfwapiclient.resources.fourwings.report.models.response.FourWingsReportResult(data: List[gfwapiclient.resources.fourwings.report.models.response.FourWingsReportItem])

Bases: gfwapiclient.http.models.Result[gfwapiclient.resources.fourwings.report.models.response.FourWingsReportItem]

Result for 4Wings Report API endpoint.

Represents the result of the 4Wings Report API endpoint.

Initialization

Initializes a new FourWingsReportResult.

Args:
data (List[FourWingsReportItem]):

The list of report items.

_result_item_class: Type[gfwapiclient.resources.fourwings.report.models.response.FourWingsReportItem] = None
_data: List[gfwapiclient.resources.fourwings.report.models.response.FourWingsReportItem] = None