Exemple #1
0
    def __init__(self, *args, **kwargs):  # noqa: E501
        """UpdatePPMShipment - a model defined in OpenAPI

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            expected_departure_date (date, none_type): Date the customer expects to move. . [optional]  # noqa: E501
            actual_move_date (date, none_type): [optional]  # noqa: E501
            pickup_postal_code (str, none_type): zip code. [optional]  # noqa: E501
            secondary_pickup_postal_code (str, none_type): [optional]  # noqa: E501
            destination_postal_code (str, none_type): [optional]  # noqa: E501
            secondary_destination_postal_code (str, none_type): [optional]  # noqa: E501
            sit_expected (bool, none_type): [optional]  # noqa: E501
            estimated_weight (int, none_type): [optional]  # noqa: E501
            net_weight (int, none_type): The net weight of the shipment once it has been weight . [optional]  # noqa: E501
            has_pro_gear (bool, none_type): Indicates whether PPM shipment has pro gear. . [optional]  # noqa: E501
            pro_gear_weight (int, none_type): [optional]  # noqa: E501
            spouse_pro_gear_weight (int, none_type): [optional]  # noqa: E501
            estimated_incentive (int, none_type): [optional]  # noqa: E501
            advance (int, none_type): The amount request for an advance, or null if no advance is requested . [optional]  # noqa: E501
            advance_requested (bool, none_type): Indicates whether an advance has been requested for the PPM shipment. . [optional]  # noqa: E501
        """

        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
                % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__, ),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (
            self.__class__, )

        for var_name, var_value in kwargs.items():
            if var_name not in self.attribute_map and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        self.additional_properties_type is None:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
            if var_name in self.read_only_vars:
                raise ApiAttributeError(
                    f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
                    f"class with read only attributes.")
Exemple #2
0
    def _from_openapi_data(cls, approve_date, *args, **kwargs):  # noqa: E501
        """ApprovePersonallyProcuredMovePayload - a model defined in OpenAPI

        Args:
            approve_date (datetime):

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
        """

        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        self = super(OpenApiModel, cls).__new__(cls)

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
                % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__, ),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (
            self.__class__, )

        self.approve_date = approve_date
        for var_name, var_value in kwargs.items():
            if var_name not in self.attribute_map and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        self.additional_properties_type is None:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
        return self
    def __init__(self, title, moving_expense_type, move_document_type,
                 requested_amount_cents, payment_method, *args,
                 **kwargs):  # noqa: E501
        """CreateMovingExpenseDocumentPayload - a model defined in OpenAPI

        Args:
            title (str):
            moving_expense_type (MovingExpenseType):
            move_document_type (MoveDocumentType):
            requested_amount_cents (int): unit is cents
            payment_method (str):

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            personally_procured_move_id (str, none_type): [optional]  # noqa: E501
            upload_ids ([str]): [optional]  # noqa: E501
            receipt_missing (bool): [optional]  # noqa: E501
            notes (str, none_type): [optional]  # noqa: E501
            storage_start_date (date, none_type): [optional]  # noqa: E501
            storage_end_date (date, none_type): [optional]  # noqa: E501
        """

        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
                % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__, ),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (
            self.__class__, )

        self.title = title
        self.moving_expense_type = moving_expense_type
        self.move_document_type = move_document_type
        self.requested_amount_cents = requested_amount_cents
        self.payment_method = payment_method
        for var_name, var_value in kwargs.items():
            if var_name not in self.attribute_map and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        self.additional_properties_type is None:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
            if var_name in self.read_only_vars:
                raise ApiAttributeError(
                    f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
                    f"class with read only attributes.")
Exemple #4
0
    def _from_openapi_data(cls, *args, **kwargs):
        """TShirtSize - a model defined in OpenAPI

        Note that value can be passed either in args or in kwargs, but not in both.

        Args:
            args[0] (str):, must be one of ["S", "M", "L", ]  # noqa: E501

        Keyword Args:
            value (str):, must be one of ["S", "M", "L", ]  # noqa: E501
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
        """
        # required up here when default value is not given
        _path_to_item = kwargs.pop('_path_to_item', ())

        self = super(OpenApiModel, cls).__new__(cls)

        if 'value' in kwargs:
            value = kwargs.pop('value')
        elif args:
            args = list(args)
            value = args.pop(0)
        else:
            raise ApiTypeError(
                "value is required, but not passed in args or kwargs and doesn't have default",
                path_to_item=_path_to_item,
                valid_classes=(self.__class__,),
            )

        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__,),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
        self.value = value
        if kwargs:
            raise ApiTypeError(
                "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
                    kwargs,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__,),
            )

        return self
Exemple #5
0
    def __init__(self, id, service_member_id, issue_date, report_by_date,
                 orders_type, has_dependents, spouse_has_pro_gear,
                 new_duty_location, uploaded_orders, created_at, updated_at,
                 *args, **kwargs):  # noqa: E501
        """Orders - a model defined in OpenAPI

        Args:
            id (str):
            service_member_id (str):
            issue_date (date): The date and time that these orders were cut.
            report_by_date (date): Report By Date
            orders_type (OrdersType):
            has_dependents (bool):
            spouse_has_pro_gear (bool):
            new_duty_location (DutyLocationPayload):
            uploaded_orders (DocumentPayload):
            created_at (datetime):
            updated_at (datetime):

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            grade (str, none_type): [optional]  # noqa: E501
            status (OrdersStatus): [optional]  # noqa: E501
            orders_type_detail (OrdersTypeDetail): [optional]  # noqa: E501
            origin_duty_location (DutyLocationPayload): [optional]  # noqa: E501
            uploaded_amended_orders (DocumentPayload): [optional]  # noqa: E501
            uploaded_amended_orders_id (str): [optional]  # noqa: E501
            moves (IndexMovesPayload): [optional]  # noqa: E501
            orders_number (str, none_type): [optional]  # noqa: E501
            tac (str, none_type): [optional]  # noqa: E501
            sac (str, none_type): [optional]  # noqa: E501
            department_indicator (DeptIndicator): [optional]  # noqa: E501
            authorized_weight (int, none_type): [optional]  # noqa: E501
        """

        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
                % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__, ),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (
            self.__class__, )

        self.id = id
        self.service_member_id = service_member_id
        self.issue_date = issue_date
        self.report_by_date = report_by_date
        self.orders_type = orders_type
        self.has_dependents = has_dependents
        self.spouse_has_pro_gear = spouse_has_pro_gear
        self.new_duty_location = new_duty_location
        self.uploaded_orders = uploaded_orders
        self.created_at = created_at
        self.updated_at = updated_at
        for var_name, var_value in kwargs.items():
            if var_name not in self.attribute_map and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        self.additional_properties_type is None:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
            if var_name in self.read_only_vars:
                raise ApiAttributeError(
                    f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
                    f"class with read only attributes.")
Exemple #6
0
    def __init__(self, id, name, address_id, affiliation, created_at,
                 updated_at, *args, **kwargs):  # noqa: E501
        """DutyLocationPayload - a model defined in OpenAPI

        Args:
            id (str):
            name (str):
            address_id (str):
            affiliation (Affiliation):
            created_at (datetime):
            updated_at (datetime):

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            address (Address): [optional]  # noqa: E501
            transportation_office_id (str, none_type): [optional]  # noqa: E501
            transportation_office (TransportationOffice): [optional]  # noqa: E501
        """

        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
                % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__, ),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (
            self.__class__, )

        self.id = id
        self.name = name
        self.address_id = address_id
        self.affiliation = affiliation
        self.created_at = created_at
        self.updated_at = updated_at
        for var_name, var_value in kwargs.items():
            if var_name not in self.attribute_map and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        self.additional_properties_type is None:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
            if var_name in self.read_only_vars:
                raise ApiAttributeError(
                    f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
                    f"class with read only attributes.")
