Skip to content

Commit

Permalink
Merge pull request #916 from gooddata/snapshot-master-291028f1-to-rel…
Browse files Browse the repository at this point in the history
…/dev

[bot] Merge master/291028f1 into rel/dev
  • Loading branch information
yenkins-admin authored Nov 28, 2024
2 parents 2e2a664 + 291028f commit 6908976
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ class CatalogDeclarativeDataSource(Base):
parameters: Optional[list[CatalogParameter]] = None
decoded_parameters: Optional[list[CatalogParameter]] = None
permissions: list[CatalogDeclarativeDataSourcePermission] = attr.field(factory=list)
client_id: Optional[str] = None

def to_test_request(
self,
password: Optional[str] = None,
token: Optional[str] = None,
private_key: Optional[str] = None,
private_key_passphrase: Optional[str] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
) -> TestDefinitionRequest:
kwargs: dict[str, Any] = {"schema": self.schema}
Expand All @@ -125,8 +125,6 @@ def to_test_request(
kwargs["private_key"] = private_key
if private_key_passphrase is not None:
kwargs["private_key_passphrase"] = private_key
if client_id is not None:
kwargs["client_id"] = client_id
if client_secret is not None:
kwargs["client_secret"] = client_secret
return TestDefinitionRequest(type=self.type, url=self.url, **kwargs)
Expand All @@ -147,7 +145,6 @@ def to_api(
token: Optional[str] = None,
private_key: Optional[str] = None,
private_key_passphrase: Optional[str] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
) -> DeclarativeDataSource:
dictionary = self._get_snake_dict()
Expand All @@ -159,8 +156,6 @@ def to_api(
dictionary["private_key"] = private_key
if private_key_passphrase is not None:
dictionary["private_key_passphrase"] = private_key_passphrase
if client_id is not None:
dictionary["client_id"] = client_id
if client_secret is not None:
dictionary["client_secret"] = client_secret
return self.client_class().from_dict(dictionary)
Expand Down

0 comments on commit 6908976

Please sign in to comment.