ruạṛ
a ���fea � @ s8 d dl mZmZmZ d dlmZ eG dd� de��ZdS )� )�formatted_flat_dict� NONE_SENTINEL�#value_allowed_none_or_none_sentinel)�init_model_state_from_kwargsc @ s� e Zd ZdZdZdZdZdZdZdZ dZ dZdd� Ze d d � �Zejdd � �Ze dd � �Zejdd � �Ze dd� �Zejdd� �Ze dd� �Zejdd� �Ze dd� �Zejdd� �Ze dd� �Zejdd� �Ze dd� �Zejdd� �Ze dd� �Zejd d� �Ze d!d"� �Zejd#d"� �Ze d$d%� �Zejd&d%� �Ze d'd(� �Zejd)d(� �Ze d*d+� �Zejd,d+� �Ze d-d.� �Zejd/d.� �Ze d0d1� �Zejd2d1� �Zd3d4� Zd5d6� Zd7d8� Zd9S ):�SecurityRulea A security rule is one of the items in a :class:`NetworkSecurityGroup`. It is a virtual firewall rule for the VNICs in the network security group. A rule can be for either inbound (`direction`= INGRESS) or outbound (`direction`= EGRESS) IP packets. � CIDR_BLOCK�SERVICE_CIDR_BLOCK�NETWORK_SECURITY_GROUP�EGRESS�INGRESSc K s� ddddddddddddddd�| _ dd d ddd ddddddddd�| _d| _d| _d| _d| _d| _d| _d| _d| _ d| _ d| _d| _d| _ d| _d| _dS )a> Initializes a new SecurityRule object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class): :param description: The value to assign to the description property of this SecurityRule. :type description: str :param destination: The value to assign to the destination property of this SecurityRule. :type destination: str :param destination_type: The value to assign to the destination_type property of this SecurityRule. Allowed values for this property are: "CIDR_BLOCK", "SERVICE_CIDR_BLOCK", "NETWORK_SECURITY_GROUP", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type destination_type: str :param direction: The value to assign to the direction property of this SecurityRule. Allowed values for this property are: "EGRESS", "INGRESS", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type direction: str :param icmp_options: The value to assign to the icmp_options property of this SecurityRule. :type icmp_options: oci.core.models.IcmpOptions :param id: The value to assign to the id property of this SecurityRule. :type id: str :param is_stateless: The value to assign to the is_stateless property of this SecurityRule. :type is_stateless: bool :param is_valid: The value to assign to the is_valid property of this SecurityRule. :type is_valid: bool :param protocol: The value to assign to the protocol property of this SecurityRule. :type protocol: str :param source: The value to assign to the source property of this SecurityRule. :type source: str :param source_type: The value to assign to the source_type property of this SecurityRule. Allowed values for this property are: "CIDR_BLOCK", "SERVICE_CIDR_BLOCK", "NETWORK_SECURITY_GROUP", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type source_type: str :param tcp_options: The value to assign to the tcp_options property of this SecurityRule. :type tcp_options: oci.core.models.TcpOptions :param time_created: The value to assign to the time_created property of this SecurityRule. :type time_created: datetime :param udp_options: The value to assign to the udp_options property of this SecurityRule. :type udp_options: oci.core.models.UdpOptions �strZIcmpOptions�boolZ TcpOptionsZdatetimeZ UdpOptions)�description�destination�destination_type� direction�icmp_options�id�is_stateless�is_valid�protocol�source�source_type�tcp_options�time_created�udp_optionsr r ZdestinationTyper ZicmpOptionsr ZisStatelessZisValidr r Z sourceTypeZ tcpOptionsZtimeCreatedZ udpOptionsN)Z swagger_typesZ attribute_map�_description�_destination�_destination_type� _direction� _icmp_options�_id� _is_stateless� _is_valid� _protocol�_source�_source_type�_tcp_options� _time_created�_udp_options)�self�kwargs� r, �A/usr/lib/python3.9/site-packages/oci/core/models/security_rule.py�__init__4 sX E��zSecurityRule.__init__c C s | j S )z� Gets the description of this SecurityRule. An optional description of your choice for the rule. :return: The description of this SecurityRule. :rtype: str �r �r* r, r, r- r � s zSecurityRule.descriptionc C s || _ dS )z� Sets the description of this SecurityRule. An optional description of your choice for the rule. :param description: The description of this SecurityRule. :type: str Nr/ )r* r r, r, r- r � s c C s | j S )aq Gets the destination of this SecurityRule. Conceptually, this is the range of IP addresses that a packet originating from the instance can go to. Allowed values: * An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` IPv6 addressing is supported for all commercial and government regions. See `IPv6 Addresses`__. * The `cidrBlock` value for a :class:`Service`, if you're setting up a security rule for traffic destined for a particular `Service` through a service gateway. For example: `oci-phx-objectstorage`. * The `OCID`__ of a :class:`NetworkSecurityGroup` in the same VCN. The value can be the NSG that the rule belongs to if the rule's intent is to control traffic between VNICs in the same NSG. __ https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :return: The destination of this SecurityRule. :rtype: str �r r0 r, r, r- r � s zSecurityRule.destinationc C s || _ dS )a{ Sets the destination of this SecurityRule. Conceptually, this is the range of IP addresses that a packet originating from the instance can go to. Allowed values: * An IP address range in CIDR notation. For example: `192.168.1.0/24` or `2001:0db8:0123:45::/56` IPv6 addressing is supported for all commercial and government regions. See `IPv6 Addresses`__. * The `cidrBlock` value for a :class:`Service`, if you're setting up a security rule for traffic destined for a particular `Service` through a service gateway. For example: `oci-phx-objectstorage`. * The `OCID`__ of a :class:`NetworkSecurityGroup` in the same VCN. The value can be the NSG that the rule belongs to if the rule's intent is to control traffic between VNICs in the same NSG. __ https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/ipv6.htm __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :param destination: The destination of this SecurityRule. :type: str Nr1 )r* r r, r, r- r � s c C s | j S )a� Gets the destination_type of this SecurityRule. Type of destination for the rule. Required if `direction` = `EGRESS`. Allowed values: * `CIDR_BLOCK`: If the rule's `destination` is an IP address range in CIDR notation. * `SERVICE_CIDR_BLOCK`: If the rule's `destination` is the `cidrBlock` value for a :class:`Service` (the rule is for traffic destined for a particular `Service` through a service gateway). * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the `OCID`__ of a :class:`NetworkSecurityGroup`. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm Allowed values for this property are: "CIDR_BLOCK", "SERVICE_CIDR_BLOCK", "NETWORK_SECURITY_GROUP", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :return: The destination_type of this SecurityRule. :rtype: str )r r0 r, r, r- r � s zSecurityRule.destination_typec C s g d�}t ||�sd}|| _dS )a$ Sets the destination_type of this SecurityRule. Type of destination for the rule. Required if `direction` = `EGRESS`. Allowed values: * `CIDR_BLOCK`: If the rule's `destination` is an IP address range in CIDR notation. * `SERVICE_CIDR_BLOCK`: If the rule's `destination` is the `cidrBlock` value for a :class:`Service` (the rule is for traffic destined for a particular `Service` through a service gateway). * `NETWORK_SECURITY_GROUP`: If the rule's `destination` is the `OCID`__ of a :class:`NetworkSecurityGroup`. __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm :param destination_type: The destination_type of this SecurityRule. :type: str �r r r �UNKNOWN_ENUM_VALUEN)r r )r* r �allowed_valuesr, r, r- r s c C s | j S )a� **[Required]** Gets the direction of this SecurityRule. Direction of the security rule. Set to `EGRESS` for rules to allow outbound IP packets, or `INGRESS` for rules to allow inbound IP packets. Allowed values for this property are: "EGRESS", "INGRESS", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :return: The direction of this SecurityRule. :rtype: str )r r0 r, r, r- r 5 s zSecurityRule.directionc C s ddg}t ||�sd}|| _dS )a) Sets the direction of this SecurityRule. Direction of the security rule. Set to `EGRESS` for rules to allow outbound IP packets, or `INGRESS` for rules to allow inbound IP packets. :param direction: The direction of this SecurityRule. :type: str r r r3 N)r r )r* r r4 r, r, r- r E s c C s | j S )z� Gets the icmp_options of this SecurityRule. :return: The icmp_options of this SecurityRule. :rtype: oci.core.models.IcmpOptions �r r0 r, r, r- r U s zSecurityRule.icmp_optionsc C s || _ dS )z� Sets the icmp_options of this SecurityRule. :param icmp_options: The icmp_options of this SecurityRule. :type: oci.core.models.IcmpOptions Nr5 )r* r r, r, r- r _ s c C s | j S )a Gets the id of this SecurityRule. An Oracle-assigned identifier for the security rule. You specify this ID when you want to update or delete the rule. Example: `04ABEC` :return: The id of this SecurityRule. :rtype: str �r! r0 r, r, r- r i s zSecurityRule.idc C s || _ dS )a Sets the id of this SecurityRule. An Oracle-assigned identifier for the security rule. You specify this ID when you want to update or delete the rule. Example: `04ABEC` :param id: The id of this SecurityRule. :type: str Nr6 )r* r r, r, r- r x s c C s | j S )aO Gets the is_stateless of this SecurityRule. A stateless rule allows traffic in one direction. Remember to add a corresponding stateless rule in the other direction if you need to support bidirectional traffic. For example, if egress traffic allows TCP destination port 80, there should be an ingress rule to allow TCP source port 80. Defaults to false, which means the rule is stateful and a corresponding rule is not necessary for bidirectional traffic. :return: The is_stateless of this SecurityRule. :rtype: bool �r"