from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from capif_events.models.base_model import Model
from capif_events.models.api_invoker_policy import ApiInvokerPolicy
from capif_events import util

from capif_events.models.api_invoker_policy import ApiInvokerPolicy  # noqa: E501

class AccessControlPolicyListExt(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, api_invoker_policies=None, api_id=None):  # noqa: E501
        """AccessControlPolicyListExt - a model defined in OpenAPI

        :param api_invoker_policies: The api_invoker_policies of this AccessControlPolicyListExt.  # noqa: E501
        :type api_invoker_policies: List[ApiInvokerPolicy]
        :param api_id: The api_id of this AccessControlPolicyListExt.  # noqa: E501
        :type api_id: str
        """
        self.openapi_types = {
            'api_invoker_policies': List[ApiInvokerPolicy],
            'api_id': str
        }

        self.attribute_map = {
            'api_invoker_policies': 'apiInvokerPolicies',
            'api_id': 'apiId'
        }

        self._api_invoker_policies = api_invoker_policies
        self._api_id = api_id

    @classmethod
    def from_dict(cls, dikt) -> 'AccessControlPolicyListExt':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The AccessControlPolicyListExt of this AccessControlPolicyListExt.  # noqa: E501
        :rtype: AccessControlPolicyListExt
        """
        return util.deserialize_model(dikt, cls)

    @property
    def api_invoker_policies(self) -> List[ApiInvokerPolicy]:
        """Gets the api_invoker_policies of this AccessControlPolicyListExt.

        Policy of each API invoker.  # noqa: E501

        :return: The api_invoker_policies of this AccessControlPolicyListExt.
        :rtype: List[ApiInvokerPolicy]
        """
        return self._api_invoker_policies

    @api_invoker_policies.setter
    def api_invoker_policies(self, api_invoker_policies: List[ApiInvokerPolicy]):
        """Sets the api_invoker_policies of this AccessControlPolicyListExt.

        Policy of each API invoker.  # noqa: E501

        :param api_invoker_policies: The api_invoker_policies of this AccessControlPolicyListExt.
        :type api_invoker_policies: List[ApiInvokerPolicy]
        """
        if api_invoker_policies is not None and len(api_invoker_policies) < 0:
            raise ValueError("Invalid value for `api_invoker_policies`, number of items must be greater than or equal to `0`")  # noqa: E501

        self._api_invoker_policies = api_invoker_policies

    @property
    def api_id(self) -> str:
        """Gets the api_id of this AccessControlPolicyListExt.


        :return: The api_id of this AccessControlPolicyListExt.
        :rtype: str
        """
        return self._api_id

    @api_id.setter
    def api_id(self, api_id: str):
        """Sets the api_id of this AccessControlPolicyListExt.


        :param api_id: The api_id of this AccessControlPolicyListExt.
        :type api_id: str
        """
        if api_id is None:
            raise ValueError("Invalid value for `api_id`, must not be `None`")  # noqa: E501

        self._api_id = api_id
