# 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 SQSQueueInlinePolicyProperties(TypedDict):
    PolicyDocument: dict | None
    Queue: str | None


REPEATED_INVOCATION = "repeated_invocation"


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

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

        Primary identifier fields:
          - /properties/Queue

        Required properties:
          - PolicyDocument
          - Queue

        Create-only properties:
          - /properties/Queue



        IAM permissions required:
          - sqs:SetQueueAttributes
          - sqs:GetQueueAttributes
          - sqs:GetQueueUrl

        """
        raise NotImplementedError

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

        IAM permissions required:
          - sqs:GetQueueAttributes
          - sqs:GetQueueUrl
        """
        raise NotImplementedError

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

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

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

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

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

        """
        raise NotImplementedError
