# LocalStack Resource Provider Base Class Scaffolding v2
#
# AUTOGENERATED FILE - DO NOT EDIT
#

from __future__ import annotations

from abc import ABC, abstractmethod
from pathlib import Path
from typing import TypedDict

import localstack.services.cloudformation.provider_utils as util
from localstack.services.cloudformation.resource_provider import (
    ProgressEvent,
    ResourceProvider,
    ResourceRequest,
)


class SQSQueuePolicyProperties(TypedDict):
    PolicyDocument: dict | str | None
    Queues: list[str] | None
    Id: str | None


REPEATED_INVOCATION = "repeated_invocation"


class SQSQueuePolicyProviderBase(ResourceProvider[SQSQueuePolicyProperties], ABC):
    TYPE = "AWS::SQS::QueuePolicy"  # Autogenerated. Don't change
    SCHEMA = util.get_schema_path(Path(__file__))  # Autogenerated. Don't change

    @abstractmethod
    def create(
        self,
        request: ResourceRequest[SQSQueuePolicyProperties],
    ) -> ProgressEvent[SQSQueuePolicyProperties]:
        """
        Create a new resource.

        Primary identifier fields:
          - /properties/Id

        Required properties:
          - PolicyDocument
          - Queues



        Read-only properties:
          - /properties/Id

        IAM permissions required:
          - sqs:SetQueueAttributes

        """
        raise NotImplementedError

    @abstractmethod
    def read(
        self,
        request: ResourceRequest[SQSQueuePolicyProperties],
    ) -> ProgressEvent[SQSQueuePolicyProperties]:
        """
        Fetch resource information


        """
        raise NotImplementedError

    @abstractmethod
    def delete(
        self,
        request: ResourceRequest[SQSQueuePolicyProperties],
    ) -> ProgressEvent[SQSQueuePolicyProperties]:
        """
        Delete a resource

        IAM permissions required:
          - sqs:SetQueueAttributes
        """
        raise NotImplementedError

    @abstractmethod
    def update(
        self,
        request: ResourceRequest[SQSQueuePolicyProperties],
    ) -> ProgressEvent[SQSQueuePolicyProperties]:
        """
        Update a resource

        IAM permissions required:
          - sqs:SetQueueAttributes
        """
        raise NotImplementedError

    @abstractmethod
    def list(
        self,
        request: ResourceRequest[SQSQueuePolicyProperties],
    ) -> ProgressEvent[SQSQueuePolicyProperties]:
        """
        List available resources of this type

        """
        raise NotImplementedError
