
                             S r SrSSKJr  SSKrSSKr " S S\5      r\R                  rSr	Sr
SrS	r\r\	r\
r\r\rS
rSq " S S\5      rS rS rg)zProtobuf Runtime versions and validators.

It should only be accessed by Protobuf gencodes and tests. DO NOT USE it
elsewhere.
zshaod@google.com (Dennis Shao)    )EnumNc                       \ rS rSrSrSrSrg)Domain          N)__name__
__module____qualname____firstlineno__GOOGLE_INTERNALPUBLIC__static_attributes__r	       ;lib/third_party/cloudsdk/google/protobuf/runtime_version.pyr   r      s    /&r   r              c                       \ rS rSrSrSrg)VersionError-   z&Exception class for version violation.r	   N)r
   r   r   r   __doc__r   r	   r   r   r   r   -   s    .r   r   c                     [        U 5      e)N)r   )msgs    r   _ReportVersionErrorr   1   s    Sr   c           
         [         R                  " S5      nUb  UR                  5       S:X  a  g[         S[         S[
         [         3nU SU SU U 3nUS:  d  US:  d  US:  a  [        SU 35      eSn	U [        :w  a-  [        SU S	U R                   S
[        R                   S35        [        U:  d2  [        U:X  a
  [        U:  d  [        U:X  a.  [        U:X  a#  [
        U:  a  [        SU S	U S
U SU	 35        gggg)a  Function to validate versions.

Args:
  gen_domain: The domain where the code was generated from.
  gen_major: The major version number of the gencode.
  gen_minor: The minor version number of the gencode.
  gen_patch: The patch version number of the gencode.
  gen_suffix: The version suffix e.g. '-dev', '-rc1' of the gencode.
  location: The proto location that causes the version violation.

Raises:
  VersionError: if gencode version is invalid or incompatible with the
  runtime.
*TEMPORARILY_DISABLE_PROTOBUF_VERSION_CHECKNtrue.r   zInvalid gencode version: z`See Protobuf version guarantees at https://protobuf.dev/support/cross-version-runtime-guarantee.zBDetected mismatched Protobuf Gencode/Runtime domains when loading z
: gencode z	 runtime z2. Cross-domain usage of Protobuf is not supported.zEDetected incompatible Protobuf Gencode/Runtime versions when loading zC. Runtime version cannot be older than the linked gencode version. )osgetenvlowerMAJORMINORPATCHSUFFIXr   DOMAINr   name)

gen_domain	gen_major	gen_minor	gen_patch
gen_suffixlocationdisable_flagversiongen_versionerror_prompts
             r   ValidateProtobufRuntimeVersionr5   5   s8   $ GH,,"4"4"6&"@
 gQugQugfX.'+Qyk9+j\B+]i!my1}
2;-@
AAG 
 6	:Z
0	&++ G<	< i
9
!2
9
)!3	8I	:Z}IgY ?==IN	L 9J!3
r   )r   
__author__enumr   r"   warningsr   r   
OSS_DOMAIN	OSS_MAJOR	OSS_MINOR	OSS_PATCH
OSS_SUFFIXr)   r%   r&   r'   r(   _MAX_WARNING_COUNT_warning_count	Exceptionr   r   r5   r	   r   r   <module>rA      s    .
  	 T  ]]
			
		  /9 /3r   