# Generated by detroit
# See https://github.com/bourbonut/detroit/tree/main/api_maker

from functools import partial
from operator import is_not

class treemap:
    def __init__(self, content="treemap"):
        self.content = content

    def __repr__(self):
        return self.content

    def __str__(self):
        return self.content

    def __call__(self, *args):
        arguments = ", ".join(map(repr, args))
        return f"{self}({arguments})"

    def tile(self, tile=None):
        """
        Source · If tile is specified, sets the tiling method to the specified function and
        returns this treemap layout. If tile is not specified, returns the current tiling
        method, which defaults to treemapSquarify with the golden ratio.

        See more informations `here <https://d3js.org/d3-hierarchy/treemap#treemap_tile>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (tile,))))
        return treemap(content=f"{self.content}.tile({arguments})")


    def size(self, size=None):
        """
        Source · If size is specified, sets this treemap layout’s size to the specified
        two-element array of numbers [width, height] and returns this treemap layout. If size
        is not specified, returns the current size, which defaults to [1, 1].

        See more informations `here <https://d3js.org/d3-hierarchy/treemap#treemap_size>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (size,))))
        return treemap(content=f"{self.content}.size({arguments})")


    def round(self, round=None):
        """
        Source · If round is specified, enables or disables rounding according to the given
        boolean and returns this treemap layout. If round is not specified, returns the current
        rounding state, which defaults to false.

        See more informations `here <https://d3js.org/d3-hierarchy/treemap#treemap_round>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (round,))))
        return treemap(content=f"{self.content}.round({arguments})")


    def padding(self, padding=None):
        """
        Source · If padding is specified, sets the inner and outer padding to the specified
        number or function and returns this treemap layout. If padding is not specified,
        returns the current inner padding function.

        See more informations `here <https://d3js.org/d3-hierarchy/treemap#treemap_padding>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (padding,))))
        return treemap(content=f"{self.content}.padding({arguments})")


    def paddingInner(self, padding=None):
        """
        Source · If padding is specified, sets the inner padding to the specified number or
        function and returns this treemap layout. If padding is not specified, returns the
        current inner padding function, which defaults to the constant zero. If padding is a
        function, it is invoked for each node with children, being passed the current node. The
        inner padding is used to separate a node’s adjacent children.

        See more informations `here <https://d3js.org/d3-hierarchy/treemap#treemap_paddingInner>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (padding,))))
        return treemap(content=f"{self.content}.paddingInner({arguments})")


    def paddingOuter(self, padding=None):
        """
        Source · If padding is specified, sets the top, right, bottom and left padding to the
        specified number or function and returns this treemap layout. If padding is not
        specified, returns the current top padding function.

        See more informations `here <https://d3js.org/d3-hierarchy/treemap#treemap_paddingOuter>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (padding,))))
        return treemap(content=f"{self.content}.paddingOuter({arguments})")


    def paddingTop(self, padding=None):
        """
        Source · If padding is specified, sets the top padding to the specified number or
        function and returns this treemap layout. If padding is not specified, returns the
        current top padding function, which defaults to the constant zero. If padding is a
        function, it is invoked for each node with children, being passed the current node. The
        top padding is used to separate the top edge of a node from its children.

        See more informations `here <https://d3js.org/d3-hierarchy/treemap#treemap_paddingTop>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (padding,))))
        return treemap(content=f"{self.content}.paddingTop({arguments})")


    def paddingRight(self, padding=None):
        """
        Source · If padding is specified, sets the right padding to the specified number or
        function and returns this treemap layout. If padding is not specified, returns the
        current right padding function, which defaults to the constant zero. If padding is a
        function, it is invoked for each node with children, being passed the current node. The
        right padding is used to separate the right edge of a node from its children.

        See more informations `here <https://d3js.org/d3-hierarchy/treemap#treemap_paddingRight>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (padding,))))
        return treemap(content=f"{self.content}.paddingRight({arguments})")


    def paddingBottom(self, padding=None):
        """
        Source · If padding is specified, sets the bottom padding to the specified number or
        function and returns this treemap layout. If padding is not specified, returns the
        current bottom padding function, which defaults to the constant zero. If padding is a
        function, it is invoked for each node with children, being passed the current node. The
        bottom padding is used to separate the bottom edge of a node from its children.

        See more informations `here <https://d3js.org/d3-hierarchy/treemap#treemap_paddingBottom>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (padding,))))
        return treemap(content=f"{self.content}.paddingBottom({arguments})")


    def paddingLeft(self, padding=None):
        """
        Source · If padding is specified, sets the left padding to the specified number or
        function and returns this treemap layout. If padding is not specified, returns the
        current left padding function, which defaults to the constant zero. If padding is a
        function, it is invoked for each node with children, being passed the current node. The
        left padding is used to separate the left edge of a node from its children.

        See more informations `here <https://d3js.org/d3-hierarchy/treemap#treemap_paddingLeft>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (padding,))))
        return treemap(content=f"{self.content}.paddingLeft({arguments})")