Exemple #7
0
    def __init__(self, id, status, locator, customer_name, edipi, rank,
                 orders_type, last_modified_date, created_at,
                 branch_of_service, *args, **kwargs):  # noqa: E501
        """MoveQueueItem - a model defined in OpenAPI

        Args:
            id (str):
            status (str):
            locator (str):
            customer_name (str):
            edipi (str):
            rank (ServiceMemberRank):
            orders_type (str):
            last_modified_date (datetime):
            created_at (datetime):
            branch_of_service (str):

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            ppm_status (str, none_type): [optional]  # noqa: E501
            hhg_status (str, none_type): [optional]  # noqa: E501
            gbl_number (str, none_type): [optional]  # noqa: E501
            move_date (date, none_type): [optional]  # noqa: E501
            submitted_date (datetime, none_type): [optional]  # noqa: E501
            origin_duty_location_name (str, none_type): [optional]  # noqa: E501
            destination_duty_location_name (str, none_type): [optional]  # noqa: E501
            pm_survey_conducted_date (datetime, none_type): [optional]  # noqa: E501
            origin_gbloc (str, none_type): [optional]  # noqa: E501
            destination_gbloc (str, none_type): [optional]  # noqa: E501
            delivered_date (datetime, none_type): [optional]  # noqa: E501
            invoice_approved_date (datetime, none_type): [optional]  # noqa: E501
            weight_allotment (WeightAllotment): [optional]  # noqa: E501
            actual_move_date (date, none_type): [optional]  # noqa: E501
            original_move_date (date, none_type): [optional]  # noqa: E501
        """

        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
                % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__, ),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (
            self.__class__, )

        self.id = id
        self.status = status
        self.locator = locator
        self.customer_name = customer_name
        self.edipi = edipi
        self.rank = rank
        self.orders_type = orders_type
        self.last_modified_date = last_modified_date
        self.created_at = created_at
        self.branch_of_service = branch_of_service
        for var_name, var_value in kwargs.items():
            if var_name not in self.attribute_map and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        self.additional_properties_type is None:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
            if var_name in self.read_only_vars:
                raise ApiAttributeError(
                    f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
                    f"class with read only attributes.")
    def __init__(self, id, created_at, updated_at, *args,
                 **kwargs):  # noqa: E501
        """PersonallyProcuredMovePayload - a model defined in OpenAPI

        Args:
            id (str):
            created_at (datetime):
            updated_at (datetime):

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            move_id (str): [optional]  # noqa: E501
            size (TShirtSize): [optional]  # noqa: E501
            original_move_date (date, none_type): [optional]  # noqa: E501
            actual_move_date (date, none_type): [optional]  # noqa: E501
            submit_date (datetime, none_type): [optional]  # noqa: E501
            approve_date (datetime, none_type): [optional]  # noqa: E501
            pickup_postal_code (str, none_type): [optional]  # noqa: E501
            has_additional_postal_code (bool, none_type): [optional]  # noqa: E501
            additional_pickup_postal_code (str, none_type): [optional]  # noqa: E501
            destination_postal_code (str, none_type): [optional]  # noqa: E501
            has_sit (bool, none_type): [optional]  # noqa: E501
            days_in_storage (int, none_type): [optional]  # noqa: E501
            estimated_storage_reimbursement (str, none_type): [optional]  # noqa: E501
            weight_estimate (int, none_type): [optional]  # noqa: E501
            net_weight (int, none_type): [optional]  # noqa: E501
            mileage (int, none_type): [optional]  # noqa: E501
            planned_sit_max (int, none_type): [optional]  # noqa: E501
            total_sit_cost (int, none_type): [optional]  # noqa: E501
            sit_max (int, none_type): [optional]  # noqa: E501
            incentive_estimate_min (int, none_type): [optional]  # noqa: E501
            incentive_estimate_max (int, none_type): [optional]  # noqa: E501
            status (PPMStatus): [optional]  # noqa: E501
            has_requested_advance (bool): [optional] if omitted the server will use the default value of False  # noqa: E501
            advance (Reimbursement): [optional]  # noqa: E501
            advance_worksheet (DocumentPayload): [optional]  # noqa: E501
            has_pro_gear (str, none_type): [optional]  # noqa: E501
            has_pro_gear_over_thousand (str, none_type): [optional]  # noqa: E501
        """

        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
                % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__, ),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (
            self.__class__, )

        self.id = id
        self.created_at = created_at
        self.updated_at = updated_at
        for var_name, var_value in kwargs.items():
            if var_name not in self.attribute_map and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        self.additional_properties_type is None:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
            if var_name in self.read_only_vars:
                raise ApiAttributeError(
                    f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
                    f"class with read only attributes.")
    def _from_openapi_data(cls, id, shipment_id, created_at, updated_at,
                           status, expected_departure_date, pickup_postal_code,
                           destination_postal_code, sit_expected, e_tag, *args,
                           **kwargs):  # noqa: E501
        """PPMShipment - a model defined in OpenAPI

        Args:
            id (str):
            shipment_id (str):
            created_at (datetime):
            updated_at (datetime):
            status (PPMShipmentStatus):
            expected_departure_date (date): Date the customer expects to move. 
            pickup_postal_code (str): zip code
            destination_postal_code (str):
            sit_expected (bool):
            e_tag (str): A hash unique to this shipment that should be used as the \"If-Match\" header for any updates.

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            actual_move_date (date, none_type): [optional]  # noqa: E501
            submitted_at (datetime, none_type): [optional]  # noqa: E501
            reviewed_at (datetime, none_type): [optional]  # noqa: E501
            approved_at (datetime, none_type): [optional]  # noqa: E501
            secondary_pickup_postal_code (str, none_type): [optional]  # noqa: E501
            secondary_destination_postal_code (str, none_type): [optional]  # noqa: E501
            estimated_weight (int, none_type): [optional]  # noqa: E501
            net_weight (int, none_type): The net weight of the shipment once it has been weight . [optional]  # noqa: E501
            has_pro_gear (bool, none_type): Indicates whether PPM shipment has pro gear. . [optional]  # noqa: E501
            pro_gear_weight (int, none_type): [optional]  # noqa: E501
            spouse_pro_gear_weight (int, none_type): [optional]  # noqa: E501
            estimated_incentive (int, none_type): [optional]  # noqa: E501
            advance (int, none_type): The amount request for an advance, or null if no advance is requested . [optional]  # noqa: E501
            advance_requested (bool, none_type): Indicates whether an advance has been requested for the PPM shipment. . [optional]  # noqa: E501
        """

        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        self = super(OpenApiModel, cls).__new__(cls)

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
                % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__, ),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (
            self.__class__, )

        self.id = id
        self.shipment_id = shipment_id
        self.created_at = created_at
        self.updated_at = updated_at
        self.status = status
        self.expected_departure_date = expected_departure_date
        self.pickup_postal_code = pickup_postal_code
        self.destination_postal_code = destination_postal_code
        self.sit_expected = sit_expected
        self.e_tag = e_tag
        for var_name, var_value in kwargs.items():
            if var_name not in self.attribute_map and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        self.additional_properties_type is None:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
        return self
