Beispiel #1
0
class IosLineConfig(BaseNetModel):

    line_type: Literal['aux', 'console', 'vty']
    line_range: conlist(item_type=conint(ge=0), min_items=1, max_items=2)
    aaa_config: Optional[IosLineAaaConfig]
    """AAA Configuration Object"""
    exec_timeout: Optional[conint(ge=0)]
    """EXEC Timeout in seconds"""
    transport: Optional[IosLineTransport]
    access_classes: Optional[List[IosLineAccessClass]]
class A(BaseModel):
    abc: conlist()
    cde: conlist(str)
    efg: conlist(item_type=str)
    hij: conlist(List[str])
Beispiel #3
0
class DatesAndPriceCheckInputValidator(CheckinCheckoutValidator):
    listing_ids: conlist(conint(gt=0), min_items=1)
Beispiel #4
0
class RoutingIsisLsp(VendorIndependentBaseModel):

    max_lifetime: Optional[conint(ge=1, le=65535)]
    refresh_interval: Optional[conint(ge=1, le=65535)]
    gen_intervals: Optional[conlist(RoutingIsisLspGenInterval, max_items=2)]
Beispiel #5
0
class LegendConfig(BaseModel):
    """Config for the legend to be created from a dataset."""
    class Config:
        validate_all = True
        validate_assignment = True

    color_set: ColorSets = Field(
        ColorSets.ecotect,
        description=
        'Color set to be used on data and legend. Currently, this field'
        ' only uses Ladybug color sets. Defaults to using ecotect colorset.')

    min: Union[Autocalculate, float] = Field(
        Autocalculate(),
        description=
        'Minimum value for the legend. Also known as the lower end of the'
        ' legend. If min and max values are not specified, autocalculated min and max'
        ' values will be used from data.')

    max: Union[Autocalculate, float] = Field(
        Autocalculate(),
        description=
        'Maximum value for the legend. Also known as the higher end of the'
        ' legend. If min and max values are not specified, autocalculated min and max'
        ' values will be used from data.')

    hide_legend: bool = Field(
        False,
        description=
        'A bool value to indicate whether to show legend in the exported'
        ' images or not.')

    orientation: Orientation = Field(
        Orientation.vertical,
        description=
        'Choose between horizontal and vertical orientation of legend.')

    width: confloat(ge=0.05, le=0.95) = Field(
        0.05,
        description=
        ' A decimal number representing the fraction of viewport width'
        ' that will be used to define the width of the legend.')

    height: confloat(ge=0.05, le=0.95) = Field(
        0.45,
        description=
        'A decimal number representing the fraction of viewport height'
        'that will be used to define the height of the legend.')

    position: conlist(confloat(
        ge=0.05, le=0.95), min_items=2, max_items=2) = Field(
            [0.9, 0.5],
            description=
            'A tuple of two decimal values. The values represent the fraction'
            ' of viewport width and the fraction of viewport height.')

    color_count: Union[Autocalculate, int] = Field(
        Autocalculate(),
        description=
        'An integer representing the number of colors in a legend. If not'
        ' specified, it defaults to the number of colors in a Ladybug color set.'
    )

    label_count: Union[Autocalculate, int] = Field(
        Autocalculate(),
        description=
        'An integer representing the number of text labels on a legend.'
        ' Label count will have to be less than or equal to color count. It defaults'
        ' to vtk scalarbar default setting.')

    decimal_count: DecimalCount = Field(
        DecimalCount.default,
        description=
        'Controlling the number of decimals on each label of the legend.'
        'Accepted values are "default", "integer", "decimal_two", and "decimal_three".'
        'Defaults to VTKs default settings.')

    preceding_labels: bool = Field(
        False,
        description='Boolean value to decide whether the legend title and the'
        ' legend labels will precede the legend or not.')

    label_parameters: TextConfig = Field(
        TextConfig(),
        description='Text parameters for the labels on the legend.')

    title_parameters: TextConfig = Field(
        TextConfig(bold=True),
        description='Text parameters for the title of the legend.')