
                         .    d Z ddlZddlmZ ddlmZ d Zy)zLArgument processors for Zone Management identity provider surface arguments.    N)
exceptions)yamlc           
      H   |j                   }	 t        |d      5 }|j                         }	 t        j                  |      }||j                  _        ddd       | j                         |j                  j                  _        |S # t        j
                  $ rR 	 t        j                  |      }n8# t        j                  $ r"}t        j                  dd| d|       |d}~ww xY wY w xY w# 1 sw Y   xY w# t        $ r}t        j                  dd|       |d}~ww xY w)aY  Reads the oidc config from the file and populates the request body.

  Args:
    ref: The resource reference.
    args: The parsed arguments from the command line.
    req: The request to modify.

  Returns:
    The modified request.

  Raises:`
    exceptions.InvalidArgumentException: If file cannot be read or is not a
    valid json/yaml.
  rconfigzError parsing file z3. Please provide a valid json or yaml file. Error: NzFile not found: )r   openreadjsonloadsJSONDecodeErrorr   loadYAMLParseErrorr   InvalidArgumentExceptioncreateIdentityProviderRequestidentityProviderFileNotFoundErrorRelativeNamename)refargsreq	file_pathfcontentidpes           Ilib/googlecloudsdk/command_lib/zone_management/identity_provider/hooks.pyAddOidcConfigToRequestr      s)    kk)	i	g
jj! <?c''8 
$ =@<L<L<N###449	* !! 			'"#"" 	33#I; /$$%3( 		 	 
	 
 

-
-$YK0su   C9 C-BC-C9 C*B/.C*/C$CC$$C*'C-)C**C--C62C9 9	D!DD!)__doc__r
   googlecloudsdk.callioper   googlecloudsdk.corer   r        r   <module>r$      s    S  . $$r#   