Exemple #10
0
    def __init__(self, *args, **kwargs):  # noqa: E501
        """ValidationError - a model defined in OpenAPI

        Keyword Args:
            title (str):
            detail (str):
            instance (str):
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            invalid_fields ({str: ([str],)}): [optional]  # noqa: E501
        """

        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
                % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__, ),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (
            self.__class__, )

        constant_args = {
            '_check_type': _check_type,
            '_path_to_item': _path_to_item,
            '_spec_property_naming': _spec_property_naming,
            '_configuration': _configuration,
            '_visited_composed_classes': self._visited_composed_classes,
        }
        composed_info = validate_get_composed_info(constant_args, kwargs, self)
        self._composed_instances = composed_info[0]
        self._var_name_to_model_instances = composed_info[1]
        self._additional_properties_model_instances = composed_info[2]
        discarded_args = composed_info[3]

        for var_name, var_value in kwargs.items():
            if var_name in discarded_args and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        self._additional_properties_model_instances:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
            if var_name in self.read_only_vars:
                raise ApiAttributeError(
                    f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
                    f"class with read only attributes.")
    def _from_openapi_data(cls, id, user_id, is_profile_complete, created_at,
                           updated_at, *args, **kwargs):  # noqa: E501
        """ServiceMemberPayload - a model defined in OpenAPI

        Args:
            id (str):
            user_id (str):
            is_profile_complete (bool):
            created_at (datetime):
            updated_at (datetime):

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            edipi (str, none_type): [optional]  # noqa: E501
            orders ([Orders]): [optional]  # noqa: E501
            affiliation (Affiliation): [optional]  # noqa: E501
            rank (ServiceMemberRank): [optional]  # noqa: E501
            first_name (str, none_type): [optional]  # noqa: E501
            middle_name (str, none_type): [optional]  # noqa: E501
            last_name (str, none_type): [optional]  # noqa: E501
            suffix (str, none_type): [optional]  # noqa: E501
            telephone (str, none_type): [optional]  # noqa: E501
            secondary_telephone (str, none_type): [optional]  # noqa: E501
            personal_email (str, none_type): [optional]  # noqa: E501
            phone_is_preferred (bool, none_type): [optional]  # noqa: E501
            email_is_preferred (bool, none_type): [optional]  # noqa: E501
            current_location (DutyLocationPayload): [optional]  # noqa: E501
            residential_address (Address): [optional]  # noqa: E501
            backup_mailing_address (Address): [optional]  # noqa: E501
            backup_contacts (IndexServiceMemberBackupContactsPayload): [optional]  # noqa: E501
            weight_allotment (WeightAllotment): [optional]  # noqa: E501
        """

        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        self = super(OpenApiModel, cls).__new__(cls)

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
                % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__, ),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (
            self.__class__, )

        self.id = id
        self.user_id = user_id
        self.is_profile_complete = is_profile_complete
        self.created_at = created_at
        self.updated_at = updated_at
        for var_name, var_value in kwargs.items():
            if var_name not in self.attribute_map and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        self.additional_properties_type is None:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
        return self