o
    ɶd                      @   s8   d dl mZmZmZ d dlmZ eG dd deZdS )    )formatted_flat_dictNONE_SENTINEL#value_allowed_none_or_none_sentinel)init_model_state_from_kwargsc                   @   s   e Zd ZdZdZdZdZdZdZdZ	dZ
d	d
 Zedd Zedd Zejdd Zedd Zejdd Zedd Zejdd Zedd Zejdd Zdd Zdd Zdd ZdS ) BuildSourcez4
    Build source required for the Build stage.
    GITHUBGITLABGITLAB_SERVERBITBUCKET_CLOUDBITBUCKET_SERVERDEVOPS_CODE_REPOSITORYVBSc                 K   s<   ddddd| _ ddddd| _d| _d| _d| _d| _dS )a\  
        Initializes a new BuildSource object with values from keyword arguments. This class has the following subclasses and if you are using this class as input
        to a service operations then you should favor using a subclass over the base class:

        * :class:`~oci.devops.models.VbsBuildSource`
        * :class:`~oci.devops.models.BitbucketServerBuildSource`
        * :class:`~oci.devops.models.GithubBuildSource`
        * :class:`~oci.devops.models.BitbucketCloudBuildSource`
        * :class:`~oci.devops.models.GitlabServerBuildSource`
        * :class:`~oci.devops.models.DevopsCodeRepositoryBuildSource`
        * :class:`~oci.devops.models.GitlabBuildSource`

        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param name:
            The value to assign to the name property of this BuildSource.
        :type name: str

        :param connection_type:
            The value to assign to the connection_type property of this BuildSource.
            Allowed values for this property are: "GITHUB", "GITLAB", "GITLAB_SERVER", "BITBUCKET_CLOUD", "BITBUCKET_SERVER", "DEVOPS_CODE_REPOSITORY", "VBS", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type connection_type: str

        :param repository_url:
            The value to assign to the repository_url property of this BuildSource.
        :type repository_url: str

        :param branch:
            The value to assign to the branch property of this BuildSource.
        :type branch: str

        str)nameconnection_typerepository_urlbranchr   connectionTypeZrepositoryUrlr   N)Zswagger_typesZattribute_map_name_connection_type_repository_url_branch)selfkwargs r   Busr/lib/python3.10/site-packages/oci/devops/models/build_source.py__init__.   s   #
zBuildSource.__init__c                 C   s`   | d }|dkr
dS |dkrdS |dkrdS |dkrd	S |d
kr"dS |dkr(dS |dkr.dS dS )z
        Given the hash representation of a subtype of this class,
        use the info in the hash to return the class of the subtype.
        r   r   ZVbsBuildSourcer   ZBitbucketServerBuildSourcer   ZGithubBuildSourcer
   ZBitbucketCloudBuildSourcer	   ZGitlabServerBuildSourcer   ZDevopsCodeRepositoryBuildSourcer   ZGitlabBuildSourcer   r   )Zobject_dictionarytyper   r   r   get_subtypec   s    zBuildSource.get_subtypec                 C      | j S )a@  
        **[Required]** Gets the name of this BuildSource.
        Name of the build source. This must be unique within a build source collection. The name can be used by customers to locate the working directory pertinent to this repository.


        :return: The name of this BuildSource.
        :rtype: str
        r   r   r   r   r   r         
zBuildSource.namec                 C   
   || _ dS )a4  
        Sets the name of this BuildSource.
        Name of the build source. This must be unique within a build source collection. The name can be used by customers to locate the working directory pertinent to this repository.


        :param name: The name of this BuildSource.
        :type: str
        Nr    )r   r   r   r   r   r         

c                 C   r   )a  
        **[Required]** Gets the connection_type of this BuildSource.
        The type of source provider.

        Allowed values for this property are: "GITHUB", "GITLAB", "GITLAB_SERVER", "BITBUCKET_CLOUD", "BITBUCKET_SERVER", "DEVOPS_CODE_REPOSITORY", "VBS", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The connection_type of this BuildSource.
        :rtype: str
        )r   r!   r   r   r   r      s   zBuildSource.connection_typec                 C   s    g d}t ||sd}|| _dS )z
        Sets the connection_type of this BuildSource.
        The type of source provider.


        :param connection_type: The connection_type of this BuildSource.
        :type: str
        )r   r   r	   r
   r   r   r   ZUNKNOWN_ENUM_VALUEN)r   r   )r   r   Zallowed_valuesr   r   r   r      s   


c                 C   r   )z
        **[Required]** Gets the repository_url of this BuildSource.
        URL for the repository.


        :return: The repository_url of this BuildSource.
        :rtype: str
        r   r!   r   r   r   r      r"   zBuildSource.repository_urlc                 C   r#   )z
        Sets the repository_url of this BuildSource.
        URL for the repository.


        :param repository_url: The repository_url of this BuildSource.
        :type: str
        Nr%   )r   r   r   r   r   r      r$   c                 C   r   )z
        **[Required]** Gets the branch of this BuildSource.
        Branch name.


        :return: The branch of this BuildSource.
        :rtype: str
        r   r!   r   r   r   r      r"   zBuildSource.branchc                 C   r#   )z
        Sets the branch of this BuildSource.
        Branch name.


        :param branch: The branch of this BuildSource.
        :type: str
        Nr&   )r   r   r   r   r   r      r$   c                 C   s   t | S N)r   r!   r   r   r   __repr__   s   zBuildSource.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r   otherr   r   r   __eq__   s   zBuildSource.__eq__c                 C   s
   | |k S r'   r   r*   r   r   r   __ne__   s   
zBuildSource.__ne__N)__name__
__module____qualname____doc__ZCONNECTION_TYPE_GITHUBZCONNECTION_TYPE_GITLABZCONNECTION_TYPE_GITLAB_SERVERZCONNECTION_TYPE_BITBUCKET_CLOUDZ CONNECTION_TYPE_BITBUCKET_SERVERZ&CONNECTION_TYPE_DEVOPS_CODE_REPOSITORYZCONNECTION_TYPE_VBSr   staticmethodr   propertyr   setterr   r   r   r(   r,   r-   r   r   r   r   r      s>    5








r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r   r   r   r   <module>   s   