# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables

__all__ = [
    'InstancePublicPortsPortInfo',
]

@pulumi.output_type
class InstancePublicPortsPortInfo(dict):
    def __init__(__self__, *,
                 from_port: int,
                 protocol: str,
                 to_port: int,
                 cidrs: Optional[Sequence[str]] = None):
        """
        :param int from_port: First port in a range of open ports on an instance.
        :param str protocol: IP protocol name. Valid values are `tcp`, `all`, `udp`, and `icmp`.
        :param int to_port: Last port in a range of open ports on an instance.
        :param Sequence[str] cidrs: Set of CIDR blocks.
        """
        pulumi.set(__self__, "from_port", from_port)
        pulumi.set(__self__, "protocol", protocol)
        pulumi.set(__self__, "to_port", to_port)
        if cidrs is not None:
            pulumi.set(__self__, "cidrs", cidrs)

    @property
    @pulumi.getter(name="fromPort")
    def from_port(self) -> int:
        """
        First port in a range of open ports on an instance.
        """
        return pulumi.get(self, "from_port")

    @property
    @pulumi.getter
    def protocol(self) -> str:
        """
        IP protocol name. Valid values are `tcp`, `all`, `udp`, and `icmp`.
        """
        return pulumi.get(self, "protocol")

    @property
    @pulumi.getter(name="toPort")
    def to_port(self) -> int:
        """
        Last port in a range of open ports on an instance.
        """
        return pulumi.get(self, "to_port")

    @property
    @pulumi.getter
    def cidrs(self) -> Optional[Sequence[str]]:
        """
        Set of CIDR blocks.
        """
        return pulumi.get(self, "cidrs")

    def _translate_property(self, prop):
        return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop


