@@ -2581,6 +2581,277 @@ def _delete_service_federated_identity_provider_serialize(
25812581 _request_auth = _request_auth ,
25822582 )
25832583
2584+ @validate_call
2585+ def get_federated_identity_provider (
2586+ self ,
2587+ project_id : Annotated [StrictStr , Field (description = "The ID of the project." )],
2588+ service_account_email : Annotated [StrictStr , Field (description = "The email of the service account." )],
2589+ federation_id : Annotated [UUID , Field (description = "ID of the Federated Identity Provider." )],
2590+ _request_timeout : Union [
2591+ None ,
2592+ Annotated [StrictFloat , Field (gt = 0 )],
2593+ Tuple [Annotated [StrictFloat , Field (gt = 0 )], Annotated [StrictFloat , Field (gt = 0 )]],
2594+ ] = None ,
2595+ _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
2596+ _content_type : Optional [StrictStr ] = None ,
2597+ _headers : Optional [Dict [StrictStr , Any ]] = None ,
2598+ _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
2599+ ) -> FederatedIdentityProvider :
2600+ """Get a service account Federated Identity Provider
2601+
2602+ Get a Federated Identity Provider of the service account by its ID.
2603+
2604+ :param project_id: The ID of the project. (required)
2605+ :type project_id: str
2606+ :param service_account_email: The email of the service account. (required)
2607+ :type service_account_email: str
2608+ :param federation_id: ID of the Federated Identity Provider. (required)
2609+ :type federation_id: UUID
2610+ :param _request_timeout: timeout setting for this request. If one
2611+ number provided, it will be total request
2612+ timeout. It can also be a pair (tuple) of
2613+ (connection, read) timeouts.
2614+ :type _request_timeout: int, tuple(int, int), optional
2615+ :param _request_auth: set to override the auth_settings for an a single
2616+ request; this effectively ignores the
2617+ authentication in the spec for a single request.
2618+ :type _request_auth: dict, optional
2619+ :param _content_type: force content-type for the request.
2620+ :type _content_type: str, Optional
2621+ :param _headers: set to override the headers for a single
2622+ request; this effectively ignores the headers
2623+ in the spec for a single request.
2624+ :type _headers: dict, optional
2625+ :param _host_index: set to override the host_index for a single
2626+ request; this effectively ignores the host_index
2627+ in the spec for a single request.
2628+ :type _host_index: int, optional
2629+ :return: Returns the result object.
2630+ """ # noqa: E501
2631+
2632+ _param = self ._get_federated_identity_provider_serialize (
2633+ project_id = project_id ,
2634+ service_account_email = service_account_email ,
2635+ federation_id = federation_id ,
2636+ _request_auth = _request_auth ,
2637+ _content_type = _content_type ,
2638+ _headers = _headers ,
2639+ _host_index = _host_index ,
2640+ )
2641+
2642+ _response_types_map : Dict [str , Optional [str ]] = {
2643+ "200" : "FederatedIdentityProvider" ,
2644+ "400" : "Error" ,
2645+ "401" : "AuthError" ,
2646+ "403" : "AuthError" ,
2647+ "404" : "Error" ,
2648+ "500" : "Error" ,
2649+ }
2650+ response_data = self .api_client .call_api (* _param , _request_timeout = _request_timeout )
2651+ response_data .read ()
2652+ return self .api_client .response_deserialize (
2653+ response_data = response_data ,
2654+ response_types_map = _response_types_map ,
2655+ ).data
2656+
2657+ @validate_call
2658+ def get_federated_identity_provider_with_http_info (
2659+ self ,
2660+ project_id : Annotated [StrictStr , Field (description = "The ID of the project." )],
2661+ service_account_email : Annotated [StrictStr , Field (description = "The email of the service account." )],
2662+ federation_id : Annotated [UUID , Field (description = "ID of the Federated Identity Provider." )],
2663+ _request_timeout : Union [
2664+ None ,
2665+ Annotated [StrictFloat , Field (gt = 0 )],
2666+ Tuple [Annotated [StrictFloat , Field (gt = 0 )], Annotated [StrictFloat , Field (gt = 0 )]],
2667+ ] = None ,
2668+ _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
2669+ _content_type : Optional [StrictStr ] = None ,
2670+ _headers : Optional [Dict [StrictStr , Any ]] = None ,
2671+ _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
2672+ ) -> ApiResponse [FederatedIdentityProvider ]:
2673+ """Get a service account Federated Identity Provider
2674+
2675+ Get a Federated Identity Provider of the service account by its ID.
2676+
2677+ :param project_id: The ID of the project. (required)
2678+ :type project_id: str
2679+ :param service_account_email: The email of the service account. (required)
2680+ :type service_account_email: str
2681+ :param federation_id: ID of the Federated Identity Provider. (required)
2682+ :type federation_id: UUID
2683+ :param _request_timeout: timeout setting for this request. If one
2684+ number provided, it will be total request
2685+ timeout. It can also be a pair (tuple) of
2686+ (connection, read) timeouts.
2687+ :type _request_timeout: int, tuple(int, int), optional
2688+ :param _request_auth: set to override the auth_settings for an a single
2689+ request; this effectively ignores the
2690+ authentication in the spec for a single request.
2691+ :type _request_auth: dict, optional
2692+ :param _content_type: force content-type for the request.
2693+ :type _content_type: str, Optional
2694+ :param _headers: set to override the headers for a single
2695+ request; this effectively ignores the headers
2696+ in the spec for a single request.
2697+ :type _headers: dict, optional
2698+ :param _host_index: set to override the host_index for a single
2699+ request; this effectively ignores the host_index
2700+ in the spec for a single request.
2701+ :type _host_index: int, optional
2702+ :return: Returns the result object.
2703+ """ # noqa: E501
2704+
2705+ _param = self ._get_federated_identity_provider_serialize (
2706+ project_id = project_id ,
2707+ service_account_email = service_account_email ,
2708+ federation_id = federation_id ,
2709+ _request_auth = _request_auth ,
2710+ _content_type = _content_type ,
2711+ _headers = _headers ,
2712+ _host_index = _host_index ,
2713+ )
2714+
2715+ _response_types_map : Dict [str , Optional [str ]] = {
2716+ "200" : "FederatedIdentityProvider" ,
2717+ "400" : "Error" ,
2718+ "401" : "AuthError" ,
2719+ "403" : "AuthError" ,
2720+ "404" : "Error" ,
2721+ "500" : "Error" ,
2722+ }
2723+ response_data = self .api_client .call_api (* _param , _request_timeout = _request_timeout )
2724+ response_data .read ()
2725+ return self .api_client .response_deserialize (
2726+ response_data = response_data ,
2727+ response_types_map = _response_types_map ,
2728+ )
2729+
2730+ @validate_call
2731+ def get_federated_identity_provider_without_preload_content (
2732+ self ,
2733+ project_id : Annotated [StrictStr , Field (description = "The ID of the project." )],
2734+ service_account_email : Annotated [StrictStr , Field (description = "The email of the service account." )],
2735+ federation_id : Annotated [UUID , Field (description = "ID of the Federated Identity Provider." )],
2736+ _request_timeout : Union [
2737+ None ,
2738+ Annotated [StrictFloat , Field (gt = 0 )],
2739+ Tuple [Annotated [StrictFloat , Field (gt = 0 )], Annotated [StrictFloat , Field (gt = 0 )]],
2740+ ] = None ,
2741+ _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
2742+ _content_type : Optional [StrictStr ] = None ,
2743+ _headers : Optional [Dict [StrictStr , Any ]] = None ,
2744+ _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
2745+ ) -> RESTResponseType :
2746+ """Get a service account Federated Identity Provider
2747+
2748+ Get a Federated Identity Provider of the service account by its ID.
2749+
2750+ :param project_id: The ID of the project. (required)
2751+ :type project_id: str
2752+ :param service_account_email: The email of the service account. (required)
2753+ :type service_account_email: str
2754+ :param federation_id: ID of the Federated Identity Provider. (required)
2755+ :type federation_id: UUID
2756+ :param _request_timeout: timeout setting for this request. If one
2757+ number provided, it will be total request
2758+ timeout. It can also be a pair (tuple) of
2759+ (connection, read) timeouts.
2760+ :type _request_timeout: int, tuple(int, int), optional
2761+ :param _request_auth: set to override the auth_settings for an a single
2762+ request; this effectively ignores the
2763+ authentication in the spec for a single request.
2764+ :type _request_auth: dict, optional
2765+ :param _content_type: force content-type for the request.
2766+ :type _content_type: str, Optional
2767+ :param _headers: set to override the headers for a single
2768+ request; this effectively ignores the headers
2769+ in the spec for a single request.
2770+ :type _headers: dict, optional
2771+ :param _host_index: set to override the host_index for a single
2772+ request; this effectively ignores the host_index
2773+ in the spec for a single request.
2774+ :type _host_index: int, optional
2775+ :return: Returns the result object.
2776+ """ # noqa: E501
2777+
2778+ _param = self ._get_federated_identity_provider_serialize (
2779+ project_id = project_id ,
2780+ service_account_email = service_account_email ,
2781+ federation_id = federation_id ,
2782+ _request_auth = _request_auth ,
2783+ _content_type = _content_type ,
2784+ _headers = _headers ,
2785+ _host_index = _host_index ,
2786+ )
2787+
2788+ _response_types_map : Dict [str , Optional [str ]] = {
2789+ "200" : "FederatedIdentityProvider" ,
2790+ "400" : "Error" ,
2791+ "401" : "AuthError" ,
2792+ "403" : "AuthError" ,
2793+ "404" : "Error" ,
2794+ "500" : "Error" ,
2795+ }
2796+ response_data = self .api_client .call_api (* _param , _request_timeout = _request_timeout )
2797+ return response_data .response
2798+
2799+ def _get_federated_identity_provider_serialize (
2800+ self ,
2801+ project_id ,
2802+ service_account_email ,
2803+ federation_id ,
2804+ _request_auth ,
2805+ _content_type ,
2806+ _headers ,
2807+ _host_index ,
2808+ ) -> RequestSerialized :
2809+
2810+ _host = None
2811+
2812+ _collection_formats : Dict [str , str ] = {}
2813+
2814+ _path_params : Dict [str , str ] = {}
2815+ _query_params : List [Tuple [str , str ]] = []
2816+ _header_params : Dict [str , Optional [str ]] = _headers or {}
2817+ _form_params : List [Tuple [str , str ]] = []
2818+ _files : Dict [str , Union [str , bytes , List [str ], List [bytes ], List [Tuple [str , bytes ]]]] = {}
2819+ _body_params : Optional [bytes ] = None
2820+
2821+ # process the path parameters
2822+ if project_id is not None :
2823+ _path_params ["projectId" ] = project_id
2824+ if service_account_email is not None :
2825+ _path_params ["serviceAccountEmail" ] = service_account_email
2826+ if federation_id is not None :
2827+ _path_params ["federationId" ] = federation_id
2828+ # process the query parameters
2829+ # process the header parameters
2830+ # process the form parameters
2831+ # process the body parameter
2832+
2833+ # set the HTTP header `Accept`
2834+ if "Accept" not in _header_params :
2835+ _header_params ["Accept" ] = self .api_client .select_header_accept (["application/json" ])
2836+
2837+ # authentication setting
2838+ _auth_settings : List [str ] = []
2839+
2840+ return self .api_client .param_serialize (
2841+ method = "GET" ,
2842+ resource_path = "/v2/projects/{projectId}/service-accounts/{serviceAccountEmail}/federations/{federationId}" ,
2843+ path_params = _path_params ,
2844+ query_params = _query_params ,
2845+ header_params = _header_params ,
2846+ body = _body_params ,
2847+ post_params = _form_params ,
2848+ files = _files ,
2849+ auth_settings = _auth_settings ,
2850+ collection_formats = _collection_formats ,
2851+ _host = _host ,
2852+ _request_auth = _request_auth ,
2853+ )
2854+
25842855 @validate_call
25852856 def get_jwks (
25862857 self ,
0 commit comments