-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #381 from hkad98/psdk-161
RELEASED: PSDK-161 add organizationSettings, cspDirectives support Reviewed-by: Jan Soubusta https://github.com/jaceksan
- Loading branch information
Showing
14 changed files
with
4,457 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
gooddata-sdk/gooddata_sdk/catalog/organization/entity_model/directive.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# (C) 2023 GoodData Corporation | ||
from __future__ import annotations | ||
|
||
from typing import List, Type | ||
|
||
import attr | ||
|
||
from gooddata_api_client.model.json_api_csp_directive_in import JsonApiCspDirectiveIn | ||
from gooddata_api_client.model.json_api_csp_directive_in_attributes import JsonApiCspDirectiveInAttributes | ||
from gooddata_sdk.catalog.base import Base | ||
|
||
|
||
@attr.s(auto_attribs=True, kw_only=True) | ||
class CatalogCspDirective(Base): | ||
id: str | ||
attributes: CatalogCspDirectiveAttributes | ||
|
||
@classmethod | ||
def init(cls, directive_id: str, sources: List[str]) -> CatalogCspDirective: | ||
return cls(id=directive_id, attributes=CatalogCspDirectiveAttributes(sources=sources)) | ||
|
||
@staticmethod | ||
def client_class() -> Type[JsonApiCspDirectiveIn]: | ||
return JsonApiCspDirectiveIn | ||
|
||
|
||
@attr.s(auto_attribs=True, kw_only=True) | ||
class CatalogCspDirectiveAttributes(Base): | ||
sources: List[str] | ||
|
||
@staticmethod | ||
def client_class() -> Type[JsonApiCspDirectiveInAttributes]: | ||
return JsonApiCspDirectiveInAttributes |
34 changes: 34 additions & 0 deletions
34
gooddata-sdk/gooddata_sdk/catalog/organization/entity_model/setting.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# (C) 2023 GoodData Corporation | ||
from __future__ import annotations | ||
|
||
from typing import Any, Dict, Optional, Type | ||
|
||
import attr | ||
|
||
from gooddata_api_client.model.json_api_organization_setting_in import JsonApiOrganizationSettingIn | ||
from gooddata_api_client.model.json_api_organization_setting_in_attributes import JsonApiOrganizationSettingInAttributes | ||
from gooddata_sdk.catalog.base import Base | ||
|
||
|
||
@attr.s(auto_attribs=True, kw_only=True) | ||
class CatalogOrganizationSetting(Base): | ||
id: str | ||
attributes: CatalogOrganizationSettingAttributes | ||
|
||
@classmethod | ||
def init(cls, setting_id: str, setting_type: str, content: Dict[str, Any]) -> CatalogOrganizationSetting: | ||
return cls(id=setting_id, attributes=CatalogOrganizationSettingAttributes(type=setting_type, content=content)) | ||
|
||
@staticmethod | ||
def client_class() -> Type[JsonApiOrganizationSettingIn]: | ||
return JsonApiOrganizationSettingIn | ||
|
||
|
||
@attr.s(auto_attribs=True, kw_only=True) | ||
class CatalogOrganizationSettingAttributes(Base): | ||
type: Optional[str] | ||
content: Dict[str, Any] | ||
|
||
@staticmethod | ||
def client_class() -> Type[JsonApiOrganizationSettingInAttributes]: | ||
return JsonApiOrganizationSettingInAttributes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.