# coding: utf-8

"""
    OurSky SDA

    The basic flow for a new organization is as follows: 1. View the available satellite targets with the [satellite targets](#tag/satellite-targets/[get]/v1/satellite-targets) endpoint. Copy the id of the target you want to observe. 2. Create an organization target with the [organization target](#tag/organization-targets/[get]/v1/organization-targets) endpoint. Use the id copied from above. 3. Create a webhook with the [webhook](#tag/webhooks/[post]/v1/communications/webhook) endpoint to receive TDMs automatically (preferred) or use the [tdms](#tag/tdms/[get]/v1/tdms) endpoint to poll for TDMs.

    The version of the OpenAPI document: 1.3.3693
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


from __future__ import annotations
import pprint
import re  # noqa: F401
import json


from typing import Union
from pydantic import BaseModel, Field, StrictFloat, StrictInt

class AstrometricOffsets(BaseModel):
    """
    astrometricOffsets  # noqa: E501
    """
    ra_plate_solve_offset_average: Union[StrictFloat, StrictInt] = Field(..., alias="raPlateSolveOffsetAverage", description="the average offset from the star catalog (NOMAD or GAIA DR3) for right ascension in degrees in EME2000 frame")
    ra_plate_solve_offset_std_dev: Union[StrictFloat, StrictInt] = Field(..., alias="raPlateSolveOffsetStdDev", description="the standard deviation of offset from the star catalog (NOMAD or GAIA DR3) for right ascension in degrees in EME2000 frame")
    dec_plate_solve_offset_average: Union[StrictFloat, StrictInt] = Field(..., alias="decPlateSolveOffsetAverage", description="the average offset from the star catalog (NOMAD or GAIA DR3) for declination in degrees in EME2000 frame")
    dec_plate_solve_offset_std_dev: Union[StrictFloat, StrictInt] = Field(..., alias="decPlateSolveOffsetStdDev", description="the standard deviation of offset from the star catalog (NOMAD or GAIA DR3) for declination in degrees in EME2000 frame")
    fwhm_std_dev: Union[StrictFloat, StrictInt] = Field(..., alias="fwhmStdDev", description="The standard deviation of the full-width-half-max of all stars in the image measured in arcseconds")
    fwhm_average: Union[StrictFloat, StrictInt] = Field(..., alias="fwhmAverage", description="The average of the full-width-half-max of all stars in the image measured in arcseconds")
    __properties = ["raPlateSolveOffsetAverage", "raPlateSolveOffsetStdDev", "decPlateSolveOffsetAverage", "decPlateSolveOffsetStdDev", "fwhmStdDev", "fwhmAverage"]

    class Config:
        """Pydantic configuration"""
        allow_population_by_field_name = True
        validate_assignment = True

    def to_str(self) -> str:
        """Returns the string representation of the model using alias"""
        return pprint.pformat(self.dict(by_alias=True))

    def to_json(self) -> str:
        """Returns the JSON representation of the model using alias"""
        return json.dumps(self.to_dict())

    @classmethod
    def from_json(cls, json_str: str) -> AstrometricOffsets:
        """Create an instance of AstrometricOffsets from a JSON string"""
        return cls.from_dict(json.loads(json_str))

    def to_dict(self):
        """Returns the dictionary representation of the model using alias"""
        _dict = self.dict(by_alias=True,
                          exclude={
                          },
                          exclude_none=True)
        return _dict

    @classmethod
    def from_dict(cls, obj: dict) -> AstrometricOffsets:
        """Create an instance of AstrometricOffsets from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return AstrometricOffsets.parse_obj(obj)

        _obj = AstrometricOffsets.parse_obj({
            "ra_plate_solve_offset_average": obj.get("raPlateSolveOffsetAverage"),
            "ra_plate_solve_offset_std_dev": obj.get("raPlateSolveOffsetStdDev"),
            "dec_plate_solve_offset_average": obj.get("decPlateSolveOffsetAverage"),
            "dec_plate_solve_offset_std_dev": obj.get("decPlateSolveOffsetStdDev"),
            "fwhm_std_dev": obj.get("fwhmStdDev"),
            "fwhm_average": obj.get("fwhmAverage")
        })
        return _obj


