ó
è?F[c           @   s®   d  Z  d d l m Z d d l m Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d	 „  ƒ  YZ d
 e f d „  ƒ  YZ	 d e f d „  ƒ  YZ
 d e f d „  ƒ  YZ d S(   s   
Represents an OptionGroup
iÿÿÿÿ(   t   DBSecurityGroup(   t	   ResultSett   OptionGroupc           B   sP   e  Z d  Z d d d d d e d d „ Z d „  Z d „  Z d „  Z d „  Z	 RS(   sÜ  
    Represents an RDS option group

    Properties reference available from the AWS documentation at
    http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_OptionGroup.html

    :ivar connection: :py:class:`boto.rds.RDSConnection` associated with the
                      current object
    :ivar name: Name of the option group
    :ivar description: The description of the option group
    :ivar engine_name: The name of the database engine to use
    :ivar major_engine_version: The major version number of the engine to use
    :ivar allow_both_vpc_and_nonvpc: Indicates whether this option group can be
                                     applied to both VPC and non-VPC instances.
                                     The value ``True`` indicates the option
                                     group can be applied to both VPC and
                                     non-VPC instances.
    :ivar vpc_id: If AllowsVpcAndNonVpcInstanceMemberships is 'false', this
                  field is blank. If AllowsVpcAndNonVpcInstanceMemberships is
                  ``True`` and this field is blank, then this option group can
                  be applied to both VPC and non-VPC instances. If this field
                  contains a value, then this option group can only be applied
                  to instances that are in the VPC indicated by this field.
    :ivar options: The list of :py:class:`boto.rds.optiongroup.Option` objects
                   associated with the group
    c         C   sC   | |  _  | |  _ | |  _ | |  _ | |  _ | |  _ g  |  _ d  S(   N(   t   namet   engine_namet   major_engine_versiont   descriptiont   allow_both_vpc_and_nonvpct   vpc_idt   options(   t   selft
   connectionR   R   R   R   R   R   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyt   __init__:   s    						c         C   s   d |  j  S(   Ns   OptionGroup:%s(   R   (   R
   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyt   __repr__E   s    c         C   s/   | d k r' t  d t f g ƒ |  _ n d  Sd  S(   Nt   Options(   R   t   OptionR	   t   None(   R
   R   t   attrsR   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyt   startElementH   s    c         C   sÂ   | d k r | |  _  n¦ | d k r0 | |  _ nŽ | d k rH | |  _ nv | d k r` | |  _ n^ | d k r– | j ƒ  d k rŠ t |  _ q¾ t |  _ n( | d k r® | |  _ n t	 |  | | ƒ d  S(   Nt   OptionGroupNamet
   EngineNamet   MajorEngineVersiont   OptionGroupDescriptiont%   AllowsVpcAndNonVpcInstanceMembershipst   truet   VpcId(
   R   R   R   R   t   lowert   TrueR   t   FalseR   t   setattr(   R
   R   t   valueR   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyt
   endElementP   s    c         C   s   |  j  j |  j ƒ S(   N(   R   t   delete_option_groupR   (   R
   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyt   deletec   s    N(
   t   __name__t
   __module__t   __doc__R   R   R   R   R   R   R!   (    (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR      s   					R   c        	   B   sJ   e  Z d  Z d d e e d d d d d „ Z d „  Z d „  Z d „  Z RS(   sè  
    Describes a Option for use in an OptionGroup

    :ivar name: The name of the option
    :ivar description: The description of the option.
    :ivar permanent: Indicate if this option is permanent.
    :ivar persistent: Indicate if this option is persistent.
    :ivar port: If required, the port configured for this option to use.
    :ivar settings: The option settings for this option.
    :ivar db_security_groups: If the option requires access to a port, then
                              this DB Security Group allows access to the port.
    :ivar vpc_security_groups: If the option requires access to a port, then
                               this VPC Security Group allows access to the
                               port.
    c	   	      C   s   | |  _  | |  _ | |  _ | |  _ | |  _ | |  _ | |  _ | |  _ |  j d  k rc g  |  _ n  |  j d  k r~ g  |  _ n  |  j d  k r™ g  |  _ n  d  S(   N(	   R   R   t	   permanentt
   persistentt   portt   settingst   db_security_groupst   vpc_security_groupsR   (	   R
   R   R   R%   R&   R'   R(   R)   R*   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   w   s    								c         C   s   d |  j  S(   Ns	   Option:%s(   R   (   R
   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   Œ   s    c         C   s}   | d k r' t  d t f g ƒ |  _ nR | d k rN t  d t f g ƒ |  _ n+ | d k ru t  d t f g ƒ |  _ n d  Sd  S(   Nt   OptionSettingst   DBSecurityGroupMembershipst   VpcSecurityGroupMemberships(   R   t   OptionSettingR(   R    R)   t   VpcSecurityGroupR*   R   (   R
   R   R   R   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR      s    c         C   sÎ   | d k r | |  _  n² | d k r0 | |  _ nš | d k rf | j ƒ  d k rZ t |  _ qÊ t |  _ nd | d k rœ | j ƒ  d k r t |  _ qÊ t |  _ n. | d k rº t | ƒ |  _ n t	 |  | | ƒ d  S(   Nt
   OptionNamet   OptionDescriptiont	   PermanentR   t
   Persistentt   Port(
   R   R   R   R   t	   permenantR   R&   t   intR'   R   (   R
   R   R   R   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   Ÿ   s    N(	   R"   R#   R$   R   R   R   R   R   R   (    (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   g   s   				R.   c        
   B   sM   e  Z d  Z d d d e d d d e e d „	 Z d „  Z d „  Z d „  Z RS(   sö  
    Describes a OptionSetting for use in an Option

    :ivar name: The name of the option that has settings that you can set.
    :ivar description: The description of the option setting.
    :ivar value: The current value of the option setting.
    :ivar default_value: The default value of the option setting.
    :ivar allowed_values: The allowed values of the option setting.
    :ivar data_type: The data type of the option setting.
    :ivar apply_type: The DB engine specific parameter type.
    :ivar is_modifiable: A Boolean value that, when true, indicates the option
                         setting can be modified from the default.
    :ivar is_collection: Indicates if the option setting is part of a
                         collection.
    c
   
      C   sU   | |  _  | |  _ | |  _ | |  _ | |  _ | |  _ | |  _ | |  _ |	 |  _ d  S(   N(	   R   R   R   t   default_valuet   allowed_valuest	   data_typet
   apply_typet   is_modifiablet   is_collection(
   R
   R   R   R   R7   R8   R9   R:   R;   R<   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   Å   s    								c         C   s   d |  j  S(   Ns   OptionSetting:%s(   R   (   R
   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   Ò   s    c         C   s   d  S(   N(   R   (   R
   R   R   R   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   Õ   s    c         C   s(  | d k r | |  _  n| d k r0 | |  _ nô | d k rH | |  _ nÜ | d k r` | |  _ nÄ | d k rx | |  _ n¬ | d k r | |  _ n” | d k r¨ | |  _ n| | d k rÞ | j ƒ  d	 k rÒ t |  _	 q$t
 |  _	 nF | d
 k r| j ƒ  d	 k rt |  _ q$t
 |  _ n t |  | | ƒ d  S(   Nt   Namet   Descriptiont   Valuet   DefaultValuet   AllowedValuest   DataTypet	   ApplyTypet   IsModifiableR   t   IsCollection(   R   R   R   R7   R8   R9   R:   R   R   R;   R   R<   R   (   R
   R   R   R   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   Ø   s.    N(	   R"   R#   R$   R   R   R   R   R   R   (    (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR.   ´   s   				R/   c           B   s8   e  Z d  Z d d d „ Z d „  Z d „  Z d „  Z RS(   sA   
    Describes a VPC security group for use in a OptionGroup
    c         C   s   | |  _  | |  _ d  S(   N(   R   t   status(   R
   R   RF   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   ù   s    	c         C   s   d |  j  S(   Ns   VpcSecurityGroup:%s(   R   (   R
   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   ý   s    c         C   s   d  S(   N(    (   R
   R   R   R   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR      s    c         C   sD   | d k r | |  _  n( | d k r0 | |  _ n t |  | | ƒ d  S(   Nt   VpcSecurityGroupIdt   Status(   R   RF   R   (   R
   R   R   R   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR     s
    N(   R"   R#   R$   R   R   R   R   R   (    (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR/   õ   s
   		t   OptionGroupOptionc           B   sS   e  Z d  Z d d d d d e e e d d d d „ Z d „  Z d „  Z d „  Z RS(   sÏ  
    Describes a OptionGroupOption for use in an OptionGroup

    :ivar name: The name of the option
    :ivar description: The description of the option.
    :ivar engine_name: Engine name that this option can be applied to.
    :ivar major_engine_version: Indicates the major engine version that the
                                option is available for.
    :ivar min_minor_engine_version: The minimum required engine version for the
                                    option to be applied.
    :ivar permanent: Indicate if this option is permanent.
    :ivar persistent: Indicate if this option is persistent.
    :ivar port_required: Specifies whether the option requires a port.
    :ivar default_port: If the option requires a port, specifies the default
                        port for the option.
    :ivar settings: The option settings for this option.
    :ivar depends_on: List of all options that are prerequisites for this
                      option.
    c         C   s   | |  _  | |  _ | |  _ | |  _ | |  _ | |  _ | |  _ | |  _ |	 |  _ |
 |  _	 | |  _
 |  j	 d  k r~ g  |  _	 n  |  j
 d  k r™ g  |  _
 n  d  S(   N(   R   R   R   R   t   min_minor_engine_versionR%   R&   t   port_requiredt   default_portR(   t
   depends_onR   (   R
   R   R   R   R   RJ   R%   R&   RK   RL   R(   RM   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR      s    											c         C   s   d |  j  S(   Ns   OptionGroupOption:%s(   R   (   R
   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   6  s    c         C   sG   | d k r' t  d t f g ƒ |  _ n | d k r? g  |  _ n d  Sd  S(   Nt   OptionGroupOptionSettingst   OptionsDependedOn(   R   t   OptionGroupOptionSettingR(   RM   R   (   R
   R   R   R   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   9  s    c         C   sL  | d k r | |  _  n0| d k r0 | |  _ n| d k rH | |  _ n | d k r` | |  _ nè | d k rx | |  _ nÐ | d k r® | j ƒ  d k r¢ t |  _ qHt |  _ nš | d k rä | j ƒ  d k rØ t |  _	 qHt |  _	 nd | d	 k r| j ƒ  d k rt |  _
 qHt |  _
 n. | d
 k r8t | ƒ |  _ n t |  | | ƒ d  S(   NR=   R>   R   R   t!   MinimumRequiredMinorEngineVersionR2   R   R3   t   PortRequiredt   DefaultPort(   R   R   R   R   RJ   R   R   R5   R   R&   RK   R6   RL   R   (   R
   R   R   R   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   C  s2    N(	   R"   R#   R$   R   R   R   R   R   R   (    (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyRI     s   				
RP   c           B   sD   e  Z d  Z d d e d d e d „ Z d „  Z d „  Z d „  Z RS(   s  
    Describes a OptionGroupOptionSetting for use in an OptionGroupOption.

    :ivar name: The name of the option that has settings that you can set.
    :ivar description: The description of the option setting.
    :ivar value: The current value of the option setting.
    :ivar default_value: The default value of the option setting.
    :ivar allowed_values: The allowed values of the option setting.
    :ivar data_type: The data type of the option setting.
    :ivar apply_type: The DB engine specific parameter type.
    :ivar is_modifiable: A Boolean value that, when true, indicates the option
                         setting can be modified from the default.
    :ivar is_collection: Indicates if the option setting is part of a
                         collection.
    c         C   s:   | |  _  | |  _ | |  _ | |  _ | |  _ | |  _ d  S(   N(   R   R   R7   R8   R:   R;   (   R
   R   R   R7   R8   R:   R;   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   t  s    					c         C   s   d |  j  S(   Ns   OptionGroupOptionSetting:%s(   R   (   R
   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   }  s    c         C   s   d  S(   N(   R   (   R
   R   R   R   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   €  s    c         C   sÂ   | d k r | |  _  n¦ | d k r0 | |  _ nŽ | d k rH | |  _ nv | d k r` | |  _ n^ | d k rx | |  _ nF | d k r® | j ƒ  d k r¢ t |  _ q¾ t |  _ n t	 |  | | ƒ d  S(   Nt   SettingNamet   SettingDescriptionR@   RA   RC   RD   R   (
   R   R   R7   R8   R:   R   R   R;   R   R   (   R
   R   R   R   (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyR   ƒ  s    N(	   R"   R#   R$   R   R   R   R   R   R   (    (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyRP   c  s   			N(   R$   t   boto.rds.dbsecuritygroupR    t   boto.resultsetR   t   objectR   R   R.   R/   RI   RP   (    (    (    s3   lib/python2.7/site-packages/boto/rds/optiongroup.pyt   <module>   s   HMAW