77from gooddata_api_client .model .json_api_identity_provider_in import JsonApiIdentityProviderIn
88from gooddata_api_client .model .json_api_identity_provider_in_attributes import JsonApiIdentityProviderInAttributes
99from gooddata_api_client .model .json_api_identity_provider_in_document import JsonApiIdentityProviderInDocument
10+ from gooddata_api_client .model .json_api_identity_provider_patch import JsonApiIdentityProviderPatch
11+ from gooddata_api_client .model .json_api_identity_provider_patch_attributes import JsonApiIdentityProviderPatchAttributes
12+ from gooddata_api_client .model .json_api_identity_provider_patch_document import JsonApiIdentityProviderPatchDocument
1013
1114from gooddata_sdk .catalog .base import Base
1215from gooddata_sdk .utils import safeget
@@ -38,7 +41,6 @@ def init(
3841 identifiers : Optional [list [str ]] = None ,
3942 oauth_client_id : Optional [str ] = None ,
4043 oauth_client_secret : Optional [str ] = None ,
41- oauth_issuer_id : Optional [str ] = None ,
4244 oauth_issuer_location : Optional [str ] = None ,
4345 saml_metadata : Optional [str ] = None ,
4446 ) -> CatalogIdentityProvider :
@@ -49,7 +51,6 @@ def init(
4951 identifiers = identifiers ,
5052 oauth_client_id = oauth_client_id ,
5153 oauth_client_secret = oauth_client_secret ,
52- oauth_issuer_id = oauth_issuer_id ,
5354 oauth_issuer_location = oauth_issuer_location ,
5455 saml_metadata = saml_metadata ,
5556 ),
@@ -63,7 +64,6 @@ def from_api(cls, entity: dict[str, Any]) -> CatalogIdentityProvider:
6364 identifiers = safeget (ea , ["identifiers" ]),
6465 oauth_client_id = safeget (ea , ["oauth_client_id" ]),
6566 oauth_client_secret = safeget (ea , ["oauth_client_secret" ]),
66- oauth_issuer_id = safeget (ea , ["oauth_issuer_id" ]),
6767 oauth_issuer_location = safeget (ea , ["oauth_issuer_location" ]),
6868 saml_metadata = safeget (ea , ["saml_metadata" ]),
6969 )
@@ -72,14 +72,21 @@ def from_api(cls, entity: dict[str, Any]) -> CatalogIdentityProvider:
7272 attributes = attr ,
7373 )
7474
75+ @classmethod
76+ def to_api_patch (cls , identity_provider_id : str , attributes : dict ) -> JsonApiIdentityProviderPatchDocument :
77+ return JsonApiIdentityProviderPatchDocument (
78+ data = JsonApiIdentityProviderPatch (
79+ id = identity_provider_id , attributes = JsonApiIdentityProviderPatchAttributes (** attributes )
80+ )
81+ )
82+
7583
7684@attr .s (auto_attribs = True , kw_only = True )
7785class CatalogIdentityProviderAttributes (Base ):
7886 custom_claim_mapping : Optional [dict [str , str ]] = None
7987 identifiers : Optional [list [str ]] = None
8088 oauth_client_id : Optional [str ] = None
8189 oauth_client_secret : Optional [str ] = None
82- oauth_issuer_id : Optional [str ] = None
8390 oauth_issuer_location : Optional [str ] = None
8491 saml_metadata : Optional [str ] = None
8592
0 commit comments