from __future__ import annotations
from collections.abc import Callable
from kiota_abstractions.base_request_builder import BaseRequestBuilder
from kiota_abstractions.get_path_parameters import get_path_parameters
from kiota_abstractions.request_adapter import RequestAdapter
from typing import Any, Optional, TYPE_CHECKING, Union
from uuid import UUID

if TYPE_CHECKING:
    from .item.with_association_item_request_builder import WithAssociationItemRequestBuilder

class WithAssociationTypeItemRequestBuilder(BaseRequestBuilder):
    """
    Builds and executes requests for operations under /cost/v1/containers/{containerId}/workflows/{associationType}
    """
    def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
        """
        Instantiates a new WithAssociationTypeItemRequestBuilder and sets the default values.
        param path_parameters: The raw url or the url-template parameters for the request.
        param request_adapter: The request adapter to use to execute the requests.
        Returns: None
        """
        super().__init__(request_adapter, "{+baseurl}/cost/v1/containers/{containerId}/workflows/{associationType}", path_parameters)
    
    def by_association_id(self,association_id: UUID) -> WithAssociationItemRequestBuilder:
        """
        Gets an item from the Autodesk.ACC.cost.v1.containers.item.workflows.item.item collection
        param association_id: The object ID of the item is associated to. For example, the ID of a budget, contract or cost item.
        Returns: WithAssociationItemRequestBuilder
        """
        if association_id is None:
            raise TypeError("association_id cannot be null.")
        from .item.with_association_item_request_builder import WithAssociationItemRequestBuilder

        url_tpl_params = get_path_parameters(self.path_parameters)
        url_tpl_params["associationId"] = association_id
        return WithAssociationItemRequestBuilder(self.request_adapter, url_tpl_params)
    

