From 711e53c5e6cdc827d40a50b5da1cec3c88a36136 Mon Sep 17 00:00:00 2001 From: svc-excavator-bot Date: Mon, 16 Mar 2026 19:42:37 +0000 Subject: [PATCH] Excavator: Upgrade API Version --- README.md | 49 +++ docs-snippets-npm/package.json | 2 +- docs-snippets-npm/src/index.ts | 66 +++- docs/v2/Admin/AuthenticationProvider.md | 12 +- docs/v2/Admin/CbacBanner.md | 61 ++++ docs/v2/Admin/CbacMarkingRestrictions.md | 58 +++ docs/v2/Admin/Enrollment.md | 4 +- docs/v2/Admin/EnrollmentRoleAssignment.md | 6 +- docs/v2/Admin/GroupMember.md | 13 +- docs/v2/Admin/GroupProviderInfo.md | 16 +- docs/v2/Admin/Host.md | 2 +- docs/v2/Admin/MarkingCategory.md | 19 +- docs/v2/Admin/Organization.md | 23 +- docs/v2/Admin/OrganizationGuestMember.md | 59 +++ docs/v2/Admin/OrganizationRoleAssignment.md | 23 +- docs/v2/Admin/User.md | 17 +- docs/v2/Admin/UserProviderInfo.md | 16 +- docs/v2/Admin/models/CbacBanner.md | 14 + .../models/CbacBannerClassificationString.md | 11 + .../Admin/models/CbacMarkingRestrictions.md | 15 + .../models/CbacMarkingRestrictionsIsValid.md | 11 + ...arkingRestrictionsUserSatisfiesMarkings.md | 11 + .../models/ClassificationBannerDisplayType.md | 12 + docs/v2/Admin/models/GroupMember.md | 1 + .../ListOrganizationGuestMembersResponse.md | 12 + .../Admin/models/OrganizationGuestMember.md | 12 + docs/v2/Checkpoints/models/CheckpointType.md | 4 + .../v2/Checkpoints/models/CheckpointedItem.md | 1 + .../Checkpoints/models/CheckpointedItemId.md | 1 + .../models/CheckpointedPeeringJob.md | 12 + .../models/CheckpointedPeeringJobId.md | 12 + .../models/CheckpointedResourceType.md | 1 + docs/v2/Core/models/Color.md | 11 + docs/v2/Filesystem/Folder.md | 59 +++ .../Filesystem/models/ReplaceFolderRequest.md | 12 + docs/v2/MediaSets/MediaSet.md | 82 +++++ .../MediaSets/models/DocumentDecodeFormat.md | 2 + docs/v2/MediaSets/models/MediaSchema.md | 1 + docs/v2/Models/ModelStudioConfigVersion.md | 2 +- docs/v2/Models/models/Experiment.md | 1 - docs/v2/Models/models/GpuType.md | 18 + docs/v2/Models/models/ModelStudioRun.md | 1 + docs/v2/Models/models/ModelVersion.md | 3 + .../ModelVersionCodeRepositorySource.md | 13 + .../models/ModelVersionCodeWorkspaceSource.md | 13 + .../models/ModelVersionContainerizedSource.md | 11 + .../models/ModelVersionExternalSource.md | 11 + .../models/ModelVersionModelStudioSource.md | 12 + .../models/ModelVersionPromotedSource.md | 13 + .../v2/Models/models/ModelVersionSdkSource.md | 11 + docs/v2/Models/models/ModelVersionSource.md | 21 ++ .../v2/Models/models/ResourceConfiguration.md | 3 +- docs/v2/Ontologies/ObjectType.md | 62 ++++ .../models/AggregationDurationGroupingV2.md | 4 +- .../models/AggregationExactGroupingV2.md | 5 +- .../models/AggregationFixedWidthGroupingV2.md | 5 +- .../models/AggregationRangesGroupingV2.md | 5 +- .../ApproximateDistinctAggregationV2.md | 5 +- .../ApproximatePercentileAggregationV2.md | 5 +- docs/v2/Ontologies/models/AvgAggregationV2.md | 5 +- .../models/ExactDistinctAggregationV2.md | 8 +- .../models/GetObjectTypeByRidBatchRequest.md | 11 + .../GetObjectTypeByRidBatchRequestElement.md | 11 + .../models/GetObjectTypeByRidBatchResponse.md | 11 + docs/v2/Ontologies/models/MaxAggregationV2.md | 5 +- docs/v2/Ontologies/models/MinAggregationV2.md | 5 +- docs/v2/Ontologies/models/SumAggregationV2.md | 5 +- docs/v2/Orchestration/Build.md | 6 + docs/v2/Orchestration/Job.md | 6 + foundry_sdk/_version.py | 2 +- foundry_sdk/v2/admin/_client.py | 32 ++ foundry_sdk/v2/admin/cbac_banner.py | 215 +++++++++++ .../v2/admin/cbac_marking_restrictions.py | 203 +++++++++++ foundry_sdk/v2/admin/errors.py | 120 +++++++ foundry_sdk/v2/admin/group_member.py | 16 +- foundry_sdk/v2/admin/group_provider_info.py | 28 +- foundry_sdk/v2/admin/marking_category.py | 22 +- foundry_sdk/v2/admin/models.py | 71 ++++ foundry_sdk/v2/admin/organization.py | 66 ++-- .../v2/admin/organization_guest_member.py | 203 +++++++++++ .../v2/admin/organization_role_assignment.py | 42 +-- foundry_sdk/v2/admin/user.py | 34 +- foundry_sdk/v2/admin/user_provider_info.py | 28 +- foundry_sdk/v2/checkpoints/models.py | 25 ++ foundry_sdk/v2/cli.py | 338 ++++++++++++++---- foundry_sdk/v2/core/models.py | 5 + foundry_sdk/v2/filesystem/errors.py | 46 +++ foundry_sdk/v2/filesystem/folder.py | 156 ++++++++ foundry_sdk/v2/filesystem/models.py | 13 + foundry_sdk/v2/media_sets/media_set.py | 144 ++++++++ foundry_sdk/v2/media_sets/models.py | 3 +- foundry_sdk/v2/models/errors.py | 14 + foundry_sdk/v2/models/model_version.py | 20 +- foundry_sdk/v2/models/models.py | 97 ++++- foundry_sdk/v2/ontologies/models.py | 109 ++++-- foundry_sdk/v2/ontologies/object_type.py | 133 +++++++ foundry_sdk/v2/orchestration/build.py | 12 + foundry_sdk/v2/orchestration/job.py | 12 + tests/test_resource_import.py | 18 + 99 files changed, 2863 insertions(+), 404 deletions(-) create mode 100644 docs/v2/Admin/CbacBanner.md create mode 100644 docs/v2/Admin/CbacMarkingRestrictions.md create mode 100644 docs/v2/Admin/OrganizationGuestMember.md create mode 100644 docs/v2/Admin/models/CbacBanner.md create mode 100644 docs/v2/Admin/models/CbacBannerClassificationString.md create mode 100644 docs/v2/Admin/models/CbacMarkingRestrictions.md create mode 100644 docs/v2/Admin/models/CbacMarkingRestrictionsIsValid.md create mode 100644 docs/v2/Admin/models/CbacMarkingRestrictionsUserSatisfiesMarkings.md create mode 100644 docs/v2/Admin/models/ClassificationBannerDisplayType.md create mode 100644 docs/v2/Admin/models/ListOrganizationGuestMembersResponse.md create mode 100644 docs/v2/Admin/models/OrganizationGuestMember.md create mode 100644 docs/v2/Checkpoints/models/CheckpointedPeeringJob.md create mode 100644 docs/v2/Checkpoints/models/CheckpointedPeeringJobId.md create mode 100644 docs/v2/Core/models/Color.md create mode 100644 docs/v2/Filesystem/models/ReplaceFolderRequest.md create mode 100644 docs/v2/Models/models/GpuType.md create mode 100644 docs/v2/Models/models/ModelVersionCodeRepositorySource.md create mode 100644 docs/v2/Models/models/ModelVersionCodeWorkspaceSource.md create mode 100644 docs/v2/Models/models/ModelVersionContainerizedSource.md create mode 100644 docs/v2/Models/models/ModelVersionExternalSource.md create mode 100644 docs/v2/Models/models/ModelVersionModelStudioSource.md create mode 100644 docs/v2/Models/models/ModelVersionPromotedSource.md create mode 100644 docs/v2/Models/models/ModelVersionSdkSource.md create mode 100644 docs/v2/Models/models/ModelVersionSource.md create mode 100644 docs/v2/Ontologies/models/GetObjectTypeByRidBatchRequest.md create mode 100644 docs/v2/Ontologies/models/GetObjectTypeByRidBatchRequestElement.md create mode 100644 docs/v2/Ontologies/models/GetObjectTypeByRidBatchResponse.md create mode 100644 foundry_sdk/v2/admin/cbac_banner.py create mode 100644 foundry_sdk/v2/admin/cbac_marking_restrictions.py create mode 100644 foundry_sdk/v2/admin/organization_guest_member.py diff --git a/README.md b/README.md index d7ecfdedf..9b48d29f8 100644 --- a/README.md +++ b/README.md @@ -665,6 +665,13 @@ Namespace | Resource | Operation | HTTP request | **Admin** | AuthenticationProvider | [**list**](docs/v2/Admin/AuthenticationProvider.md#list) | **GET** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders | **Admin** | AuthenticationProvider | [**preregister_group**](docs/v2/Admin/AuthenticationProvider.md#preregister_group) | **POST** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterGroup | **Admin** | AuthenticationProvider | [**preregister_user**](docs/v2/Admin/AuthenticationProvider.md#preregister_user) | **POST** /v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterUser | +**Admin** | CbacBanner | [**get**](docs/v2/Admin/CbacBanner.md#get) | **GET** /v2/admin/cbacBanner | +**Admin** | CbacMarkingRestrictions | [**get**](docs/v2/Admin/CbacMarkingRestrictions.md#get) | **GET** /v2/admin/cbacMarkingRestrictions | +**Admin** | Enrollment | [**get**](docs/v2/Admin/Enrollment.md#get) | **GET** /v2/admin/enrollments/{enrollmentRid} | +**Admin** | Enrollment | [**get_current**](docs/v2/Admin/Enrollment.md#get_current) | **GET** /v2/admin/enrollments/getCurrent | +**Admin** | EnrollmentRoleAssignment | [**add**](docs/v2/Admin/EnrollmentRoleAssignment.md#add) | **POST** /v2/admin/enrollments/{enrollmentRid}/roleAssignments/add | +**Admin** | EnrollmentRoleAssignment | [**list**](docs/v2/Admin/EnrollmentRoleAssignment.md#list) | **GET** /v2/admin/enrollments/{enrollmentRid}/roleAssignments | +**Admin** | EnrollmentRoleAssignment | [**remove**](docs/v2/Admin/EnrollmentRoleAssignment.md#remove) | **POST** /v2/admin/enrollments/{enrollmentRid}/roleAssignments/remove | **Admin** | Group | [**create**](docs/v2/Admin/Group.md#create) | **POST** /v2/admin/groups | **Admin** | Group | [**delete**](docs/v2/Admin/Group.md#delete) | **DELETE** /v2/admin/groups/{groupId} | **Admin** | Group | [**get**](docs/v2/Admin/Group.md#get) | **GET** /v2/admin/groups/{groupId} | @@ -679,19 +686,23 @@ Namespace | Resource | Operation | HTTP request | **Admin** | GroupMembershipExpirationPolicy | [**replace**](docs/v2/Admin/GroupMembershipExpirationPolicy.md#replace) | **PUT** /v2/admin/groups/{groupId}/membershipExpirationPolicy | **Admin** | GroupProviderInfo | [**get**](docs/v2/Admin/GroupProviderInfo.md#get) | **GET** /v2/admin/groups/{groupId}/providerInfo | **Admin** | GroupProviderInfo | [**replace**](docs/v2/Admin/GroupProviderInfo.md#replace) | **PUT** /v2/admin/groups/{groupId}/providerInfo | +**Admin** | Host | [**list**](docs/v2/Admin/Host.md#list) | **GET** /v2/admin/enrollments/{enrollmentRid}/hosts | **Admin** | Marking | [**create**](docs/v2/Admin/Marking.md#create) | **POST** /v2/admin/markings | **Admin** | Marking | [**get**](docs/v2/Admin/Marking.md#get) | **GET** /v2/admin/markings/{markingId} | **Admin** | Marking | [**get_batch**](docs/v2/Admin/Marking.md#get_batch) | **POST** /v2/admin/markings/getBatch | **Admin** | Marking | [**list**](docs/v2/Admin/Marking.md#list) | **GET** /v2/admin/markings | **Admin** | Marking | [**replace**](docs/v2/Admin/Marking.md#replace) | **PUT** /v2/admin/markings/{markingId} | +**Admin** | MarkingCategory | [**create**](docs/v2/Admin/MarkingCategory.md#create) | **POST** /v2/admin/markingCategories | **Admin** | MarkingCategory | [**get**](docs/v2/Admin/MarkingCategory.md#get) | **GET** /v2/admin/markingCategories/{markingCategoryId} | **Admin** | MarkingCategory | [**list**](docs/v2/Admin/MarkingCategory.md#list) | **GET** /v2/admin/markingCategories | +**Admin** | MarkingCategory | [**replace**](docs/v2/Admin/MarkingCategory.md#replace) | **PUT** /v2/admin/markingCategories/{markingCategoryId} | **Admin** | MarkingMember | [**add**](docs/v2/Admin/MarkingMember.md#add) | **POST** /v2/admin/markings/{markingId}/markingMembers/add | **Admin** | MarkingMember | [**list**](docs/v2/Admin/MarkingMember.md#list) | **GET** /v2/admin/markings/{markingId}/markingMembers | **Admin** | MarkingMember | [**remove**](docs/v2/Admin/MarkingMember.md#remove) | **POST** /v2/admin/markings/{markingId}/markingMembers/remove | **Admin** | MarkingRoleAssignment | [**add**](docs/v2/Admin/MarkingRoleAssignment.md#add) | **POST** /v2/admin/markings/{markingId}/roleAssignments/add | **Admin** | MarkingRoleAssignment | [**list**](docs/v2/Admin/MarkingRoleAssignment.md#list) | **GET** /v2/admin/markings/{markingId}/roleAssignments | **Admin** | MarkingRoleAssignment | [**remove**](docs/v2/Admin/MarkingRoleAssignment.md#remove) | **POST** /v2/admin/markings/{markingId}/roleAssignments/remove | +**Admin** | Organization | [**create**](docs/v2/Admin/Organization.md#create) | **POST** /v2/admin/organizations | **Admin** | Organization | [**get**](docs/v2/Admin/Organization.md#get) | **GET** /v2/admin/organizations/{organizationRid} | **Admin** | Organization | [**list_available_roles**](docs/v2/Admin/Organization.md#list_available_roles) | **GET** /v2/admin/organizations/{organizationRid}/listAvailableRoles | **Admin** | Organization | [**replace**](docs/v2/Admin/Organization.md#replace) | **PUT** /v2/admin/organizations/{organizationRid} | @@ -812,6 +823,7 @@ Namespace | Resource | Operation | HTTP request | **Filesystem** | ResourceRole | [**remove**](docs/v2/Filesystem/ResourceRole.md#remove) | **POST** /v2/filesystem/resources/{resourceRid}/roles/remove | **Filesystem** | Space | [**list**](docs/v2/Filesystem/Space.md#list) | **GET** /v2/filesystem/spaces | **MediaSets** | MediaSet | [**abort**](docs/v2/MediaSets/MediaSet.md#abort) | **POST** /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort | +**MediaSets** | MediaSet | [**clear**](docs/v2/MediaSets/MediaSet.md#clear) | **DELETE** /v2/mediasets/{mediaSetRid}/items/clearAtPath | **MediaSets** | MediaSet | [**commit**](docs/v2/MediaSets/MediaSet.md#commit) | **POST** /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit | **MediaSets** | MediaSet | [**create**](docs/v2/MediaSets/MediaSet.md#create) | **POST** /v2/mediasets/{mediaSetRid}/transactions | **MediaSets** | MediaSet | [**get**](docs/v2/MediaSets/MediaSet.md#get) | **GET** /v2/mediasets/{mediaSetRid} | @@ -851,6 +863,7 @@ Namespace | Resource | Operation | HTTP request | **Ontologies** | MediaReferenceProperty | [**get_media_content**](docs/v2/Ontologies/MediaReferenceProperty.md#get_media_content) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content | **Ontologies** | MediaReferenceProperty | [**upload**](docs/v2/Ontologies/MediaReferenceProperty.md#upload) | **POST** /v2/ontologies/{ontology}/objectTypes/{objectType}/media/{property}/upload | **Ontologies** | ObjectType | [**get**](docs/v2/Ontologies/ObjectType.md#get) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType} | +**Ontologies** | ObjectType | [**get_by_rid_batch**](docs/v2/Ontologies/ObjectType.md#get_by_rid_batch) | **POST** /v2/ontologies/{ontology}/objectTypes/getByRidBatch | **Ontologies** | ObjectType | [**get_edits_history**](docs/v2/Ontologies/ObjectType.md#get_edits_history) | **POST** /v2/ontologies/{ontology}/objectTypes/{objectType}/editsHistory | **Ontologies** | ObjectType | [**get_full_metadata**](docs/v2/Ontologies/ObjectType.md#get_full_metadata) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType}/fullMetadata | **Ontologies** | ObjectType | [**get_outgoing_link_type**](docs/v2/Ontologies/ObjectType.md#get_outgoing_link_type) | **GET** /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType} | @@ -984,8 +997,14 @@ Namespace | Name | Import | **Admin** | [AuthenticationProviderEnabled](docs/v2/Admin/models/AuthenticationProviderEnabled.md) | `from foundry_sdk.v2.admin.models import AuthenticationProviderEnabled` | **Admin** | [AuthenticationProviderName](docs/v2/Admin/models/AuthenticationProviderName.md) | `from foundry_sdk.v2.admin.models import AuthenticationProviderName` | **Admin** | [AuthenticationProviderRid](docs/v2/Admin/models/AuthenticationProviderRid.md) | `from foundry_sdk.v2.admin.models import AuthenticationProviderRid` | +**Admin** | [CbacBanner](docs/v2/Admin/models/CbacBanner.md) | `from foundry_sdk.v2.admin.models import CbacBanner` | +**Admin** | [CbacBannerClassificationString](docs/v2/Admin/models/CbacBannerClassificationString.md) | `from foundry_sdk.v2.admin.models import CbacBannerClassificationString` | +**Admin** | [CbacMarkingRestrictions](docs/v2/Admin/models/CbacMarkingRestrictions.md) | `from foundry_sdk.v2.admin.models import CbacMarkingRestrictions` | +**Admin** | [CbacMarkingRestrictionsIsValid](docs/v2/Admin/models/CbacMarkingRestrictionsIsValid.md) | `from foundry_sdk.v2.admin.models import CbacMarkingRestrictionsIsValid` | +**Admin** | [CbacMarkingRestrictionsUserSatisfiesMarkings](docs/v2/Admin/models/CbacMarkingRestrictionsUserSatisfiesMarkings.md) | `from foundry_sdk.v2.admin.models import CbacMarkingRestrictionsUserSatisfiesMarkings` | **Admin** | [CertificateInfo](docs/v2/Admin/models/CertificateInfo.md) | `from foundry_sdk.v2.admin.models import CertificateInfo` | **Admin** | [CertificateUsageType](docs/v2/Admin/models/CertificateUsageType.md) | `from foundry_sdk.v2.admin.models import CertificateUsageType` | +**Admin** | [ClassificationBannerDisplayType](docs/v2/Admin/models/ClassificationBannerDisplayType.md) | `from foundry_sdk.v2.admin.models import ClassificationBannerDisplayType` | **Admin** | [CreateGroupRequest](docs/v2/Admin/models/CreateGroupRequest.md) | `from foundry_sdk.v2.admin.models import CreateGroupRequest` | **Admin** | [CreateMarkingCategoryRequest](docs/v2/Admin/models/CreateMarkingCategoryRequest.md) | `from foundry_sdk.v2.admin.models import CreateMarkingCategoryRequest` | **Admin** | [CreateMarkingRequest](docs/v2/Admin/models/CreateMarkingRequest.md) | `from foundry_sdk.v2.admin.models import CreateMarkingRequest` | @@ -1023,6 +1042,7 @@ Namespace | Name | Import | **Admin** | [ListMarkingMembersResponse](docs/v2/Admin/models/ListMarkingMembersResponse.md) | `from foundry_sdk.v2.admin.models import ListMarkingMembersResponse` | **Admin** | [ListMarkingRoleAssignmentsResponse](docs/v2/Admin/models/ListMarkingRoleAssignmentsResponse.md) | `from foundry_sdk.v2.admin.models import ListMarkingRoleAssignmentsResponse` | **Admin** | [ListMarkingsResponse](docs/v2/Admin/models/ListMarkingsResponse.md) | `from foundry_sdk.v2.admin.models import ListMarkingsResponse` | +**Admin** | [ListOrganizationGuestMembersResponse](docs/v2/Admin/models/ListOrganizationGuestMembersResponse.md) | `from foundry_sdk.v2.admin.models import ListOrganizationGuestMembersResponse` | **Admin** | [ListOrganizationRoleAssignmentsResponse](docs/v2/Admin/models/ListOrganizationRoleAssignmentsResponse.md) | `from foundry_sdk.v2.admin.models import ListOrganizationRoleAssignmentsResponse` | **Admin** | [ListUsersResponse](docs/v2/Admin/models/ListUsersResponse.md) | `from foundry_sdk.v2.admin.models import ListUsersResponse` | **Admin** | [Marking](docs/v2/Admin/models/Marking.md) | `from foundry_sdk.v2.admin.models import Marking` | @@ -1043,6 +1063,7 @@ Namespace | Name | Import | **Admin** | [MarkingType](docs/v2/Admin/models/MarkingType.md) | `from foundry_sdk.v2.admin.models import MarkingType` | **Admin** | [OidcAuthenticationProtocol](docs/v2/Admin/models/OidcAuthenticationProtocol.md) | `from foundry_sdk.v2.admin.models import OidcAuthenticationProtocol` | **Admin** | [Organization](docs/v2/Admin/models/Organization.md) | `from foundry_sdk.v2.admin.models import Organization` | +**Admin** | [OrganizationGuestMember](docs/v2/Admin/models/OrganizationGuestMember.md) | `from foundry_sdk.v2.admin.models import OrganizationGuestMember` | **Admin** | [OrganizationName](docs/v2/Admin/models/OrganizationName.md) | `from foundry_sdk.v2.admin.models import OrganizationName` | **Admin** | [OrganizationRoleAssignment](docs/v2/Admin/models/OrganizationRoleAssignment.md) | `from foundry_sdk.v2.admin.models import OrganizationRoleAssignment` | **Admin** | [PreregisterGroupRequest](docs/v2/Admin/models/PreregisterGroupRequest.md) | `from foundry_sdk.v2.admin.models import PreregisterGroupRequest` | @@ -1168,6 +1189,8 @@ Namespace | Name | Import | **Checkpoints** | [CheckpointedObjectSetVersionedRid](docs/v2/Checkpoints/models/CheckpointedObjectSetVersionedRid.md) | `from foundry_sdk.v2.checkpoints.models import CheckpointedObjectSetVersionedRid` | **Checkpoints** | [CheckpointedOntology](docs/v2/Checkpoints/models/CheckpointedOntology.md) | `from foundry_sdk.v2.checkpoints.models import CheckpointedOntology` | **Checkpoints** | [CheckpointedOntologyWithObjectTypes](docs/v2/Checkpoints/models/CheckpointedOntologyWithObjectTypes.md) | `from foundry_sdk.v2.checkpoints.models import CheckpointedOntologyWithObjectTypes` | +**Checkpoints** | [CheckpointedPeeringJob](docs/v2/Checkpoints/models/CheckpointedPeeringJob.md) | `from foundry_sdk.v2.checkpoints.models import CheckpointedPeeringJob` | +**Checkpoints** | [CheckpointedPeeringJobId](docs/v2/Checkpoints/models/CheckpointedPeeringJobId.md) | `from foundry_sdk.v2.checkpoints.models import CheckpointedPeeringJobId` | **Checkpoints** | [CheckpointedPrincipal](docs/v2/Checkpoints/models/CheckpointedPrincipal.md) | `from foundry_sdk.v2.checkpoints.models import CheckpointedPrincipal` | **Checkpoints** | [CheckpointedPrincipalId](docs/v2/Checkpoints/models/CheckpointedPrincipalId.md) | `from foundry_sdk.v2.checkpoints.models import CheckpointedPrincipalId` | **Checkpoints** | [CheckpointedPrincipalRole](docs/v2/Checkpoints/models/CheckpointedPrincipalRole.md) | `from foundry_sdk.v2.checkpoints.models import CheckpointedPrincipalRole` | @@ -1392,6 +1415,7 @@ Namespace | Name | Import | **Core** | [CheckReportRid](docs/v2/Core/models/CheckReportRid.md) | `from foundry_sdk.v2.core.models import CheckReportRid` | **Core** | [CheckRid](docs/v2/Core/models/CheckRid.md) | `from foundry_sdk.v2.core.models import CheckRid` | **Core** | [CipherTextType](docs/v2/Core/models/CipherTextType.md) | `from foundry_sdk.v2.core.models import CipherTextType` | +**Core** | [Color](docs/v2/Core/models/Color.md) | `from foundry_sdk.v2.core.models import Color` | **Core** | [ColumnName](docs/v2/Core/models/ColumnName.md) | `from foundry_sdk.v2.core.models import ColumnName` | **Core** | [ComputeSeconds](docs/v2/Core/models/ComputeSeconds.md) | `from foundry_sdk.v2.core.models import ComputeSeconds` | **Core** | [ContentLength](docs/v2/Core/models/ContentLength.md) | `from foundry_sdk.v2.core.models import ContentLength` | @@ -1683,6 +1707,7 @@ Namespace | Name | Import | **Filesystem** | [RemoveMarkingsRequest](docs/v2/Filesystem/models/RemoveMarkingsRequest.md) | `from foundry_sdk.v2.filesystem.models import RemoveMarkingsRequest` | **Filesystem** | [RemoveOrganizationsRequest](docs/v2/Filesystem/models/RemoveOrganizationsRequest.md) | `from foundry_sdk.v2.filesystem.models import RemoveOrganizationsRequest` | **Filesystem** | [RemoveResourceRolesRequest](docs/v2/Filesystem/models/RemoveResourceRolesRequest.md) | `from foundry_sdk.v2.filesystem.models import RemoveResourceRolesRequest` | +**Filesystem** | [ReplaceFolderRequest](docs/v2/Filesystem/models/ReplaceFolderRequest.md) | `from foundry_sdk.v2.filesystem.models import ReplaceFolderRequest` | **Filesystem** | [ReplaceProjectRequest](docs/v2/Filesystem/models/ReplaceProjectRequest.md) | `from foundry_sdk.v2.filesystem.models import ReplaceProjectRequest` | **Filesystem** | [ReplaceSpaceRequest](docs/v2/Filesystem/models/ReplaceSpaceRequest.md) | `from foundry_sdk.v2.filesystem.models import ReplaceSpaceRequest` | **Filesystem** | [Resource](docs/v2/Filesystem/models/Resource.md) | `from foundry_sdk.v2.filesystem.models import Resource` | @@ -2089,6 +2114,7 @@ Namespace | Name | Import | **Models** | [ExperimentSource](docs/v2/Models/models/ExperimentSource.md) | `from foundry_sdk.v2.models.models import ExperimentSource` | **Models** | [ExperimentStatus](docs/v2/Models/models/ExperimentStatus.md) | `from foundry_sdk.v2.models.models import ExperimentStatus` | **Models** | [ExperimentTagText](docs/v2/Models/models/ExperimentTagText.md) | `from foundry_sdk.v2.models.models import ExperimentTagText` | +**Models** | [GpuType](docs/v2/Models/models/GpuType.md) | `from foundry_sdk.v2.models.models import GpuType` | **Models** | [InconsistentArrayDimensionsError](docs/v2/Models/models/InconsistentArrayDimensionsError.md) | `from foundry_sdk.v2.models.models import InconsistentArrayDimensionsError` | **Models** | [InferenceInputErrorType](docs/v2/Models/models/InferenceInputErrorType.md) | `from foundry_sdk.v2.models.models import InferenceInputErrorType` | **Models** | [InputAlias](docs/v2/Models/models/InputAlias.md) | `from foundry_sdk.v2.models.models import InputAlias` | @@ -2133,7 +2159,15 @@ Namespace | Name | Import | **Models** | [ModelStudioTrainerExperimental](docs/v2/Models/models/ModelStudioTrainerExperimental.md) | `from foundry_sdk.v2.models.models import ModelStudioTrainerExperimental` | **Models** | [ModelStudioWorkerConfig](docs/v2/Models/models/ModelStudioWorkerConfig.md) | `from foundry_sdk.v2.models.models import ModelStudioWorkerConfig` | **Models** | [ModelVersion](docs/v2/Models/models/ModelVersion.md) | `from foundry_sdk.v2.models.models import ModelVersion` | +**Models** | [ModelVersionCodeRepositorySource](docs/v2/Models/models/ModelVersionCodeRepositorySource.md) | `from foundry_sdk.v2.models.models import ModelVersionCodeRepositorySource` | +**Models** | [ModelVersionCodeWorkspaceSource](docs/v2/Models/models/ModelVersionCodeWorkspaceSource.md) | `from foundry_sdk.v2.models.models import ModelVersionCodeWorkspaceSource` | +**Models** | [ModelVersionContainerizedSource](docs/v2/Models/models/ModelVersionContainerizedSource.md) | `from foundry_sdk.v2.models.models import ModelVersionContainerizedSource` | +**Models** | [ModelVersionExternalSource](docs/v2/Models/models/ModelVersionExternalSource.md) | `from foundry_sdk.v2.models.models import ModelVersionExternalSource` | +**Models** | [ModelVersionModelStudioSource](docs/v2/Models/models/ModelVersionModelStudioSource.md) | `from foundry_sdk.v2.models.models import ModelVersionModelStudioSource` | +**Models** | [ModelVersionPromotedSource](docs/v2/Models/models/ModelVersionPromotedSource.md) | `from foundry_sdk.v2.models.models import ModelVersionPromotedSource` | **Models** | [ModelVersionRid](docs/v2/Models/models/ModelVersionRid.md) | `from foundry_sdk.v2.models.models import ModelVersionRid` | +**Models** | [ModelVersionSdkSource](docs/v2/Models/models/ModelVersionSdkSource.md) | `from foundry_sdk.v2.models.models import ModelVersionSdkSource` | +**Models** | [ModelVersionSource](docs/v2/Models/models/ModelVersionSource.md) | `from foundry_sdk.v2.models.models import ModelVersionSource` | **Models** | [OutputAlias](docs/v2/Models/models/OutputAlias.md) | `from foundry_sdk.v2.models.models import OutputAlias` | **Models** | [Parameter](docs/v2/Models/models/Parameter.md) | `from foundry_sdk.v2.models.models import Parameter` | **Models** | [ParameterName](docs/v2/Models/models/ParameterName.md) | `from foundry_sdk.v2.models.models import ParameterName` | @@ -2349,6 +2383,9 @@ Namespace | Name | Import | **Ontologies** | [GetActionTypeByRidBatchRequest](docs/v2/Ontologies/models/GetActionTypeByRidBatchRequest.md) | `from foundry_sdk.v2.ontologies.models import GetActionTypeByRidBatchRequest` | **Ontologies** | [GetActionTypeByRidBatchRequestElement](docs/v2/Ontologies/models/GetActionTypeByRidBatchRequestElement.md) | `from foundry_sdk.v2.ontologies.models import GetActionTypeByRidBatchRequestElement` | **Ontologies** | [GetActionTypeByRidBatchResponse](docs/v2/Ontologies/models/GetActionTypeByRidBatchResponse.md) | `from foundry_sdk.v2.ontologies.models import GetActionTypeByRidBatchResponse` | +**Ontologies** | [GetObjectTypeByRidBatchRequest](docs/v2/Ontologies/models/GetObjectTypeByRidBatchRequest.md) | `from foundry_sdk.v2.ontologies.models import GetObjectTypeByRidBatchRequest` | +**Ontologies** | [GetObjectTypeByRidBatchRequestElement](docs/v2/Ontologies/models/GetObjectTypeByRidBatchRequestElement.md) | `from foundry_sdk.v2.ontologies.models import GetObjectTypeByRidBatchRequestElement` | +**Ontologies** | [GetObjectTypeByRidBatchResponse](docs/v2/Ontologies/models/GetObjectTypeByRidBatchResponse.md) | `from foundry_sdk.v2.ontologies.models import GetObjectTypeByRidBatchResponse` | **Ontologies** | [GetSelectedPropertyOperation](docs/v2/Ontologies/models/GetSelectedPropertyOperation.md) | `from foundry_sdk.v2.ontologies.models import GetSelectedPropertyOperation` | **Ontologies** | [GreatestPropertyExpression](docs/v2/Ontologies/models/GreatestPropertyExpression.md) | `from foundry_sdk.v2.ontologies.models import GreatestPropertyExpression` | **Ontologies** | [GroupMemberConstraint](docs/v2/Ontologies/models/GroupMemberConstraint.md) | `from foundry_sdk.v2.ontologies.models import GroupMemberConstraint` | @@ -3165,6 +3202,9 @@ Namespace | Name | Import | **Admin** | AddOrganizationRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import AddOrganizationRoleAssignmentsPermissionDenied` | **Admin** | AuthenticationProviderNotFound | `from foundry_sdk.v2.admin.errors import AuthenticationProviderNotFound` | **Admin** | CannotReplaceProviderInfoForPrincipalInProtectedRealm | `from foundry_sdk.v2.admin.errors import CannotReplaceProviderInfoForPrincipalInProtectedRealm` | +**Admin** | CbacBannerNotFound | `from foundry_sdk.v2.admin.errors import CbacBannerNotFound` | +**Admin** | CbacMarkingRestrictionsNotFound | `from foundry_sdk.v2.admin.errors import CbacMarkingRestrictionsNotFound` | +**Admin** | CbacUnavailable | `from foundry_sdk.v2.admin.errors import CbacUnavailable` | **Admin** | CreateGroupPermissionDenied | `from foundry_sdk.v2.admin.errors import CreateGroupPermissionDenied` | **Admin** | CreateMarkingCategoryMissingInitialAdminRole | `from foundry_sdk.v2.admin.errors import CreateMarkingCategoryMissingInitialAdminRole` | **Admin** | CreateMarkingCategoryMissingOrganization | `from foundry_sdk.v2.admin.errors import CreateMarkingCategoryMissingOrganization` | @@ -3177,6 +3217,9 @@ Namespace | Name | Import | **Admin** | DeleteUserPermissionDenied | `from foundry_sdk.v2.admin.errors import DeleteUserPermissionDenied` | **Admin** | EnrollmentNotFound | `from foundry_sdk.v2.admin.errors import EnrollmentNotFound` | **Admin** | EnrollmentRoleNotFound | `from foundry_sdk.v2.admin.errors import EnrollmentRoleNotFound` | +**Admin** | ExpirationForTransitiveGroupMembersNotSupported | `from foundry_sdk.v2.admin.errors import ExpirationForTransitiveGroupMembersNotSupported` | +**Admin** | GetCbacBannerPermissionDenied | `from foundry_sdk.v2.admin.errors import GetCbacBannerPermissionDenied` | +**Admin** | GetCbacMarkingRestrictionInfoPermissionDenied | `from foundry_sdk.v2.admin.errors import GetCbacMarkingRestrictionInfoPermissionDenied` | **Admin** | GetCurrentEnrollmentPermissionDenied | `from foundry_sdk.v2.admin.errors import GetCurrentEnrollmentPermissionDenied` | **Admin** | GetCurrentUserPermissionDenied | `from foundry_sdk.v2.admin.errors import GetCurrentUserPermissionDenied` | **Admin** | GetGroupProviderInfoPermissionDenied | `from foundry_sdk.v2.admin.errors import GetGroupProviderInfoPermissionDenied` | @@ -3198,6 +3241,7 @@ Namespace | Name | Import | **Admin** | ListHostsPermissionDenied | `from foundry_sdk.v2.admin.errors import ListHostsPermissionDenied` | **Admin** | ListMarkingMembersPermissionDenied | `from foundry_sdk.v2.admin.errors import ListMarkingMembersPermissionDenied` | **Admin** | ListMarkingRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import ListMarkingRoleAssignmentsPermissionDenied` | +**Admin** | ListOrganizationGuestMembersPermissionDenied | `from foundry_sdk.v2.admin.errors import ListOrganizationGuestMembersPermissionDenied` | **Admin** | ListOrganizationRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import ListOrganizationRoleAssignmentsPermissionDenied` | **Admin** | MarkingCategoryNotFound | `from foundry_sdk.v2.admin.errors import MarkingCategoryNotFound` | **Admin** | MarkingNameInCategoryAlreadyExists | `from foundry_sdk.v2.admin.errors import MarkingNameInCategoryAlreadyExists` | @@ -3226,6 +3270,7 @@ Namespace | Name | Import | **Admin** | RoleNotFound | `from foundry_sdk.v2.admin.errors import RoleNotFound` | **Admin** | SearchGroupsPermissionDenied | `from foundry_sdk.v2.admin.errors import SearchGroupsPermissionDenied` | **Admin** | SearchUsersPermissionDenied | `from foundry_sdk.v2.admin.errors import SearchUsersPermissionDenied` | +**Admin** | UnknownClassificationBannerDisplayType | `from foundry_sdk.v2.admin.errors import UnknownClassificationBannerDisplayType` | **Admin** | UserDeleted | `from foundry_sdk.v2.admin.errors import UserDeleted` | **Admin** | UserIsActive | `from foundry_sdk.v2.admin.errors import UserIsActive` | **Admin** | UserNotFound | `from foundry_sdk.v2.admin.errors import UserNotFound` | @@ -3415,6 +3460,7 @@ Namespace | Name | Import | **Filesystem** | AddMarkingsPermissionDenied | `from foundry_sdk.v2.filesystem.errors import AddMarkingsPermissionDenied` | **Filesystem** | AddOrganizationsPermissionDenied | `from foundry_sdk.v2.filesystem.errors import AddOrganizationsPermissionDenied` | **Filesystem** | AddResourceRolesPermissionDenied | `from foundry_sdk.v2.filesystem.errors import AddResourceRolesPermissionDenied` | +**Filesystem** | CircularDependency | `from foundry_sdk.v2.filesystem.errors import CircularDependency` | **Filesystem** | CreateFolderOutsideProjectNotSupported | `from foundry_sdk.v2.filesystem.errors import CreateFolderOutsideProjectNotSupported` | **Filesystem** | CreateFolderPermissionDenied | `from foundry_sdk.v2.filesystem.errors import CreateFolderPermissionDenied` | **Filesystem** | CreateGroupPermissionDenied | `from foundry_sdk.v2.filesystem.errors import CreateGroupPermissionDenied` | @@ -3439,6 +3485,7 @@ Namespace | Name | Import | **Filesystem** | InvalidFolder | `from foundry_sdk.v2.filesystem.errors import InvalidFolder` | **Filesystem** | InvalidOrganizationHierarchy | `from foundry_sdk.v2.filesystem.errors import InvalidOrganizationHierarchy` | **Filesystem** | InvalidOrganizations | `from foundry_sdk.v2.filesystem.errors import InvalidOrganizations` | +**Filesystem** | InvalidParentFolder | `from foundry_sdk.v2.filesystem.errors import InvalidParentFolder` | **Filesystem** | InvalidPath | `from foundry_sdk.v2.filesystem.errors import InvalidPath` | **Filesystem** | InvalidPrincipalIdsForGroupTemplate | `from foundry_sdk.v2.filesystem.errors import InvalidPrincipalIdsForGroupTemplate` | **Filesystem** | InvalidRoleIds | `from foundry_sdk.v2.filesystem.errors import InvalidRoleIds` | @@ -3461,6 +3508,7 @@ Namespace | Name | Import | **Filesystem** | RemoveMarkingsPermissionDenied | `from foundry_sdk.v2.filesystem.errors import RemoveMarkingsPermissionDenied` | **Filesystem** | RemoveOrganizationsPermissionDenied | `from foundry_sdk.v2.filesystem.errors import RemoveOrganizationsPermissionDenied` | **Filesystem** | RemoveResourceRolesPermissionDenied | `from foundry_sdk.v2.filesystem.errors import RemoveResourceRolesPermissionDenied` | +**Filesystem** | ReplaceFolderPermissionDenied | `from foundry_sdk.v2.filesystem.errors import ReplaceFolderPermissionDenied` | **Filesystem** | ReplaceProjectPermissionDenied | `from foundry_sdk.v2.filesystem.errors import ReplaceProjectPermissionDenied` | **Filesystem** | ReplaceSpacePermissionDenied | `from foundry_sdk.v2.filesystem.errors import ReplaceSpacePermissionDenied` | **Filesystem** | ReservedSpaceCannotBeReplaced | `from foundry_sdk.v2.filesystem.errors import ReservedSpaceCannotBeReplaced` | @@ -3559,6 +3607,7 @@ Namespace | Name | Import | **Models** | SearchExperimentsPermissionDenied | `from foundry_sdk.v2.models.errors import SearchExperimentsPermissionDenied` | **Models** | TrainerNotFound | `from foundry_sdk.v2.models.errors import TrainerNotFound` | **Models** | TransformJsonLiveDeploymentPermissionDenied | `from foundry_sdk.v2.models.errors import TransformJsonLiveDeploymentPermissionDenied` | +**Models** | UnsupportedModelSource | `from foundry_sdk.v2.models.errors import UnsupportedModelSource` | **Ontologies** | ActionContainsDuplicateEdits | `from foundry_sdk.v2.ontologies.errors import ActionContainsDuplicateEdits` | **Ontologies** | ActionEditedPropertiesNotFound | `from foundry_sdk.v2.ontologies.errors import ActionEditedPropertiesNotFound` | **Ontologies** | ActionEditsReadOnlyEntity | `from foundry_sdk.v2.ontologies.errors import ActionEditsReadOnlyEntity` | diff --git a/docs-snippets-npm/package.json b/docs-snippets-npm/package.json index f0ea4372f..f53255c2f 100644 --- a/docs-snippets-npm/package.json +++ b/docs-snippets-npm/package.json @@ -24,7 +24,7 @@ "sls": { "dependencies": { "com.palantir.foundry.api:api-gateway": { - "minVersion": "1.1497.0", + "minVersion": "1.1515.0", "maxVersion": "1.x.x", "optional": false } diff --git a/docs-snippets-npm/src/index.ts b/docs-snippets-npm/src/index.ts index 0db49fce3..5c840a730 100644 --- a/docs-snippets-npm/src/index.ts +++ b/docs-snippets-npm/src/index.ts @@ -250,7 +250,17 @@ export const PYTHON_PLATFORM_SNIPPETS: SdkSnippets admin_models.CbacBanner: + """ + Returns a classification banner string and colors for the given set of marking IDs. + :param display_type: The display type of the banner. Defaults to PORTION_MARKING. + :type display_type: Optional[ClassificationBannerDisplayType] + :param marking_ids: The marking IDs for which to generate a banner. + :type marking_ids: Optional[List[MarkingId]] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.CbacBanner + + :raises CbacBannerNotFound: The given CbacBanner could not be found. + :raises CbacUnavailable: CBAC is not available. + :raises GetCbacBannerPermissionDenied: The provided token does not have permission to get the CBAC banner for the markings. + :raises UnknownClassificationBannerDisplayType: The provided classification banner display type is not recognized. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/cbacBanner", + query_params={ + "displayType": display_type, + "markingIds": marking_ids, + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.CbacBanner, + request_timeout=request_timeout, + throwable_errors={ + "CbacBannerNotFound": admin_errors.CbacBannerNotFound, + "CbacUnavailable": admin_errors.CbacUnavailable, + "GetCbacBannerPermissionDenied": admin_errors.GetCbacBannerPermissionDenied, + "UnknownClassificationBannerDisplayType": admin_errors.UnknownClassificationBannerDisplayType, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _CbacBannerClientRaw: + def __init__(self, client: CbacBannerClient) -> None: + def get(_: admin_models.CbacBanner): ... + + self.get = core.with_raw_response(get, client.get) + + +class _CbacBannerClientStreaming: + def __init__(self, client: CbacBannerClient) -> None: + def get(_: admin_models.CbacBanner): ... + + self.get = core.with_streaming_response(get, client.get) + + +class AsyncCbacBannerClient: + """ + The API client for the CbacBanner Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncCbacBannerClientStreaming(self) + self.with_raw_response = _AsyncCbacBannerClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + *, + display_type: typing.Optional[admin_models.ClassificationBannerDisplayType] = None, + marking_ids: typing.Optional[typing.List[core_models.MarkingId]] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.CbacBanner]: + """ + Returns a classification banner string and colors for the given set of marking IDs. + :param display_type: The display type of the banner. Defaults to PORTION_MARKING. + :type display_type: Optional[ClassificationBannerDisplayType] + :param marking_ids: The marking IDs for which to generate a banner. + :type marking_ids: Optional[List[MarkingId]] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.CbacBanner] + + :raises CbacBannerNotFound: The given CbacBanner could not be found. + :raises CbacUnavailable: CBAC is not available. + :raises GetCbacBannerPermissionDenied: The provided token does not have permission to get the CBAC banner for the markings. + :raises UnknownClassificationBannerDisplayType: The provided classification banner display type is not recognized. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/cbacBanner", + query_params={ + "displayType": display_type, + "markingIds": marking_ids, + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.CbacBanner, + request_timeout=request_timeout, + throwable_errors={ + "CbacBannerNotFound": admin_errors.CbacBannerNotFound, + "CbacUnavailable": admin_errors.CbacUnavailable, + "GetCbacBannerPermissionDenied": admin_errors.GetCbacBannerPermissionDenied, + "UnknownClassificationBannerDisplayType": admin_errors.UnknownClassificationBannerDisplayType, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncCbacBannerClientRaw: + def __init__(self, client: AsyncCbacBannerClient) -> None: + def get(_: admin_models.CbacBanner): ... + + self.get = core.async_with_raw_response(get, client.get) + + +class _AsyncCbacBannerClientStreaming: + def __init__(self, client: AsyncCbacBannerClient) -> None: + def get(_: admin_models.CbacBanner): ... + + self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/admin/cbac_marking_restrictions.py b/foundry_sdk/v2/admin/cbac_marking_restrictions.py new file mode 100644 index 000000000..c066ec814 --- /dev/null +++ b/foundry_sdk/v2/admin/cbac_marking_restrictions.py @@ -0,0 +1,203 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import models as core_models + + +class CbacMarkingRestrictionsClient: + """ + The API client for the CbacMarkingRestrictions Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _CbacMarkingRestrictionsClientStreaming(self) + self.with_raw_response = _CbacMarkingRestrictionsClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + *, + marking_ids: typing.Optional[typing.List[core_models.MarkingId]] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.CbacMarkingRestrictions: + """ + Returns disallowed, implied, and required markings for the given set of marking IDs. + :param marking_ids: The marking IDs for which to get restrictions. + :type marking_ids: Optional[List[MarkingId]] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.CbacMarkingRestrictions + + :raises CbacMarkingRestrictionsNotFound: The given CbacMarkingRestrictions could not be found. + :raises CbacUnavailable: CBAC is not available. + :raises GetCbacMarkingRestrictionInfoPermissionDenied: The provided token does not have permission to get the CBAC marking restrictions for the markings. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/cbacMarkingRestrictions", + query_params={ + "markingIds": marking_ids, + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.CbacMarkingRestrictions, + request_timeout=request_timeout, + throwable_errors={ + "CbacMarkingRestrictionsNotFound": admin_errors.CbacMarkingRestrictionsNotFound, + "CbacUnavailable": admin_errors.CbacUnavailable, + "GetCbacMarkingRestrictionInfoPermissionDenied": admin_errors.GetCbacMarkingRestrictionInfoPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _CbacMarkingRestrictionsClientRaw: + def __init__(self, client: CbacMarkingRestrictionsClient) -> None: + def get(_: admin_models.CbacMarkingRestrictions): ... + + self.get = core.with_raw_response(get, client.get) + + +class _CbacMarkingRestrictionsClientStreaming: + def __init__(self, client: CbacMarkingRestrictionsClient) -> None: + def get(_: admin_models.CbacMarkingRestrictions): ... + + self.get = core.with_streaming_response(get, client.get) + + +class AsyncCbacMarkingRestrictionsClient: + """ + The API client for the CbacMarkingRestrictions Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncCbacMarkingRestrictionsClientStreaming(self) + self.with_raw_response = _AsyncCbacMarkingRestrictionsClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get( + self, + *, + marking_ids: typing.Optional[typing.List[core_models.MarkingId]] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.CbacMarkingRestrictions]: + """ + Returns disallowed, implied, and required markings for the given set of marking IDs. + :param marking_ids: The marking IDs for which to get restrictions. + :type marking_ids: Optional[List[MarkingId]] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.CbacMarkingRestrictions] + + :raises CbacMarkingRestrictionsNotFound: The given CbacMarkingRestrictions could not be found. + :raises CbacUnavailable: CBAC is not available. + :raises GetCbacMarkingRestrictionInfoPermissionDenied: The provided token does not have permission to get the CBAC marking restrictions for the markings. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/cbacMarkingRestrictions", + query_params={ + "markingIds": marking_ids, + "preview": preview, + }, + path_params={}, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.CbacMarkingRestrictions, + request_timeout=request_timeout, + throwable_errors={ + "CbacMarkingRestrictionsNotFound": admin_errors.CbacMarkingRestrictionsNotFound, + "CbacUnavailable": admin_errors.CbacUnavailable, + "GetCbacMarkingRestrictionInfoPermissionDenied": admin_errors.GetCbacMarkingRestrictionInfoPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncCbacMarkingRestrictionsClientRaw: + def __init__(self, client: AsyncCbacMarkingRestrictionsClient) -> None: + def get(_: admin_models.CbacMarkingRestrictions): ... + + self.get = core.async_with_raw_response(get, client.get) + + +class _AsyncCbacMarkingRestrictionsClientStreaming: + def __init__(self, client: AsyncCbacMarkingRestrictionsClient) -> None: + def get(_: admin_models.CbacMarkingRestrictions): ... + + self.get = core.async_with_streaming_response(get, client.get) diff --git a/foundry_sdk/v2/admin/errors.py b/foundry_sdk/v2/admin/errors.py index d4ca9c561..a21e82834 100644 --- a/foundry_sdk/v2/admin/errors.py +++ b/foundry_sdk/v2/admin/errors.py @@ -131,6 +131,45 @@ class CannotReplaceProviderInfoForPrincipalInProtectedRealm(errors.BadRequestErr error_instance_id: str +class CbacBannerNotFoundParameters(typing_extensions.TypedDict): + """The given CbacBanner could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CbacBannerNotFound(errors.NotFoundError): + name: typing.Literal["CbacBannerNotFound"] + parameters: CbacBannerNotFoundParameters + error_instance_id: str + + +class CbacMarkingRestrictionsNotFoundParameters(typing_extensions.TypedDict): + """The given CbacMarkingRestrictions could not be found.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CbacMarkingRestrictionsNotFound(errors.NotFoundError): + name: typing.Literal["CbacMarkingRestrictionsNotFound"] + parameters: CbacMarkingRestrictionsNotFoundParameters + error_instance_id: str + + +class CbacUnavailableParameters(typing_extensions.TypedDict): + """CBAC is not available.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CbacUnavailable(errors.BadRequestError): + name: typing.Literal["CbacUnavailable"] + parameters: CbacUnavailableParameters + error_instance_id: str + + class CreateGroupPermissionDeniedParameters(typing_extensions.TypedDict): """Could not create the Group.""" @@ -293,6 +332,49 @@ class EnrollmentRoleNotFound(errors.NotFoundError): error_instance_id: str +class ExpirationForTransitiveGroupMembersNotSupportedParameters(typing_extensions.TypedDict): + """You cannot pass includeExpirations if transitive is true.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class ExpirationForTransitiveGroupMembersNotSupported(errors.BadRequestError): + name: typing.Literal["ExpirationForTransitiveGroupMembersNotSupported"] + parameters: ExpirationForTransitiveGroupMembersNotSupportedParameters + error_instance_id: str + + +class GetCbacBannerPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to get the CBAC banner for the markings.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingIds: typing.List[core_models.MarkingId] + + +@dataclass +class GetCbacBannerPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetCbacBannerPermissionDenied"] + parameters: GetCbacBannerPermissionDeniedParameters + error_instance_id: str + + +class GetCbacMarkingRestrictionInfoPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to get the CBAC marking restrictions for the markings.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + markingIds: typing.List[core_models.MarkingId] + + +@dataclass +class GetCbacMarkingRestrictionInfoPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["GetCbacMarkingRestrictionInfoPermissionDenied"] + parameters: GetCbacMarkingRestrictionInfoPermissionDeniedParameters + error_instance_id: str + + class GetCurrentEnrollmentPermissionDeniedParameters(typing_extensions.TypedDict): """Could not getCurrent the Enrollment.""" @@ -605,6 +687,21 @@ class ListMarkingRoleAssignmentsPermissionDenied(errors.PermissionDeniedError): error_instance_id: str +class ListOrganizationGuestMembersPermissionDeniedParameters(typing_extensions.TypedDict): + """The provided token does not have permission to list guest members for this organization.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + organizationRid: core_models.OrganizationRid + + +@dataclass +class ListOrganizationGuestMembersPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ListOrganizationGuestMembersPermissionDenied"] + parameters: ListOrganizationGuestMembersPermissionDeniedParameters + error_instance_id: str + + class ListOrganizationRoleAssignmentsPermissionDeniedParameters(typing_extensions.TypedDict): """The provided token does not have permission to list assigned roles for this organization.""" @@ -1023,6 +1120,21 @@ class SearchUsersPermissionDenied(errors.PermissionDeniedError): error_instance_id: str +class UnknownClassificationBannerDisplayTypeParameters(typing_extensions.TypedDict): + """The provided classification banner display type is not recognized.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + displayType: str + + +@dataclass +class UnknownClassificationBannerDisplayType(errors.BadRequestError): + name: typing.Literal["UnknownClassificationBannerDisplayType"] + parameters: UnknownClassificationBannerDisplayTypeParameters + error_instance_id: str + + class UserDeletedParameters(typing_extensions.TypedDict): """The user is deleted.""" @@ -1091,6 +1203,9 @@ class UserProviderInfoNotFound(errors.NotFoundError): "AddOrganizationRoleAssignmentsPermissionDenied", "AuthenticationProviderNotFound", "CannotReplaceProviderInfoForPrincipalInProtectedRealm", + "CbacBannerNotFound", + "CbacMarkingRestrictionsNotFound", + "CbacUnavailable", "CreateGroupPermissionDenied", "CreateMarkingCategoryMissingInitialAdminRole", "CreateMarkingCategoryMissingOrganization", @@ -1103,6 +1218,9 @@ class UserProviderInfoNotFound(errors.NotFoundError): "DeleteUserPermissionDenied", "EnrollmentNotFound", "EnrollmentRoleNotFound", + "ExpirationForTransitiveGroupMembersNotSupported", + "GetCbacBannerPermissionDenied", + "GetCbacMarkingRestrictionInfoPermissionDenied", "GetCurrentEnrollmentPermissionDenied", "GetCurrentUserPermissionDenied", "GetGroupProviderInfoPermissionDenied", @@ -1124,6 +1242,7 @@ class UserProviderInfoNotFound(errors.NotFoundError): "ListHostsPermissionDenied", "ListMarkingMembersPermissionDenied", "ListMarkingRoleAssignmentsPermissionDenied", + "ListOrganizationGuestMembersPermissionDenied", "ListOrganizationRoleAssignmentsPermissionDenied", "MarkingCategoryNotFound", "MarkingNameInCategoryAlreadyExists", @@ -1152,6 +1271,7 @@ class UserProviderInfoNotFound(errors.NotFoundError): "RoleNotFound", "SearchGroupsPermissionDenied", "SearchUsersPermissionDenied", + "UnknownClassificationBannerDisplayType", "UserDeleted", "UserIsActive", "UserNotFound", diff --git a/foundry_sdk/v2/admin/group_member.py b/foundry_sdk/v2/admin/group_member.py index becbae24a..f2ded7942 100644 --- a/foundry_sdk/v2/admin/group_member.py +++ b/foundry_sdk/v2/admin/group_member.py @@ -114,6 +114,7 @@ def list( self, group_id: core_models.GroupId, *, + include_expirations: typing.Optional[bool] = None, page_size: typing.Optional[core_models.PageSize] = None, page_token: typing.Optional[core_models.PageToken] = None, transitive: typing.Optional[bool] = None, @@ -131,17 +132,20 @@ def list( :param group_id: :type group_id: GroupId + :param include_expirations: When true, includes the expiration time of any temporary members of this group. `includeExpirations` cannot be set to true if `transitive` is also set to true. Defaults to false. + :type include_expirations: Optional[bool] :param page_size: The page size to use for the endpoint. :type page_size: Optional[PageSize] :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. :type page_token: Optional[PageToken] - :param transitive: When true, includes the transitive members of groups contained within this group. For example, say the Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. + :param transitive: When true, includes the transitive members of groups contained within this group. For example, say the Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. If `transitive` is true, `includeExpirations` cannot also be set to true. Defaults to false. :type transitive: Optional[bool] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. :rtype: core.ResourceIterator[admin_models.GroupMember] + :raises ExpirationForTransitiveGroupMembersNotSupported: You cannot pass includeExpirations if transitive is true. :raises GroupNotFound: The given Group could not be found. :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. """ @@ -151,6 +155,7 @@ def list( method="GET", resource_path="/v2/admin/groups/{groupId}/groupMembers", query_params={ + "includeExpirations": include_expirations, "pageSize": page_size, "pageToken": page_token, "transitive": transitive, @@ -165,6 +170,7 @@ def list( response_type=admin_models.ListGroupMembersResponse, request_timeout=request_timeout, throwable_errors={ + "ExpirationForTransitiveGroupMembersNotSupported": admin_errors.ExpirationForTransitiveGroupMembersNotSupported, "GroupNotFound": admin_errors.GroupNotFound, "InvalidPageSize": core_errors.InvalidPageSize, }, @@ -331,6 +337,7 @@ def list( self, group_id: core_models.GroupId, *, + include_expirations: typing.Optional[bool] = None, page_size: typing.Optional[core_models.PageSize] = None, page_token: typing.Optional[core_models.PageToken] = None, transitive: typing.Optional[bool] = None, @@ -348,17 +355,20 @@ def list( :param group_id: :type group_id: GroupId + :param include_expirations: When true, includes the expiration time of any temporary members of this group. `includeExpirations` cannot be set to true if `transitive` is also set to true. Defaults to false. + :type include_expirations: Optional[bool] :param page_size: The page size to use for the endpoint. :type page_size: Optional[PageSize] :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. :type page_token: Optional[PageToken] - :param transitive: When true, includes the transitive members of groups contained within this group. For example, say the Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. Defaults to false. + :param transitive: When true, includes the transitive members of groups contained within this group. For example, say the Group has member Group A, and Group A has member User B. If `transitive=false` only Group A will be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. If `transitive` is true, `includeExpirations` cannot also be set to true. Defaults to false. :type transitive: Optional[bool] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. :rtype: core.AsyncResourceIterator[admin_models.GroupMember] + :raises ExpirationForTransitiveGroupMembersNotSupported: You cannot pass includeExpirations if transitive is true. :raises GroupNotFound: The given Group could not be found. :raises InvalidPageSize: The provided page size was zero or negative. Page sizes must be greater than zero. """ @@ -368,6 +378,7 @@ def list( method="GET", resource_path="/v2/admin/groups/{groupId}/groupMembers", query_params={ + "includeExpirations": include_expirations, "pageSize": page_size, "pageToken": page_token, "transitive": transitive, @@ -382,6 +393,7 @@ def list( response_type=admin_models.ListGroupMembersResponse, request_timeout=request_timeout, throwable_errors={ + "ExpirationForTransitiveGroupMembersNotSupported": admin_errors.ExpirationForTransitiveGroupMembersNotSupported, "GroupNotFound": admin_errors.GroupNotFound, "InvalidPageSize": core_errors.InvalidPageSize, }, diff --git a/foundry_sdk/v2/admin/group_provider_info.py b/foundry_sdk/v2/admin/group_provider_info.py index a839476ae..1b088f62d 100644 --- a/foundry_sdk/v2/admin/group_provider_info.py +++ b/foundry_sdk/v2/admin/group_provider_info.py @@ -55,7 +55,6 @@ def get( self, group_id: core_models.GroupId, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> admin_models.GroupProviderInfo: @@ -63,8 +62,6 @@ def get( Get the GroupProviderInfo. :param group_id: :type group_id: GroupId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -79,9 +76,7 @@ def get( core.RequestInfo( method="GET", resource_path="/v2/admin/groups/{groupId}/providerInfo", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "groupId": group_id, }, @@ -108,7 +103,6 @@ def replace( group_id: core_models.GroupId, *, provider_id: admin_models.ProviderId, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> admin_models.GroupProviderInfo: @@ -118,8 +112,6 @@ def replace( :type group_id: GroupId :param provider_id: The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm. :type provider_id: ProviderId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -136,9 +128,7 @@ def replace( core.RequestInfo( method="PUT", resource_path="/v2/admin/groups/{groupId}/providerInfo", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "groupId": group_id, }, @@ -211,7 +201,6 @@ def get( self, group_id: core_models.GroupId, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[admin_models.GroupProviderInfo]: @@ -219,8 +208,6 @@ def get( Get the GroupProviderInfo. :param group_id: :type group_id: GroupId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -235,9 +222,7 @@ def get( core.RequestInfo( method="GET", resource_path="/v2/admin/groups/{groupId}/providerInfo", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "groupId": group_id, }, @@ -264,7 +249,6 @@ def replace( group_id: core_models.GroupId, *, provider_id: admin_models.ProviderId, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[admin_models.GroupProviderInfo]: @@ -274,8 +258,6 @@ def replace( :type group_id: GroupId :param provider_id: The ID of the Group in the external authentication provider. This value is determined by the authentication provider. At most one Group can have a given provider ID in a given Realm. :type provider_id: ProviderId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -292,9 +274,7 @@ def replace( core.RequestInfo( method="PUT", resource_path="/v2/admin/groups/{groupId}/providerInfo", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "groupId": group_id, }, diff --git a/foundry_sdk/v2/admin/marking_category.py b/foundry_sdk/v2/admin/marking_category.py index cc81257a0..641aded04 100644 --- a/foundry_sdk/v2/admin/marking_category.py +++ b/foundry_sdk/v2/admin/marking_category.py @@ -119,7 +119,6 @@ def get( self, marking_category_id: admin_models.MarkingCategoryId, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> admin_models.MarkingCategory: @@ -127,8 +126,6 @@ def get( Get the MarkingCategory with the specified id. :param marking_category_id: :type marking_category_id: MarkingCategoryId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -142,9 +139,7 @@ def get( core.RequestInfo( method="GET", resource_path="/v2/admin/markingCategories/{markingCategoryId}", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "markingCategoryId": marking_category_id, }, @@ -170,7 +165,6 @@ def list( *, page_size: typing.Optional[core_models.PageSize] = None, page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> core.ResourceIterator[admin_models.MarkingCategory]: @@ -180,8 +174,6 @@ def list( :type page_size: Optional[PageSize] :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -197,7 +189,6 @@ def list( query_params={ "pageSize": page_size, "pageToken": page_token, - "preview": preview, }, path_params={}, header_params={ @@ -395,7 +386,6 @@ def get( self, marking_category_id: admin_models.MarkingCategoryId, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[admin_models.MarkingCategory]: @@ -403,8 +393,6 @@ def get( Get the MarkingCategory with the specified id. :param marking_category_id: :type marking_category_id: MarkingCategoryId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -418,9 +406,7 @@ def get( core.RequestInfo( method="GET", resource_path="/v2/admin/markingCategories/{markingCategoryId}", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "markingCategoryId": marking_category_id, }, @@ -446,7 +432,6 @@ def list( *, page_size: typing.Optional[core_models.PageSize] = None, page_token: typing.Optional[core_models.PageToken] = None, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> core.AsyncResourceIterator[admin_models.MarkingCategory]: @@ -456,8 +441,6 @@ def list( :type page_size: Optional[PageSize] :param page_token: The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request. :type page_token: Optional[PageToken] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -473,7 +456,6 @@ def list( query_params={ "pageSize": page_size, "pageToken": page_token, - "preview": preview, }, path_params={}, header_params={ diff --git a/foundry_sdk/v2/admin/models.py b/foundry_sdk/v2/admin/models.py index 0b3d10b48..f0e286c10 100644 --- a/foundry_sdk/v2/admin/models.py +++ b/foundry_sdk/v2/admin/models.py @@ -104,6 +104,46 @@ class AuthenticationProvider(core.ModelBase): """AuthenticationProviderRid""" +class CbacBanner(core.ModelBase): + """CbacBanner""" + + classification_string: CbacBannerClassificationString = pydantic.Field(alias=str("classificationString")) # type: ignore[literal-required] + markings: typing.List[core_models.MarkingId] + text_color: core_models.Color = pydantic.Field(alias=str("textColor")) # type: ignore[literal-required] + background_colors: typing.List[core_models.Color] = pydantic.Field(alias=str("backgroundColors")) # type: ignore[literal-required] + + +CbacBannerClassificationString = str +"""CbacBannerClassificationString""" + + +class CbacMarkingRestrictions(core.ModelBase): + """CbacMarkingRestrictions""" + + disallowed_markings: typing.List[core_models.MarkingId] = pydantic.Field(alias=str("disallowedMarkings")) # type: ignore[literal-required] + """The union of all markings that are disallowed for each of the provided markings. This includes all disallowed markings, not just those present in the provided set.""" + + implied_markings: typing.List[core_models.MarkingId] = pydantic.Field(alias=str("impliedMarkings")) # type: ignore[literal-required] + """The union of all markings implied by each of the provided markings. If marking A implies marking B, then membership in A grants membership in B.""" + + required_markings: typing.List[typing.List[core_models.MarkingId]] = pydantic.Field(alias=str("requiredMarkings")) # type: ignore[literal-required] + """The required markings for the provided markings. At least one marking from each inner list must be added to the provided markingIds to form a valid classification.""" + + user_satisfies_markings: CbacMarkingRestrictionsUserSatisfiesMarkings = pydantic.Field(alias=str("userSatisfiesMarkings")) # type: ignore[literal-required] + """True if the current user satisfies the provided markings. The user must be a member of all conjunctive markings. The provided disjunctive markings are grouped by category, and the user must be a member of at least one marking in each group.""" + + is_valid: CbacMarkingRestrictionsIsValid = pydantic.Field(alias=str("isValid")) # type: ignore[literal-required] + """True if the provided markings contain no disallowed markings and each list of required markings is satisfied by the provided markings.""" + + +CbacMarkingRestrictionsIsValid = bool +"""True if the provided markings contain no disallowed markings and each list of required markings is satisfied by the provided markings.""" + + +CbacMarkingRestrictionsUserSatisfiesMarkings = bool +"""True if the current user satisfies the provided markings. The user must be a member of all conjunctive markings. The provided disjunctive markings are grouped by category, and the user must be a member of at least one marking in each group.""" + + class CertificateInfo(core.ModelBase): """CertificateInfo""" @@ -119,6 +159,10 @@ class CertificateInfo(core.ModelBase): """CertificateUsageType""" +ClassificationBannerDisplayType = typing.Literal["BANNER_LINE", "PORTION_MARKING"] +"""The display type of the classification banner. BANNER_LINE is the long classification string used in the header of a document; PORTION_MARKING is a short classification string used for individual paragraphs""" + + class CreateGroupRequest(core.ModelBase): """CreateGroupRequest""" @@ -292,6 +336,11 @@ class GroupMember(core.ModelBase): principal_type: core_models.PrincipalType = pydantic.Field(alias=str("principalType")) # type: ignore[literal-required] principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] + expiration: typing.Optional[GroupMembershipExpiration] = None + """ + The time at which this member's membership in the group will expire. This field will always be + empty unless the `includeExpirations` query parameter is set to true in the list operation. + """ class GroupMembership(core.ModelBase): @@ -421,6 +470,13 @@ class ListMarkingsResponse(core.ModelBase): next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] +class ListOrganizationGuestMembersResponse(core.ModelBase): + """ListOrganizationGuestMembersResponse""" + + data: typing.List[OrganizationGuestMember] + next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] + + class ListOrganizationRoleAssignmentsResponse(core.ModelBase): """ListOrganizationRoleAssignmentsResponse""" @@ -577,6 +633,13 @@ class Organization(core.ModelBase): """ +class OrganizationGuestMember(core.ModelBase): + """OrganizationGuestMember""" + + principal_type: core_models.PrincipalType = pydantic.Field(alias=str("principalType")) # type: ignore[literal-required] + principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] + + OrganizationName = str """OrganizationName""" @@ -858,8 +921,14 @@ class UserSearchFilter(core.ModelBase): "AuthenticationProviderEnabled", "AuthenticationProviderName", "AuthenticationProviderRid", + "CbacBanner", + "CbacBannerClassificationString", + "CbacMarkingRestrictions", + "CbacMarkingRestrictionsIsValid", + "CbacMarkingRestrictionsUserSatisfiesMarkings", "CertificateInfo", "CertificateUsageType", + "ClassificationBannerDisplayType", "CreateGroupRequest", "CreateMarkingCategoryRequest", "CreateMarkingRequest", @@ -897,6 +966,7 @@ class UserSearchFilter(core.ModelBase): "ListMarkingMembersResponse", "ListMarkingRoleAssignmentsResponse", "ListMarkingsResponse", + "ListOrganizationGuestMembersResponse", "ListOrganizationRoleAssignmentsResponse", "ListUsersResponse", "Marking", @@ -917,6 +987,7 @@ class UserSearchFilter(core.ModelBase): "MarkingType", "OidcAuthenticationProtocol", "Organization", + "OrganizationGuestMember", "OrganizationName", "OrganizationRoleAssignment", "PreregisterGroupRequest", diff --git a/foundry_sdk/v2/admin/organization.py b/foundry_sdk/v2/admin/organization.py index ba4e826d5..8fb55362b 100644 --- a/foundry_sdk/v2/admin/organization.py +++ b/foundry_sdk/v2/admin/organization.py @@ -61,6 +61,18 @@ def OrganizationRoleAssignment(self): config=self._config, ) + @cached_property + def OrganizationGuestMember(self): + from foundry_sdk.v2.admin.organization_guest_member import ( + OrganizationGuestMemberClient, + ) # NOQA + + return OrganizationGuestMemberClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + @core.maybe_ignore_preview @pydantic.validate_call @errors.handle_unexpected @@ -143,7 +155,6 @@ def get( self, organization_rid: core_models.OrganizationRid, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> admin_models.Organization: @@ -151,8 +162,6 @@ def get( Get the Organization with the specified rid. :param organization_rid: :type organization_rid: OrganizationRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -165,9 +174,7 @@ def get( core.RequestInfo( method="GET", resource_path="/v2/admin/organizations/{organizationRid}", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "organizationRid": organization_rid, }, @@ -191,7 +198,6 @@ def list_available_roles( self, organization_rid: core_models.OrganizationRid, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> admin_models.ListAvailableOrganizationRolesResponse: @@ -200,8 +206,6 @@ def list_available_roles( :param organization_rid: :type organization_rid: OrganizationRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -215,9 +219,7 @@ def list_available_roles( core.RequestInfo( method="GET", resource_path="/v2/admin/organizations/{organizationRid}/listAvailableRoles", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "organizationRid": organization_rid, }, @@ -245,7 +247,6 @@ def replace( name: admin_models.OrganizationName, description: typing.Optional[str] = None, host: typing.Optional[admin_models.HostName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> admin_models.Organization: @@ -259,8 +260,6 @@ def replace( :type description: Optional[str] :param host: The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. :type host: Optional[HostName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -276,9 +275,7 @@ def replace( core.RequestInfo( method="PUT", resource_path="/v2/admin/organizations/{organizationRid}", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "organizationRid": organization_rid, }, @@ -369,6 +366,18 @@ def OrganizationRoleAssignment(self): config=self._config, ) + @cached_property + def OrganizationGuestMember(self): + from foundry_sdk.v2.admin.organization_guest_member import ( + AsyncOrganizationGuestMemberClient, + ) # NOQA + + return AsyncOrganizationGuestMemberClient( + auth=self._auth, + hostname=self._hostname, + config=self._config, + ) + @core.maybe_ignore_preview @pydantic.validate_call @errors.handle_unexpected @@ -451,7 +460,6 @@ def get( self, organization_rid: core_models.OrganizationRid, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[admin_models.Organization]: @@ -459,8 +467,6 @@ def get( Get the Organization with the specified rid. :param organization_rid: :type organization_rid: OrganizationRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -473,9 +479,7 @@ def get( core.RequestInfo( method="GET", resource_path="/v2/admin/organizations/{organizationRid}", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "organizationRid": organization_rid, }, @@ -499,7 +503,6 @@ def list_available_roles( self, organization_rid: core_models.OrganizationRid, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[admin_models.ListAvailableOrganizationRolesResponse]: @@ -508,8 +511,6 @@ def list_available_roles( :param organization_rid: :type organization_rid: OrganizationRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -523,9 +524,7 @@ def list_available_roles( core.RequestInfo( method="GET", resource_path="/v2/admin/organizations/{organizationRid}/listAvailableRoles", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "organizationRid": organization_rid, }, @@ -553,7 +552,6 @@ def replace( name: admin_models.OrganizationName, description: typing.Optional[str] = None, host: typing.Optional[admin_models.HostName] = None, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[admin_models.Organization]: @@ -567,8 +565,6 @@ def replace( :type description: Optional[str] :param host: The primary host name of the Organization. This should be used when constructing URLs for users of this Organization. :type host: Optional[HostName] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -584,9 +580,7 @@ def replace( core.RequestInfo( method="PUT", resource_path="/v2/admin/organizations/{organizationRid}", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "organizationRid": organization_rid, }, diff --git a/foundry_sdk/v2/admin/organization_guest_member.py b/foundry_sdk/v2/admin/organization_guest_member.py new file mode 100644 index 000000000..ccb91680d --- /dev/null +++ b/foundry_sdk/v2/admin/organization_guest_member.py @@ -0,0 +1,203 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import typing + +import pydantic +import typing_extensions + +from foundry_sdk import _core as core +from foundry_sdk import _errors as errors +from foundry_sdk.v2.admin import errors as admin_errors +from foundry_sdk.v2.admin import models as admin_models +from foundry_sdk.v2.core import models as core_models + + +class OrganizationGuestMemberClient: + """ + The API client for the OrganizationGuestMember Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.ApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _OrganizationGuestMemberClientStreaming(self) + self.with_raw_response = _OrganizationGuestMemberClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + organization_rid: core_models.OrganizationRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> admin_models.ListOrganizationGuestMembersResponse: + """ + Lists all guest members of an Organization. + + :param organization_rid: + :type organization_rid: OrganizationRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.ListOrganizationGuestMembersResponse + + :raises ListOrganizationGuestMembersPermissionDenied: The provided token does not have permission to list guest members for this organization. + :raises OrganizationNotFound: The given Organization could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/organizations/{organizationRid}/guestMembers", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListOrganizationGuestMembersResponse, + request_timeout=request_timeout, + throwable_errors={ + "ListOrganizationGuestMembersPermissionDenied": admin_errors.ListOrganizationGuestMembersPermissionDenied, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _OrganizationGuestMemberClientRaw: + def __init__(self, client: OrganizationGuestMemberClient) -> None: + def list(_: admin_models.ListOrganizationGuestMembersResponse): ... + + self.list = core.with_raw_response(list, client.list) + + +class _OrganizationGuestMemberClientStreaming: + def __init__(self, client: OrganizationGuestMemberClient) -> None: + def list(_: admin_models.ListOrganizationGuestMembersResponse): ... + + self.list = core.with_streaming_response(list, client.list) + + +class AsyncOrganizationGuestMemberClient: + """ + The API client for the OrganizationGuestMember Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncOrganizationGuestMemberClientStreaming(self) + self.with_raw_response = _AsyncOrganizationGuestMemberClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + organization_rid: core_models.OrganizationRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.ListOrganizationGuestMembersResponse]: + """ + Lists all guest members of an Organization. + + :param organization_rid: + :type organization_rid: OrganizationRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.ListOrganizationGuestMembersResponse] + + :raises ListOrganizationGuestMembersPermissionDenied: The provided token does not have permission to list guest members for this organization. + :raises OrganizationNotFound: The given Organization could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/organizations/{organizationRid}/guestMembers", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListOrganizationGuestMembersResponse, + request_timeout=request_timeout, + throwable_errors={ + "ListOrganizationGuestMembersPermissionDenied": admin_errors.ListOrganizationGuestMembersPermissionDenied, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncOrganizationGuestMemberClientRaw: + def __init__(self, client: AsyncOrganizationGuestMemberClient) -> None: + def list(_: admin_models.ListOrganizationGuestMembersResponse): ... + + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncOrganizationGuestMemberClientStreaming: + def __init__(self, client: AsyncOrganizationGuestMemberClient) -> None: + def list(_: admin_models.ListOrganizationGuestMembersResponse): ... + + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/organization_role_assignment.py b/foundry_sdk/v2/admin/organization_role_assignment.py index 37f0cd0ec..4c295cb5b 100644 --- a/foundry_sdk/v2/admin/organization_role_assignment.py +++ b/foundry_sdk/v2/admin/organization_role_assignment.py @@ -56,7 +56,6 @@ def add( organization_rid: core_models.OrganizationRid, *, role_assignments: typing.List[core_models.RoleAssignmentUpdate], - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> None: @@ -67,8 +66,6 @@ def add( :type organization_rid: OrganizationRid :param role_assignments: :type role_assignments: List[RoleAssignmentUpdate] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -83,9 +80,7 @@ def add( core.RequestInfo( method="POST", resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments/add", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "organizationRid": organization_rid, }, @@ -113,7 +108,6 @@ def list( self, organization_rid: core_models.OrganizationRid, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> admin_models.ListOrganizationRoleAssignmentsResponse: @@ -122,8 +116,6 @@ def list( :param organization_rid: :type organization_rid: OrganizationRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -137,9 +129,7 @@ def list( core.RequestInfo( method="GET", resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "organizationRid": organization_rid, }, @@ -165,7 +155,6 @@ def remove( organization_rid: core_models.OrganizationRid, *, role_assignments: typing.List[core_models.RoleAssignmentUpdate], - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> None: @@ -176,8 +165,6 @@ def remove( :type organization_rid: OrganizationRid :param role_assignments: :type role_assignments: List[RoleAssignmentUpdate] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -192,9 +179,7 @@ def remove( core.RequestInfo( method="POST", resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments/remove", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "organizationRid": organization_rid, }, @@ -265,7 +250,6 @@ def add( organization_rid: core_models.OrganizationRid, *, role_assignments: typing.List[core_models.RoleAssignmentUpdate], - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[None]: @@ -276,8 +260,6 @@ def add( :type organization_rid: OrganizationRid :param role_assignments: :type role_assignments: List[RoleAssignmentUpdate] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -292,9 +274,7 @@ def add( core.RequestInfo( method="POST", resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments/add", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "organizationRid": organization_rid, }, @@ -322,7 +302,6 @@ def list( self, organization_rid: core_models.OrganizationRid, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[admin_models.ListOrganizationRoleAssignmentsResponse]: @@ -331,8 +310,6 @@ def list( :param organization_rid: :type organization_rid: OrganizationRid - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -346,9 +323,7 @@ def list( core.RequestInfo( method="GET", resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "organizationRid": organization_rid, }, @@ -374,7 +349,6 @@ def remove( organization_rid: core_models.OrganizationRid, *, role_assignments: typing.List[core_models.RoleAssignmentUpdate], - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[None]: @@ -385,8 +359,6 @@ def remove( :type organization_rid: OrganizationRid :param role_assignments: :type role_assignments: List[RoleAssignmentUpdate] - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -401,9 +373,7 @@ def remove( core.RequestInfo( method="POST", resource_path="/v2/admin/organizations/{organizationRid}/roleAssignments/remove", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "organizationRid": organization_rid, }, diff --git a/foundry_sdk/v2/admin/user.py b/foundry_sdk/v2/admin/user.py index 5aa581548..66cd5019c 100644 --- a/foundry_sdk/v2/admin/user.py +++ b/foundry_sdk/v2/admin/user.py @@ -256,7 +256,6 @@ def get_markings( self, user_id: core_models.UserId, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> admin_models.GetUserMarkingsResponse: @@ -264,8 +263,6 @@ def get_markings( Retrieve Markings that the user is currently a member of. :param user_id: :type user_id: UserId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -280,9 +277,7 @@ def get_markings( core.RequestInfo( method="GET", resource_path="/v2/admin/users/{userId}/getMarkings", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "userId": user_id, }, @@ -414,7 +409,6 @@ def revoke_all_tokens( self, user_id: core_models.UserId, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> None: @@ -426,8 +420,6 @@ def revoke_all_tokens( :param user_id: :type user_id: UserId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -442,9 +434,7 @@ def revoke_all_tokens( core.RequestInfo( method="POST", resource_path="/v2/admin/users/{userId}/revokeAllTokens", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "userId": user_id, }, @@ -474,7 +464,8 @@ def search( _sdk_internal: core.SdkInternal = {}, ) -> admin_models.SearchUsersResponse: """ - Perform a case-insensitive prefix search for users based on username, given name and family name. + Perform a case-insensitive prefix search for active users based on username, given name and family name. + Deleted users are not included in results. To list deleted users, use the `list` endpoint with `include=DELETED`. :param where: :type where: UserSearchFilter @@ -787,7 +778,6 @@ def get_markings( self, user_id: core_models.UserId, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[admin_models.GetUserMarkingsResponse]: @@ -795,8 +785,6 @@ def get_markings( Retrieve Markings that the user is currently a member of. :param user_id: :type user_id: UserId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -811,9 +799,7 @@ def get_markings( core.RequestInfo( method="GET", resource_path="/v2/admin/users/{userId}/getMarkings", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "userId": user_id, }, @@ -945,7 +931,6 @@ def revoke_all_tokens( self, user_id: core_models.UserId, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[None]: @@ -957,8 +942,6 @@ def revoke_all_tokens( :param user_id: :type user_id: UserId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -973,9 +956,7 @@ def revoke_all_tokens( core.RequestInfo( method="POST", resource_path="/v2/admin/users/{userId}/revokeAllTokens", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "userId": user_id, }, @@ -1005,7 +986,8 @@ def search( _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[admin_models.SearchUsersResponse]: """ - Perform a case-insensitive prefix search for users based on username, given name and family name. + Perform a case-insensitive prefix search for active users based on username, given name and family name. + Deleted users are not included in results. To list deleted users, use the `list` endpoint with `include=DELETED`. :param where: :type where: UserSearchFilter diff --git a/foundry_sdk/v2/admin/user_provider_info.py b/foundry_sdk/v2/admin/user_provider_info.py index 9deb2f0e5..784c83ad7 100644 --- a/foundry_sdk/v2/admin/user_provider_info.py +++ b/foundry_sdk/v2/admin/user_provider_info.py @@ -55,7 +55,6 @@ def get( self, user_id: core_models.UserId, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> admin_models.UserProviderInfo: @@ -63,8 +62,6 @@ def get( Get the UserProviderInfo. :param user_id: :type user_id: UserId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -80,9 +77,7 @@ def get( core.RequestInfo( method="GET", resource_path="/v2/admin/users/{userId}/providerInfo", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "userId": user_id, }, @@ -110,7 +105,6 @@ def replace( user_id: core_models.UserId, *, provider_id: admin_models.ProviderId, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> admin_models.UserProviderInfo: @@ -120,8 +114,6 @@ def replace( :type user_id: UserId :param provider_id: The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm. :type provider_id: ProviderId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -139,9 +131,7 @@ def replace( core.RequestInfo( method="PUT", resource_path="/v2/admin/users/{userId}/providerInfo", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "userId": user_id, }, @@ -215,7 +205,6 @@ def get( self, user_id: core_models.UserId, *, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[admin_models.UserProviderInfo]: @@ -223,8 +212,6 @@ def get( Get the UserProviderInfo. :param user_id: :type user_id: UserId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -240,9 +227,7 @@ def get( core.RequestInfo( method="GET", resource_path="/v2/admin/users/{userId}/providerInfo", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "userId": user_id, }, @@ -270,7 +255,6 @@ def replace( user_id: core_models.UserId, *, provider_id: admin_models.ProviderId, - preview: typing.Optional[core_models.PreviewMode] = None, request_timeout: typing.Optional[core.Timeout] = None, _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[admin_models.UserProviderInfo]: @@ -280,8 +264,6 @@ def replace( :type user_id: UserId :param provider_id: The ID of the User in the external authentication provider. This value is determined by the authentication provider. At most one User can have a given provider ID in a given Realm. :type provider_id: ProviderId - :param preview: Enables the use of preview functionality. - :type preview: Optional[PreviewMode] :param request_timeout: timeout setting for this request in seconds. :type request_timeout: Optional[int] :return: Returns the result object. @@ -299,9 +281,7 @@ def replace( core.RequestInfo( method="PUT", resource_path="/v2/admin/users/{userId}/providerInfo", - query_params={ - "preview": preview, - }, + query_params={}, path_params={ "userId": user_id, }, diff --git a/foundry_sdk/v2/checkpoints/models.py b/foundry_sdk/v2/checkpoints/models.py index 6f906989b..db26dd15b 100644 --- a/foundry_sdk/v2/checkpoints/models.py +++ b/foundry_sdk/v2/checkpoints/models.py @@ -142,6 +142,10 @@ class ApprovalsMetadata(core.ModelBase): "UPLOAD_DATA_TO_FLOW_CAPTURE", "EXPORT_FLOW_CAPTURE_ZIP", "INSIGHT_LOAD", + "AIP_ANALYST_APP_LOAD", + "PEER_MANAGER_CDS_PAYLOAD_EXPORT", + "PEER_MANAGER_OBJECT_TYPE_SCHEMAS_EXPORT", + "AIP_ANALYST_EXPORT", ] """ Checkpoint type identifier. See the [Checkpoints documentation](https://palantir.com/docs/foundry/checkpoints/overview) @@ -219,6 +223,7 @@ class CheckpointedIssueRid(core.ModelBase): "CheckpointedObjectSet", "CheckpointedMarking", "CheckpointedMarketplaceProduct", + "CheckpointedPeeringJob", "CheckpointedRole", "CheckpointedIntervention", "CheckpointedLanguageModelSession", @@ -241,6 +246,7 @@ class CheckpointedIssueRid(core.ModelBase): "CheckpointedObjectSetVersionedRid", "CheckpointedObjectSetTypesProxyRids", "CheckpointedResourceRid", + "CheckpointedPeeringJobId", "CheckpointedIssueRid", "CheckpointedInterventionRid", "CheckpointedJobSpecRid", @@ -393,6 +399,22 @@ class CheckpointedOntologyWithObjectTypes(core.ModelBase): object_type_rids: typing.List[core.RID] = pydantic.Field(alias=str("objectTypeRids")) # type: ignore[literal-required] +class CheckpointedPeeringJob(core.ModelBase): + """A peering job that was captured as part of a checkpoint.""" + + job_id: str = pydantic.Field(alias=str("jobId")) # type: ignore[literal-required] + """Identifier of the peering job.""" + + type: typing.Literal["checkpointedPeeringJob"] = "checkpointedPeeringJob" + + +class CheckpointedPeeringJobId(core.ModelBase): + """Peering job identifier for a checkpointed peering job.""" + + id: str + type: typing.Literal["checkpointedPeeringJobId"] = "checkpointedPeeringJobId" + + class CheckpointedPrincipal(core.ModelBase): """A user or group principal that was captured as part of a checkpoint.""" @@ -476,6 +498,7 @@ class CheckpointedResourceRid(core.ModelBase): "WORKSHOP_MODULE", "WALKTHROUGH", "FLOW_CAPTURE", + "PEERING_CONNECTION", ] """Type of resource that was captured.""" @@ -893,6 +916,8 @@ class SearchRecordsRequest(core.ModelBase): "CheckpointedObjectSetVersionedRid", "CheckpointedOntology", "CheckpointedOntologyWithObjectTypes", + "CheckpointedPeeringJob", + "CheckpointedPeeringJobId", "CheckpointedPrincipal", "CheckpointedPrincipalId", "CheckpointedPrincipalRole", diff --git a/foundry_sdk/v2/cli.py b/foundry_sdk/v2/cli.py index 91c88add0..928e4287f 100644 --- a/foundry_sdk/v2/cli.py +++ b/foundry_sdk/v2/cli.py @@ -128,21 +128,16 @@ def admin_user_op_get_current( @admin_user.command("get_markings") @click.argument("user_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) @click.pass_obj def admin_user_op_get_markings( client: FoundryClient, user_id: str, - preview: typing.Optional[bool], ): """ Retrieve Markings that the user is currently a member of. """ result = client.admin.User.get_markings( user_id=user_id, - preview=preview, ) click.echo(repr(result)) @@ -196,14 +191,10 @@ def admin_user_op_profile_picture( @admin_user.command("revoke_all_tokens") @click.argument("user_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) @click.pass_obj def admin_user_op_revoke_all_tokens( client: FoundryClient, user_id: str, - preview: typing.Optional[bool], ): """ Revoke all active authentication tokens for the user including active browser sessions and long-lived @@ -214,7 +205,6 @@ def admin_user_op_revoke_all_tokens( """ result = client.admin.User.revoke_all_tokens( user_id=user_id, - preview=preview, ) click.echo(repr(result)) @@ -231,7 +221,8 @@ def admin_user_op_search( page_token: typing.Optional[str], ): """ - Perform a case-insensitive prefix search for users based on username, given name and family name. + Perform a case-insensitive prefix search for active users based on username, given name and family name. + Deleted users are not included in results. To list deleted users, use the `list` endpoint with `include=DELETED`. """ result = client.admin.User.search( @@ -306,21 +297,16 @@ def admin_user_user_provider_info(): @admin_user_user_provider_info.command("get") @click.argument("user_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) @click.pass_obj def admin_user_user_provider_info_op_get( client: FoundryClient, user_id: str, - preview: typing.Optional[bool], ): """ Get the UserProviderInfo. """ result = client.admin.User.ProviderInfo.get( user_id=user_id, - preview=preview, ) click.echo(repr(result)) @@ -335,15 +321,11 @@ def admin_user_user_provider_info_op_get( At most one User can have a given provider ID in a given Realm. """, ) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) @click.pass_obj def admin_user_user_provider_info_op_replace( client: FoundryClient, user_id: str, provider_id: str, - preview: typing.Optional[bool], ): """ Replace the UserProviderInfo. @@ -351,7 +333,6 @@ def admin_user_user_provider_info_op_replace( result = client.admin.User.ProviderInfo.replace( user_id=user_id, provider_id=provider_id, - preview=preview, ) click.echo(repr(result)) @@ -464,35 +445,26 @@ def admin_organization_op_create( @admin_organization.command("get") @click.argument("organization_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) @click.pass_obj def admin_organization_op_get( client: FoundryClient, organization_rid: str, - preview: typing.Optional[bool], ): """ Get the Organization with the specified rid. """ result = client.admin.Organization.get( organization_rid=organization_rid, - preview=preview, ) click.echo(repr(result)) @admin_organization.command("list_available_roles") @click.argument("organization_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) @click.pass_obj def admin_organization_op_list_available_roles( client: FoundryClient, organization_rid: str, - preview: typing.Optional[bool], ): """ List all roles that can be assigned to a principal for the given Organization. @@ -500,7 +472,6 @@ def admin_organization_op_list_available_roles( """ result = client.admin.Organization.list_available_roles( organization_rid=organization_rid, - preview=preview, ) click.echo(repr(result)) @@ -517,9 +488,6 @@ def admin_organization_op_list_available_roles( Organization. """, ) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) @click.pass_obj def admin_organization_op_replace( client: FoundryClient, @@ -527,7 +495,6 @@ def admin_organization_op_replace( name: str, description: typing.Optional[str], host: typing.Optional[str], - preview: typing.Optional[bool], ): """ Replace the Organization with the specified rid. @@ -537,6 +504,32 @@ def admin_organization_op_replace( name=name, description=description, host=host, + ) + click.echo(repr(result)) + + +@admin_organization.group("organization_guest_member") +def admin_organization_organization_guest_member(): + pass + + +@admin_organization_organization_guest_member.command("list") +@click.argument("organization_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_organization_organization_guest_member_op_list( + client: FoundryClient, + organization_rid: str, + preview: typing.Optional[bool], +): + """ + Lists all guest members of an Organization. + + """ + result = client.admin.Organization.OrganizationGuestMember.list( + organization_rid=organization_rid, preview=preview, ) click.echo(repr(result)) @@ -550,15 +543,11 @@ def admin_organization_organization_role_assignment(): @admin_organization_organization_role_assignment.command("add") @click.argument("organization_rid", type=str, required=True) @click.option("--role_assignments", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) @click.pass_obj def admin_organization_organization_role_assignment_op_add( client: FoundryClient, organization_rid: str, role_assignments: str, - preview: typing.Optional[bool], ): """ Assign roles to principals for the given Organization. At most 100 role assignments can be added in a single request. @@ -567,21 +556,16 @@ def admin_organization_organization_role_assignment_op_add( result = client.admin.Organization.OrganizationRoleAssignment.add( organization_rid=organization_rid, role_assignments=json.loads(role_assignments), - preview=preview, ) click.echo(repr(result)) @admin_organization_organization_role_assignment.command("list") @click.argument("organization_rid", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) @click.pass_obj def admin_organization_organization_role_assignment_op_list( client: FoundryClient, organization_rid: str, - preview: typing.Optional[bool], ): """ List all principals who are assigned a role for the given Organization. @@ -589,7 +573,6 @@ def admin_organization_organization_role_assignment_op_list( """ result = client.admin.Organization.OrganizationRoleAssignment.list( organization_rid=organization_rid, - preview=preview, ) click.echo(repr(result)) @@ -597,15 +580,11 @@ def admin_organization_organization_role_assignment_op_list( @admin_organization_organization_role_assignment.command("remove") @click.argument("organization_rid", type=str, required=True) @click.option("--role_assignments", type=str, required=True, help="""""") -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) @click.pass_obj def admin_organization_organization_role_assignment_op_remove( client: FoundryClient, organization_rid: str, role_assignments: str, - preview: typing.Optional[bool], ): """ Remove roles from principals for the given Organization. At most 100 role assignments can be removed in a single request. @@ -614,7 +593,6 @@ def admin_organization_organization_role_assignment_op_remove( result = client.admin.Organization.OrganizationRoleAssignment.remove( organization_rid=organization_rid, role_assignments=json.loads(role_assignments), - preview=preview, ) click.echo(repr(result)) @@ -668,21 +646,16 @@ def admin_marking_category_op_create( @admin_marking_category.command("get") @click.argument("marking_category_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) @click.pass_obj def admin_marking_category_op_get( client: FoundryClient, marking_category_id: str, - preview: typing.Optional[bool], ): """ Get the MarkingCategory with the specified id. """ result = client.admin.MarkingCategory.get( marking_category_id=marking_category_id, - preview=preview, ) click.echo(repr(result)) @@ -699,15 +672,11 @@ def admin_marking_category_op_get( To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.""", ) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) @click.pass_obj def admin_marking_category_op_list( client: FoundryClient, page_size: typing.Optional[int], page_token: typing.Optional[str], - preview: typing.Optional[bool], ): """ Maximum page size 100. @@ -715,7 +684,6 @@ def admin_marking_category_op_list( result = client.admin.MarkingCategory.list( page_size=page_size, page_token=page_token, - preview=preview, ) click.echo(repr(result)) @@ -1272,6 +1240,16 @@ def admin_group_group_member_op_add( @admin_group_group_member.command("list") @click.argument("group_id", type=str, required=True) +@click.option( + "--include_expirations", + type=bool, + required=False, + help="""When true, includes the expiration time of any temporary members of this group. `includeExpirations` +cannot be set to true if `transitive` is also set to true. + +Defaults to false. +""", +) @click.option( "--page_size", type=int, required=False, help="""The page size to use for the endpoint.""" ) @@ -1292,6 +1270,8 @@ def admin_group_group_member_op_add( be returned, but if `transitive=true` then Group A and User B will be returned. This will recursively resolve Groups through all layers of nesting. +If `transitive` is true, `includeExpirations` cannot also be set to true. + Defaults to false. """, ) @@ -1299,6 +1279,7 @@ def admin_group_group_member_op_add( def admin_group_group_member_op_list( client: FoundryClient, group_id: str, + include_expirations: typing.Optional[bool], page_size: typing.Optional[int], page_token: typing.Optional[str], transitive: typing.Optional[bool], @@ -1315,6 +1296,7 @@ def admin_group_group_member_op_list( """ result = client.admin.Group.GroupMember.list( group_id=group_id, + include_expirations=include_expirations, page_size=page_size, page_token=page_token, transitive=transitive, @@ -1346,21 +1328,16 @@ def admin_group_group_provider_info(): @admin_group_group_provider_info.command("get") @click.argument("group_id", type=str, required=True) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) @click.pass_obj def admin_group_group_provider_info_op_get( client: FoundryClient, group_id: str, - preview: typing.Optional[bool], ): """ Get the GroupProviderInfo. """ result = client.admin.Group.ProviderInfo.get( group_id=group_id, - preview=preview, ) click.echo(repr(result)) @@ -1375,15 +1352,11 @@ def admin_group_group_provider_info_op_get( At most one Group can have a given provider ID in a given Realm. """, ) -@click.option( - "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" -) @click.pass_obj def admin_group_group_provider_info_op_replace( client: FoundryClient, group_id: str, provider_id: str, - preview: typing.Optional[bool], ): """ Replace the GroupProviderInfo. @@ -1391,7 +1364,6 @@ def admin_group_group_provider_info_op_replace( result = client.admin.Group.ProviderInfo.replace( group_id=group_id, provider_id=provider_id, - preview=preview, ) click.echo(repr(result)) @@ -1707,6 +1679,76 @@ def admin_enrollment_enrollment_role_assignment_op_remove( click.echo(repr(result)) +@admin.group("cbac_marking_restrictions") +def admin_cbac_marking_restrictions(): + pass + + +@admin_cbac_marking_restrictions.command("get") +@click.option( + "--marking_ids", + type=str, + required=False, + help="""The marking IDs for which to get restrictions.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_cbac_marking_restrictions_op_get( + client: FoundryClient, + marking_ids: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Returns disallowed, implied, and required markings for the given set of marking IDs. + """ + result = client.admin.CbacMarkingRestrictions.get( + marking_ids=None if marking_ids is None else json.loads(marking_ids), + preview=preview, + ) + click.echo(repr(result)) + + +@admin.group("cbac_banner") +def admin_cbac_banner(): + pass + + +@admin_cbac_banner.command("get") +@click.option( + "--display_type", + type=click.Choice(["BANNER_LINE", "PORTION_MARKING"]), + required=False, + help="""The display type of the banner. Defaults to PORTION_MARKING.""", +) +@click.option( + "--marking_ids", + type=str, + required=False, + help="""The marking IDs for which to generate a banner.""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_cbac_banner_op_get( + client: FoundryClient, + display_type: typing.Optional[typing.Literal["BANNER_LINE", "PORTION_MARKING"]], + marking_ids: typing.Optional[str], + preview: typing.Optional[bool], +): + """ + Returns a classification banner string and colors for the given set of marking IDs. + """ + result = client.admin.CbacBanner.get( + display_type=display_type, + marking_ids=None if marking_ids is None else json.loads(marking_ids), + preview=preview, + ) + click.echo(repr(result)) + + @cli.group("aip_agents") def aip_agents(): pass @@ -5376,6 +5418,40 @@ def filesystem_folder_op_get_batch( click.echo(repr(result)) +@filesystem_folder.command("replace") +@click.argument("folder_rid", type=str, required=True) +@click.option("--display_name", type=str, required=True, help="""""") +@click.option( + "--parent_folder_rid", + type=str, + required=True, + help="""The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, +this value will be the root folder (`ri.compass.main.folder.0`). +""", +) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def filesystem_folder_op_replace( + client: FoundryClient, + folder_rid: str, + display_name: str, + parent_folder_rid: str, + preview: typing.Optional[bool], +): + """ + Replace the Folder with the specified rid. + """ + result = client.filesystem.Folder.replace( + folder_rid=folder_rid, + display_name=display_name, + parent_folder_rid=parent_folder_rid, + preview=preview, + ) + click.echo(repr(result)) + + @cli.group("functions") def functions(): pass @@ -5949,6 +6025,81 @@ def media_sets_media_set_op_calculate( click.echo(repr(result)) +@media_sets_media_set.command("clear") +@click.argument("media_set_rid", type=str, required=True) +@click.option( + "--media_item_path", + type=str, + required=True, + help="""The path of the media item to clear. +""", +) +@click.option( + "--branch_name", + type=str, + required=False, + help="""Specifies the specific branch by name from which this media item will be cleared. May not be provided if branch rid or view rid are provided.""", +) +@click.option( + "--branch_rid", + type=str, + required=False, + help="""Specifies the specific branch by rid from which this media item will be cleared. May not be provided if branch name or view rid are provided.""", +) +@click.option( + "--preview", + type=bool, + required=False, + help="""A boolean flag that, when set to true, enables the use of beta features in preview mode. +""", +) +@click.option( + "--transaction_id", + type=str, + required=False, + help="""The ID of the transaction associated with this request. Required if this is a transactional media set. +""", +) +@click.option( + "--view_rid", + type=str, + required=False, + help="""Specifies the specific view by rid from which this media item will be cleared. May not be provided if branch name or branch rid are provided.""", +) +@click.pass_obj +def media_sets_media_set_op_clear( + client: FoundryClient, + media_set_rid: str, + media_item_path: str, + branch_name: typing.Optional[str], + branch_rid: typing.Optional[str], + preview: typing.Optional[bool], + transaction_id: typing.Optional[str], + view_rid: typing.Optional[str], +): + """ + Clears (soft-deletes) the media item at the specified path within a media set, making it and all older + media items at that path un-retrievable. + + A branch name, branch RID, or view RID may optionally be specified. If none is specified, + the item will be cleared from the default branch. If more than one is specified, an error is thrown. + + For transactional media sets, a transaction ID must be provided. The deletion will not be + visible until the transaction is committed. + + """ + result = client.media_sets.MediaSet.clear( + media_set_rid=media_set_rid, + media_item_path=media_item_path, + branch_name=branch_name, + branch_rid=branch_rid, + preview=preview, + transaction_id=transaction_id, + view_rid=view_rid, + ) + click.echo(repr(result)) + + @media_sets_media_set.command("commit") @click.argument("media_set_rid", type=str, required=True) @click.argument("transaction_id", type=str, required=True) @@ -9698,6 +9849,41 @@ def ontologies_ontology_object_type_op_get( click.echo(repr(result)) +@ontologies_ontology_object_type.command("get_by_rid_batch") +@click.argument("ontology", type=str, required=True) +@click.option("--requests", type=str, required=True, help="""""") +@click.option( + "--branch", + type=str, + required=False, + help="""The Foundry branch to load the object type definitions from. If not specified, the default branch will be used. +Branches are an experimental feature and not all workflows are supported. +""", +) +@click.pass_obj +def ontologies_ontology_object_type_op_get_by_rid_batch( + client: FoundryClient, + ontology: str, + requests: str, + branch: typing.Optional[str], +): + """ + Gets a list of object types by RID in bulk. + + Object types are filtered from the response if they don't exist or the requesting token lacks the required + permissions. + + The maximum batch size for this endpoint is 100. + + """ + result = client.ontologies.Ontology.ObjectType.get_by_rid_batch( + ontology=ontology, + requests=json.loads(requests), + branch=branch, + ) + click.echo(repr(result)) + + @ontologies_ontology_object_type.command("get_edits_history") @click.argument("ontology", type=str, required=True) @click.argument("object_type", type=str, required=True) @@ -11498,6 +11684,9 @@ def orchestration_job_op_get( ): """ Get the Job with the specified rid. + + Users are allowed to make a maximum of **4 requests per second** and **25 concurrent requests**. + """ result = client.orchestration.Job.get( job_rid=job_rid, @@ -11520,6 +11709,9 @@ def orchestration_job_op_get_batch( """ Execute multiple get requests on Job. + Users are allowed to make a maximum of **4 requests per second** and **25 concurrent requests**. + + The maximum batch size for this endpoint is 500. """ result = client.orchestration.Job.get_batch( @@ -11604,6 +11796,9 @@ def orchestration_build_op_get( ): """ Get the Build with the specified rid. + + Users are allowed to make a maximum of **4 requests per second** and **25 concurrent requests**. + """ result = client.orchestration.Build.get( build_rid=build_rid, @@ -11621,6 +11816,9 @@ def orchestration_build_op_get_batch( """ Execute multiple get requests on Build. + Users are allowed to make a maximum of **4 requests per second** and **25 concurrent requests**. + + The maximum batch size for this endpoint is 100. """ result = client.orchestration.Build.get_batch( diff --git a/foundry_sdk/v2/core/models.py b/foundry_sdk/v2/core/models.py index 5325229fb..cea18ec0c 100644 --- a/foundry_sdk/v2/core/models.py +++ b/foundry_sdk/v2/core/models.py @@ -95,6 +95,10 @@ class CipherTextType(core.ModelBase): type: typing.Literal["cipherText"] = "cipherText" +Color = str +"""The hex value of a color.""" + + ColumnName = str """The name of a column in a dataset.""" @@ -956,6 +960,7 @@ class VoidType(core.ModelBase): "CheckReportRid", "CheckRid", "CipherTextType", + "Color", "ColumnName", "ComputeSeconds", "ContentLength", diff --git a/foundry_sdk/v2/filesystem/errors.py b/foundry_sdk/v2/filesystem/errors.py index 7b75f718f..aaf8a256f 100644 --- a/foundry_sdk/v2/filesystem/errors.py +++ b/foundry_sdk/v2/filesystem/errors.py @@ -83,6 +83,19 @@ class AddResourceRolesPermissionDenied(errors.PermissionDeniedError): error_instance_id: str +class CircularDependencyParameters(typing_extensions.TypedDict): + """The requested operation would result in a circular dependency in the folder hierarchy. For example, moving a folder into one of its descendants.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class CircularDependency(errors.BadRequestError): + name: typing.Literal["CircularDependency"] + parameters: CircularDependencyParameters + error_instance_id: str + + class CreateFolderOutsideProjectNotSupportedParameters(typing_extensions.TypedDict): """The given Resource is not a folder.""" @@ -431,6 +444,21 @@ class InvalidOrganizations(errors.BadRequestError): error_instance_id: str +class InvalidParentFolderParameters(typing_extensions.TypedDict): + """The specified parent folder is not a valid destination for the resource. For example, a project cannot be moved under a regular folder, a folder cannot be moved to a Space, etc.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + parentFolderRid: filesystem_models.FolderRid + + +@dataclass +class InvalidParentFolder(errors.BadRequestError): + name: typing.Literal["InvalidParentFolder"] + parameters: InvalidParentFolderParameters + error_instance_id: str + + class InvalidPathParameters(typing_extensions.TypedDict): """ The given path is invalid. @@ -774,6 +802,21 @@ class RemoveResourceRolesPermissionDenied(errors.PermissionDeniedError): error_instance_id: str +class ReplaceFolderPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not replace the Folder.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + folderRid: filesystem_models.FolderRid + + +@dataclass +class ReplaceFolderPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["ReplaceFolderPermissionDenied"] + parameters: ReplaceFolderPermissionDeniedParameters + error_instance_id: str + + class ReplaceProjectPermissionDeniedParameters(typing_extensions.TypedDict): """Could not replace the Project.""" @@ -1070,6 +1113,7 @@ class UsageAccountServiceIsNotPresent(errors.InternalServerError): "AddMarkingsPermissionDenied", "AddOrganizationsPermissionDenied", "AddResourceRolesPermissionDenied", + "CircularDependency", "CreateFolderOutsideProjectNotSupported", "CreateFolderPermissionDenied", "CreateGroupPermissionDenied", @@ -1094,6 +1138,7 @@ class UsageAccountServiceIsNotPresent(errors.InternalServerError): "InvalidFolder", "InvalidOrganizationHierarchy", "InvalidOrganizations", + "InvalidParentFolder", "InvalidPath", "InvalidPrincipalIdsForGroupTemplate", "InvalidRoleIds", @@ -1116,6 +1161,7 @@ class UsageAccountServiceIsNotPresent(errors.InternalServerError): "RemoveMarkingsPermissionDenied", "RemoveOrganizationsPermissionDenied", "RemoveResourceRolesPermissionDenied", + "ReplaceFolderPermissionDenied", "ReplaceProjectPermissionDenied", "ReplaceSpacePermissionDenied", "ReservedSpaceCannotBeReplaced", diff --git a/foundry_sdk/v2/filesystem/folder.py b/foundry_sdk/v2/filesystem/folder.py index ee728bc80..54116dc4f 100644 --- a/foundry_sdk/v2/filesystem/folder.py +++ b/foundry_sdk/v2/filesystem/folder.py @@ -285,6 +285,80 @@ def get_batch( ), ) + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + folder_rid: filesystem_models.FolderRid, + *, + display_name: filesystem_models.ResourceDisplayName, + parent_folder_rid: filesystem_models.FolderRid, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> filesystem_models.Folder: + """ + Replace the Folder with the specified rid. + :param folder_rid: + :type folder_rid: FolderRid + :param display_name: + :type display_name: ResourceDisplayName + :param parent_folder_rid: The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`). + :type parent_folder_rid: FolderRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: filesystem_models.Folder + + :raises CircularDependency: The requested operation would result in a circular dependency in the folder hierarchy. For example, moving a folder into one of its descendants. + :raises FolderNotFound: The given Folder could not be found. + :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. + :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. + :raises InvalidFolder: The given Resource is not a Folder. + :raises InvalidParentFolder: The specified parent folder is not a valid destination for the resource. For example, a project cannot be moved under a regular folder, a folder cannot be moved to a Space, etc. + :raises MissingDisplayName: A Display Name must be provided. + :raises ReplaceFolderPermissionDenied: Could not replace the Folder. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/filesystem/folders/{folderRid}", + query_params={ + "preview": preview, + }, + path_params={ + "folderRid": folder_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=filesystem_models.ReplaceFolderRequest( + parent_folder_rid=parent_folder_rid, + display_name=display_name, + ), + response_type=filesystem_models.Folder, + request_timeout=request_timeout, + throwable_errors={ + "CircularDependency": filesystem_errors.CircularDependency, + "FolderNotFound": filesystem_errors.FolderNotFound, + "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, + "InvalidDisplayName": filesystem_errors.InvalidDisplayName, + "InvalidFolder": filesystem_errors.InvalidFolder, + "InvalidParentFolder": filesystem_errors.InvalidParentFolder, + "MissingDisplayName": filesystem_errors.MissingDisplayName, + "ReplaceFolderPermissionDenied": filesystem_errors.ReplaceFolderPermissionDenied, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + class _FolderClientRaw: def __init__(self, client: FolderClient) -> None: @@ -292,11 +366,13 @@ def children(_: filesystem_models.ListChildrenOfFolderResponse): ... def create(_: filesystem_models.Folder): ... def get(_: filesystem_models.Folder): ... def get_batch(_: filesystem_models.GetFoldersBatchResponse): ... + def replace(_: filesystem_models.Folder): ... self.children = core.with_raw_response(children, client.children) self.create = core.with_raw_response(create, client.create) self.get = core.with_raw_response(get, client.get) self.get_batch = core.with_raw_response(get_batch, client.get_batch) + self.replace = core.with_raw_response(replace, client.replace) class _FolderClientStreaming: @@ -305,11 +381,13 @@ def children(_: filesystem_models.ListChildrenOfFolderResponse): ... def create(_: filesystem_models.Folder): ... def get(_: filesystem_models.Folder): ... def get_batch(_: filesystem_models.GetFoldersBatchResponse): ... + def replace(_: filesystem_models.Folder): ... self.children = core.with_streaming_response(children, client.children) self.create = core.with_streaming_response(create, client.create) self.get = core.with_streaming_response(get, client.get) self.get_batch = core.with_streaming_response(get_batch, client.get_batch) + self.replace = core.with_streaming_response(replace, client.replace) class AsyncFolderClient: @@ -571,6 +649,80 @@ def get_batch( ), ) + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def replace( + self, + folder_rid: filesystem_models.FolderRid, + *, + display_name: filesystem_models.ResourceDisplayName, + parent_folder_rid: filesystem_models.FolderRid, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[filesystem_models.Folder]: + """ + Replace the Folder with the specified rid. + :param folder_rid: + :type folder_rid: FolderRid + :param display_name: + :type display_name: ResourceDisplayName + :param parent_folder_rid: The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, this value will be the root folder (`ri.compass.main.folder.0`). + :type parent_folder_rid: FolderRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[filesystem_models.Folder] + + :raises CircularDependency: The requested operation would result in a circular dependency in the folder hierarchy. For example, moving a folder into one of its descendants. + :raises FolderNotFound: The given Folder could not be found. + :raises GetRootFolderNotSupported: Getting the root folder as a resource is not supported. + :raises InvalidDisplayName: The display name of a Resource should not be exactly `.` or `..`, contain a forward slash `/` and must be less than or equal to 700 characters. + :raises InvalidFolder: The given Resource is not a Folder. + :raises InvalidParentFolder: The specified parent folder is not a valid destination for the resource. For example, a project cannot be moved under a regular folder, a folder cannot be moved to a Space, etc. + :raises MissingDisplayName: A Display Name must be provided. + :raises ReplaceFolderPermissionDenied: Could not replace the Folder. + :raises ResourceNameAlreadyExists: The provided resource name is already in use by another resource in the same folder. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="PUT", + resource_path="/v2/filesystem/folders/{folderRid}", + query_params={ + "preview": preview, + }, + path_params={ + "folderRid": folder_rid, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=filesystem_models.ReplaceFolderRequest( + parent_folder_rid=parent_folder_rid, + display_name=display_name, + ), + response_type=filesystem_models.Folder, + request_timeout=request_timeout, + throwable_errors={ + "CircularDependency": filesystem_errors.CircularDependency, + "FolderNotFound": filesystem_errors.FolderNotFound, + "GetRootFolderNotSupported": filesystem_errors.GetRootFolderNotSupported, + "InvalidDisplayName": filesystem_errors.InvalidDisplayName, + "InvalidFolder": filesystem_errors.InvalidFolder, + "InvalidParentFolder": filesystem_errors.InvalidParentFolder, + "MissingDisplayName": filesystem_errors.MissingDisplayName, + "ReplaceFolderPermissionDenied": filesystem_errors.ReplaceFolderPermissionDenied, + "ResourceNameAlreadyExists": filesystem_errors.ResourceNameAlreadyExists, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + class _AsyncFolderClientRaw: def __init__(self, client: AsyncFolderClient) -> None: @@ -578,11 +730,13 @@ def children(_: filesystem_models.ListChildrenOfFolderResponse): ... def create(_: filesystem_models.Folder): ... def get(_: filesystem_models.Folder): ... def get_batch(_: filesystem_models.GetFoldersBatchResponse): ... + def replace(_: filesystem_models.Folder): ... self.children = core.async_with_raw_response(children, client.children) self.create = core.async_with_raw_response(create, client.create) self.get = core.async_with_raw_response(get, client.get) self.get_batch = core.async_with_raw_response(get_batch, client.get_batch) + self.replace = core.async_with_raw_response(replace, client.replace) class _AsyncFolderClientStreaming: @@ -591,8 +745,10 @@ def children(_: filesystem_models.ListChildrenOfFolderResponse): ... def create(_: filesystem_models.Folder): ... def get(_: filesystem_models.Folder): ... def get_batch(_: filesystem_models.GetFoldersBatchResponse): ... + def replace(_: filesystem_models.Folder): ... self.children = core.async_with_streaming_response(children, client.children) self.create = core.async_with_streaming_response(create, client.create) self.get = core.async_with_streaming_response(get, client.get) self.get_batch = core.async_with_streaming_response(get_batch, client.get_batch) + self.replace = core.async_with_streaming_response(replace, client.replace) diff --git a/foundry_sdk/v2/filesystem/models.py b/foundry_sdk/v2/filesystem/models.py index 881589b68..b2588d55d 100644 --- a/foundry_sdk/v2/filesystem/models.py +++ b/foundry_sdk/v2/filesystem/models.py @@ -354,6 +354,18 @@ class RemoveResourceRolesRequest(core.ModelBase): roles: typing.List[ResourceRoleIdentifier] +class ReplaceFolderRequest(core.ModelBase): + """ReplaceFolderRequest""" + + parent_folder_rid: FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] + """ + The parent folder Resource Identifier (RID). For Projects, this will be the Space RID and for Spaces, + this value will be the root folder (`ri.compass.main.folder.0`). + """ + + display_name: ResourceDisplayName = pydantic.Field(alias=str("displayName")) # type: ignore[literal-required] + + class ReplaceProjectRequest(core.ModelBase): """ReplaceProjectRequest""" @@ -649,6 +661,7 @@ class Space(core.ModelBase): "RemoveMarkingsRequest", "RemoveOrganizationsRequest", "RemoveResourceRolesRequest", + "ReplaceFolderRequest", "ReplaceProjectRequest", "ReplaceSpaceRequest", "Resource", diff --git a/foundry_sdk/v2/media_sets/media_set.py b/foundry_sdk/v2/media_sets/media_set.py index ada5b4923..2774f09cc 100644 --- a/foundry_sdk/v2/media_sets/media_set.py +++ b/foundry_sdk/v2/media_sets/media_set.py @@ -147,6 +147,76 @@ def calculate( ), ) + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def clear( + self, + media_set_rid: core_models.MediaSetRid, + *, + media_item_path: core_models.MediaItemPath, + branch_name: typing.Optional[media_sets_models.BranchName] = None, + branch_rid: typing.Optional[media_sets_models.BranchRid] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + transaction_id: typing.Optional[media_sets_models.TransactionId] = None, + view_rid: typing.Optional[core_models.MediaSetViewRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> None: + """ + Clears (soft-deletes) the media item at the specified path within a media set, making it and all older + media items at that path un-retrievable. + + A branch name, branch RID, or view RID may optionally be specified. If none is specified, + the item will be cleared from the default branch. If more than one is specified, an error is thrown. + + For transactional media sets, a transaction ID must be provided. The deletion will not be + visible until the transaction is committed. + + :param media_set_rid: The RID of the media set. + :type media_set_rid: MediaSetRid + :param media_item_path: The path of the media item to clear. + :type media_item_path: MediaItemPath + :param branch_name: Specifies the specific branch by name from which this media item will be cleared. May not be provided if branch rid or view rid are provided. + :type branch_name: Optional[BranchName] + :param branch_rid: Specifies the specific branch by rid from which this media item will be cleared. May not be provided if branch name or view rid are provided. + :type branch_rid: Optional[BranchRid] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param transaction_id: The ID of the transaction associated with this request. Required if this is a transactional media set. + :type transaction_id: Optional[TransactionId] + :param view_rid: Specifies the specific view by rid from which this media item will be cleared. May not be provided if branch name or branch rid are provided. + :type view_rid: Optional[MediaSetViewRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: None + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/mediasets/{mediaSetRid}/items/clearAtPath", + query_params={ + "mediaItemPath": media_item_path, + "branchName": branch_name, + "branchRid": branch_rid, + "preview": preview, + "transactionId": transaction_id, + "viewRid": view_rid, + }, + path_params={ + "mediaSetRid": media_set_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + @core.maybe_ignore_preview @pydantic.validate_call @errors.handle_unexpected @@ -1054,6 +1124,7 @@ class _MediaSetClientRaw: def __init__(self, client: MediaSetClient) -> None: def abort(_: None): ... def calculate(_: media_sets_models.TrackedTransformationResponse): ... + def clear(_: None): ... def commit(_: None): ... def create(_: media_sets_models.TransactionId): ... def get(_: media_sets_models.GetMediaSetResponse): ... @@ -1073,6 +1144,7 @@ def upload_media(_: core_models.MediaReference): ... self.abort = core.with_raw_response(abort, client.abort) self.calculate = core.with_raw_response(calculate, client.calculate) + self.clear = core.with_raw_response(clear, client.clear) self.commit = core.with_raw_response(commit, client.commit) self.create = core.with_raw_response(create, client.create) self.get = core.with_raw_response(get, client.get) @@ -1251,6 +1323,76 @@ def calculate( ), ) + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def clear( + self, + media_set_rid: core_models.MediaSetRid, + *, + media_item_path: core_models.MediaItemPath, + branch_name: typing.Optional[media_sets_models.BranchName] = None, + branch_rid: typing.Optional[media_sets_models.BranchRid] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + transaction_id: typing.Optional[media_sets_models.TransactionId] = None, + view_rid: typing.Optional[core_models.MediaSetViewRid] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[None]: + """ + Clears (soft-deletes) the media item at the specified path within a media set, making it and all older + media items at that path un-retrievable. + + A branch name, branch RID, or view RID may optionally be specified. If none is specified, + the item will be cleared from the default branch. If more than one is specified, an error is thrown. + + For transactional media sets, a transaction ID must be provided. The deletion will not be + visible until the transaction is committed. + + :param media_set_rid: The RID of the media set. + :type media_set_rid: MediaSetRid + :param media_item_path: The path of the media item to clear. + :type media_item_path: MediaItemPath + :param branch_name: Specifies the specific branch by name from which this media item will be cleared. May not be provided if branch rid or view rid are provided. + :type branch_name: Optional[BranchName] + :param branch_rid: Specifies the specific branch by rid from which this media item will be cleared. May not be provided if branch name or view rid are provided. + :type branch_rid: Optional[BranchRid] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :type preview: Optional[PreviewMode] + :param transaction_id: The ID of the transaction associated with this request. Required if this is a transactional media set. + :type transaction_id: Optional[TransactionId] + :param view_rid: Specifies the specific view by rid from which this media item will be cleared. May not be provided if branch name or branch rid are provided. + :type view_rid: Optional[MediaSetViewRid] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[None] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="DELETE", + resource_path="/v2/mediasets/{mediaSetRid}/items/clearAtPath", + query_params={ + "mediaItemPath": media_item_path, + "branchName": branch_name, + "branchRid": branch_rid, + "preview": preview, + "transactionId": transaction_id, + "viewRid": view_rid, + }, + path_params={ + "mediaSetRid": media_set_rid, + }, + header_params={}, + body=None, + response_type=None, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + @core.maybe_ignore_preview @pydantic.validate_call @errors.handle_unexpected @@ -2158,6 +2300,7 @@ class _AsyncMediaSetClientRaw: def __init__(self, client: AsyncMediaSetClient) -> None: def abort(_: None): ... def calculate(_: media_sets_models.TrackedTransformationResponse): ... + def clear(_: None): ... def commit(_: None): ... def create(_: media_sets_models.TransactionId): ... def get(_: media_sets_models.GetMediaSetResponse): ... @@ -2177,6 +2320,7 @@ def upload_media(_: core_models.MediaReference): ... self.abort = core.async_with_raw_response(abort, client.abort) self.calculate = core.async_with_raw_response(calculate, client.calculate) + self.clear = core.async_with_raw_response(clear, client.clear) self.commit = core.async_with_raw_response(commit, client.commit) self.create = core.async_with_raw_response(create, client.create) self.get = core.async_with_raw_response(get, client.get) diff --git a/foundry_sdk/v2/media_sets/models.py b/foundry_sdk/v2/media_sets/models.py index f2413c78f..bd46a7909 100644 --- a/foundry_sdk/v2/media_sets/models.py +++ b/foundry_sdk/v2/media_sets/models.py @@ -492,7 +492,7 @@ class Dimensions(core.ModelBase): """The height of the image in pixels.""" -DocumentDecodeFormat = typing.Literal["PDF", "DOCX", "TXT", "PPTX"] +DocumentDecodeFormat = typing.Literal["PDF", "DOC", "DOCX", "TXT", "PPTX", "RTF"] """The format of a document media item.""" @@ -1207,6 +1207,7 @@ class MediaAttribution(core.ModelBase): "MODEL_3D", "MULTIMODAL", "SPREADSHEET", + "STREAMING_VIDEO", "VIDEO", "EMAIL", ] diff --git a/foundry_sdk/v2/models/errors.py b/foundry_sdk/v2/models/errors.py index 1bbb20243..44d8bd17b 100644 --- a/foundry_sdk/v2/models/errors.py +++ b/foundry_sdk/v2/models/errors.py @@ -517,6 +517,19 @@ class TransformJsonLiveDeploymentPermissionDenied(errors.PermissionDeniedError): error_instance_id: str +class UnsupportedModelSourceParameters(typing_extensions.TypedDict): + """The Model Version has a source type that is not supported by the API. This can occur when the model was created through a legacy or internal workflow that is not exposed through the public API.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + +@dataclass +class UnsupportedModelSource(errors.BadRequestError): + name: typing.Literal["UnsupportedModelSource"] + parameters: UnsupportedModelSourceParameters + error_instance_id: str + + __all__ = [ "CondaSolveFailureForProvidedPackages", "CreateConfigValidationError", @@ -549,4 +562,5 @@ class TransformJsonLiveDeploymentPermissionDenied(errors.PermissionDeniedError): "SearchExperimentsPermissionDenied", "TrainerNotFound", "TransformJsonLiveDeploymentPermissionDenied", + "UnsupportedModelSource", ] diff --git a/foundry_sdk/v2/models/model_version.py b/foundry_sdk/v2/models/model_version.py index 23a34bda7..815f86d0a 100644 --- a/foundry_sdk/v2/models/model_version.py +++ b/foundry_sdk/v2/models/model_version.py @@ -83,6 +83,7 @@ def create( :rtype: models_models.ModelVersion :raises CreateModelVersionPermissionDenied: Could not create the ModelVersion. + :raises UnsupportedModelSource: The Model Version has a source type that is not supported by the API. This can occur when the model was created through a legacy or internal workflow that is not exposed through the public API. """ return self._api_client.call_api( @@ -109,6 +110,7 @@ def create( request_timeout=request_timeout, throwable_errors={ "CreateModelVersionPermissionDenied": models_errors.CreateModelVersionPermissionDenied, + "UnsupportedModelSource": models_errors.UnsupportedModelSource, }, response_mode=_sdk_internal.get("response_mode"), ), @@ -140,6 +142,7 @@ def get( :rtype: models_models.ModelVersion :raises ModelVersionNotFound: The given ModelVersion could not be found. + :raises UnsupportedModelSource: The Model Version has a source type that is not supported by the API. This can occur when the model was created through a legacy or internal workflow that is not exposed through the public API. """ return self._api_client.call_api( @@ -161,6 +164,7 @@ def get( request_timeout=request_timeout, throwable_errors={ "ModelVersionNotFound": models_errors.ModelVersionNotFound, + "UnsupportedModelSource": models_errors.UnsupportedModelSource, }, response_mode=_sdk_internal.get("response_mode"), ), @@ -193,6 +197,8 @@ def list( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: core.ResourceIterator[models_models.ModelVersion] + + :raises UnsupportedModelSource: The Model Version has a source type that is not supported by the API. This can occur when the model was created through a legacy or internal workflow that is not exposed through the public API. """ return self._api_client.call_api( @@ -213,7 +219,9 @@ def list( body=None, response_type=models_models.ListModelVersionsResponse, request_timeout=request_timeout, - throwable_errors={}, + throwable_errors={ + "UnsupportedModelSource": models_errors.UnsupportedModelSource, + }, response_mode=_sdk_internal.get("response_mode", "ITERATOR"), ), ) @@ -299,6 +307,7 @@ def create( :rtype: typing.Awaitable[models_models.ModelVersion] :raises CreateModelVersionPermissionDenied: Could not create the ModelVersion. + :raises UnsupportedModelSource: The Model Version has a source type that is not supported by the API. This can occur when the model was created through a legacy or internal workflow that is not exposed through the public API. """ return self._api_client.call_api( @@ -325,6 +334,7 @@ def create( request_timeout=request_timeout, throwable_errors={ "CreateModelVersionPermissionDenied": models_errors.CreateModelVersionPermissionDenied, + "UnsupportedModelSource": models_errors.UnsupportedModelSource, }, response_mode=_sdk_internal.get("response_mode"), ), @@ -356,6 +366,7 @@ def get( :rtype: typing.Awaitable[models_models.ModelVersion] :raises ModelVersionNotFound: The given ModelVersion could not be found. + :raises UnsupportedModelSource: The Model Version has a source type that is not supported by the API. This can occur when the model was created through a legacy or internal workflow that is not exposed through the public API. """ return self._api_client.call_api( @@ -377,6 +388,7 @@ def get( request_timeout=request_timeout, throwable_errors={ "ModelVersionNotFound": models_errors.ModelVersionNotFound, + "UnsupportedModelSource": models_errors.UnsupportedModelSource, }, response_mode=_sdk_internal.get("response_mode"), ), @@ -409,6 +421,8 @@ def list( :type request_timeout: Optional[int] :return: Returns the result object. :rtype: core.AsyncResourceIterator[models_models.ModelVersion] + + :raises UnsupportedModelSource: The Model Version has a source type that is not supported by the API. This can occur when the model was created through a legacy or internal workflow that is not exposed through the public API. """ return self._api_client.call_api( @@ -429,7 +443,9 @@ def list( body=None, response_type=models_models.ListModelVersionsResponse, request_timeout=request_timeout, - throwable_errors={}, + throwable_errors={ + "UnsupportedModelSource": models_errors.UnsupportedModelSource, + }, response_mode=_sdk_internal.get("response_mode", "ITERATOR"), ), ) diff --git a/foundry_sdk/v2/models/models.py b/foundry_sdk/v2/models/models.py index dbbfe5e50..898383ca6 100644 --- a/foundry_sdk/v2/models/models.py +++ b/foundry_sdk/v2/models/models.py @@ -23,6 +23,7 @@ from foundry_sdk import _core as core from foundry_sdk.v2.core import models as core_models from foundry_sdk.v2.filesystem import models as filesystem_models +from foundry_sdk.v2.orchestration import models as orchestration_models class BooleanParameter(core.ModelBase): @@ -164,12 +165,6 @@ class Experiment(core.ModelBase): rid: ExperimentRid model_rid: ModelRid = pydantic.Field(alias=str("modelRid")) # type: ignore[literal-required] - name: typing.Optional[str] = None - """ - The display name of the experiment. Present in search results but not available when - retrieving a single experiment via the get endpoint. - """ - created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] created_by: core_models.CreatedBy = pydantic.Field(alias=str("createdBy")) # type: ignore[literal-required] source: ExperimentSource @@ -244,6 +239,10 @@ class ExperimentSdkSource(core.ModelBase): """A tag associated with an experiment.""" +GpuType = typing.Literal["V100", "T4", "A10G", "A100", "H100", "H200", "L4", "A16", "L40S"] +"""The specific type of GPU to use.""" + + class InconsistentArrayDimensionsError(core.ModelBase): """Array elements have inconsistent dimensions.""" @@ -540,6 +539,9 @@ class ModelStudioRun(core.ModelBase): started_time: core_models.CreatedTime = pydantic.Field(alias=str("startedTime")) # type: ignore[literal-required] """When this run was started.""" + build_status: typing.Optional[orchestration_models.BuildStatus] = pydantic.Field(alias=str("buildStatus"), default=None) # type: ignore[literal-required] + """Status of the build.""" + resolved_outputs: typing.Dict[OutputAlias, ModelStudioRunOutput] = pydantic.Field(alias=str("resolvedOutputs")) # type: ignore[literal-required] """Map of alias to resolved output details (e.g., for models, contains the version RID and experiment).""" @@ -620,12 +622,80 @@ class ModelVersion(core.ModelBase): model_api: ModelApi = pydantic.Field(alias=str("modelApi")) # type: ignore[literal-required] conda_requirements: typing.List[str] = pydantic.Field(alias=str("condaRequirements")) # type: ignore[literal-required] backing_repositories: typing.List[core.RID] = pydantic.Field(alias=str("backingRepositories")) # type: ignore[literal-required] + created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] + source: typing.Optional[ModelVersionSource] = None + linked_experiment: typing.Optional[ExperimentRid] = pydantic.Field(alias=str("linkedExperiment"), default=None) # type: ignore[literal-required] + """The Experiment linked to this Model Version, if one exists.""" + + +class ModelVersionCodeRepositorySource(core.ModelBase): + """Model version created from a code repository.""" + + repository_rid: core.RID = pydantic.Field(alias=str("repositoryRid")) # type: ignore[literal-required] + branch: str + type: typing.Literal["codeRepository"] = "codeRepository" + + +class ModelVersionCodeWorkspaceSource(core.ModelBase): + """Model version created from a code workspace.""" + + code_workspace_rid: core.RID = pydantic.Field(alias=str("codeWorkspaceRid")) # type: ignore[literal-required] + branch: str + type: typing.Literal["codeWorkspace"] = "codeWorkspace" + + +class ModelVersionContainerizedSource(core.ModelBase): + """Model version imported from a containerized model.""" + + type: typing.Literal["importedContainerizedModel"] = "importedContainerizedModel" + + +class ModelVersionExternalSource(core.ModelBase): + """Model version backed by an external model.""" + + type: typing.Literal["external"] = "external" + + +class ModelVersionModelStudioSource(core.ModelBase): + """Model version created from Model Studio.""" + + model_studio_rid: core.RID = pydantic.Field(alias=str("modelStudioRid")) # type: ignore[literal-required] + type: typing.Literal["modelStudio"] = "modelStudio" + + +class ModelVersionPromotedSource(core.ModelBase): + """Model version promoted from another model version.""" + + previous_model_rid: ModelRid = pydantic.Field(alias=str("previousModelRid")) # type: ignore[literal-required] + previous_model_version_rid: ModelVersionRid = pydantic.Field(alias=str("previousModelVersionRid")) # type: ignore[literal-required] + type: typing.Literal["promoted"] = "promoted" ModelVersionRid = core.RID """The Resource Identifier (RID) of a Model Version.""" +class ModelVersionSdkSource(core.ModelBase): + """Model version created via the SDK.""" + + type: typing.Literal["sdk"] = "sdk" + + +ModelVersionSource = typing_extensions.Annotated[ + typing.Union[ + "ModelVersionContainerizedSource", + "ModelVersionExternalSource", + "ModelVersionCodeWorkspaceSource", + "ModelVersionModelStudioSource", + "ModelVersionCodeRepositorySource", + "ModelVersionSdkSource", + "ModelVersionPromotedSource", + ], + pydantic.Field(discriminator="type"), +] +"""The source from which this model version was created.""" + + OutputAlias = str """A string alias used to identify outputs in a Model Studio configuration.""" @@ -670,11 +740,14 @@ class ResourceConfiguration(core.ModelBase): """Compute resource configuration for training runs.""" memory: str - """Memory allocation (e.g., "4Gi").""" + """Memory allocation (e.g., "4G").""" cpu: str """CPU allocation (e.g., "2").""" + gpu: typing.Optional[GpuType] = None + """GPU allocation (must be available in the project's resource queue).""" + RunId = str """A unique identifier for a Model Studio run, derived from the studio, config, and build.""" @@ -1062,6 +1135,7 @@ class UnsupportedTypeError(core.ModelBase): core.resolve_forward_references(ModelApiDataType, globalns=globals(), localns=locals()) core.resolve_forward_references(ModelApiInput, globalns=globals(), localns=locals()) core.resolve_forward_references(ModelApiOutput, globalns=globals(), localns=locals()) +core.resolve_forward_references(ModelVersionSource, globalns=globals(), localns=locals()) core.resolve_forward_references(ParameterValue, globalns=globals(), localns=locals()) core.resolve_forward_references(SearchExperimentsFilter, globalns=globals(), localns=locals()) @@ -1092,6 +1166,7 @@ class UnsupportedTypeError(core.ModelBase): "ExperimentSource", "ExperimentStatus", "ExperimentTagText", + "GpuType", "InconsistentArrayDimensionsError", "InferenceInputErrorType", "InputAlias", @@ -1136,7 +1211,15 @@ class UnsupportedTypeError(core.ModelBase): "ModelStudioTrainerExperimental", "ModelStudioWorkerConfig", "ModelVersion", + "ModelVersionCodeRepositorySource", + "ModelVersionCodeWorkspaceSource", + "ModelVersionContainerizedSource", + "ModelVersionExternalSource", + "ModelVersionModelStudioSource", + "ModelVersionPromotedSource", "ModelVersionRid", + "ModelVersionSdkSource", + "ModelVersionSource", "OutputAlias", "Parameter", "ParameterName", diff --git a/foundry_sdk/v2/ontologies/models.py b/foundry_sdk/v2/ontologies/models.py index 8b2dcb351..fdd8380f0 100644 --- a/foundry_sdk/v2/ontologies/models.py +++ b/foundry_sdk/v2/ontologies/models.py @@ -274,18 +274,24 @@ class AggregationDurationGroupingV2(core.ModelBase): """ Divides objects into groups according to an interval. Note that this grouping applies only on date and timestamp types. When grouping by `YEARS`, `QUARTERS`, `MONTHS`, or `WEEKS`, the `value` must be set to `1`. + Either `field` or `propertyIdentifier` must be supplied, but not both. """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] value: int unit: TimeUnit type: typing.Literal["duration"] = "duration" class AggregationExactGroupingV2(core.ModelBase): - """Divides objects into groups according to an exact value.""" + """ + Divides objects into groups according to an exact value. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] max_group_count: typing.Optional[int] = pydantic.Field(alias=str("maxGroupCount"), default=None) # type: ignore[literal-required] """ The maximum number of groups to return. If omitted, defaults to 10,000. @@ -317,9 +323,13 @@ class AggregationExactGroupingV2(core.ModelBase): class AggregationFixedWidthGroupingV2(core.ModelBase): - """Divides objects into groups with the specified width.""" + """ + Divides objects into groups with the specified width. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] fixed_width: int = pydantic.Field(alias=str("fixedWidth")) # type: ignore[literal-required] type: typing.Literal["fixedWidth"] = "fixedWidth" @@ -370,9 +380,13 @@ class AggregationRangeV2(core.ModelBase): class AggregationRangesGroupingV2(core.ModelBase): - """Divides objects into groups according to specified ranges.""" + """ + Divides objects into groups according to specified ranges. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] ranges: typing.List[AggregationRangeV2] type: typing.Literal["ranges"] = "ranges" @@ -465,18 +479,26 @@ class ApplyReducersLoadLevel(core.ModelBase): class ApproximateDistinctAggregationV2(core.ModelBase): - """Computes an approximate number of distinct values for the provided field.""" + """ + Computes an approximate number of distinct values for the provided field. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] name: typing.Optional[AggregationMetricName] = None direction: typing.Optional[OrderByDirection] = None type: typing.Literal["approximateDistinct"] = "approximateDistinct" class ApproximatePercentileAggregationV2(core.ModelBase): - """Computes the approximate percentile value for the provided field. Requires Object Storage V2.""" + """ + Computes the approximate percentile value for the provided field. Requires Object Storage V2. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] name: typing.Optional[AggregationMetricName] = None approximate_percentile: float = pydantic.Field(alias=str("approximatePercentile")) # type: ignore[literal-required] direction: typing.Optional[OrderByDirection] = None @@ -550,9 +572,13 @@ class AttachmentV2(core.ModelBase): class AvgAggregationV2(core.ModelBase): - """Computes the average value for the provided field.""" + """ + Computes the average value for the provided field. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] name: typing.Optional[AggregationMetricName] = None direction: typing.Optional[OrderByDirection] = None type: typing.Literal["avg"] = "avg" @@ -1280,9 +1306,14 @@ class ErrorComputingSecurity(core.ModelBase): class ExactDistinctAggregationV2(core.ModelBase): - """Computes an exact number of distinct values for the provided field. May be slower than an approximate distinct aggregation. Requires Object Storage V2.""" + """ + Computes an exact number of distinct values for the provided field. May be slower than an approximate + distinct aggregation. Requires Object Storage V2. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] name: typing.Optional[AggregationMetricName] = None direction: typing.Optional[OrderByDirection] = None type: typing.Literal["exactDistinct"] = "exactDistinct" @@ -1458,6 +1489,27 @@ class GetActionTypeByRidBatchResponse(core.ModelBase): data: typing.List[ActionTypeV2] +class GetObjectTypeByRidBatchRequest(core.ModelBase): + """GetObjectTypeByRidBatchRequest""" + + requests: typing_extensions.Annotated[ + typing.List[GetObjectTypeByRidBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ] + + +class GetObjectTypeByRidBatchRequestElement(core.ModelBase): + """GetObjectTypeByRidBatchRequestElement""" + + object_type_rid: ObjectTypeRid = pydantic.Field(alias=str("objectTypeRid")) # type: ignore[literal-required] + + +class GetObjectTypeByRidBatchResponse(core.ModelBase): + """GetObjectTypeByRidBatchResponse""" + + data: typing.List[ObjectTypeV2] + + class GetSelectedPropertyOperation(core.ModelBase): """ Gets a single value of a property. Throws if the target object set is on the MANY side of the link and could @@ -2333,9 +2385,13 @@ class MatchRule(core.ModelBase): class MaxAggregationV2(core.ModelBase): - """Computes the maximum value for the provided field.""" + """ + Computes the maximum value for the provided field. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] name: typing.Optional[AggregationMetricName] = None direction: typing.Optional[OrderByDirection] = None type: typing.Literal["max"] = "max" @@ -2350,9 +2406,13 @@ class MediaMetadata(core.ModelBase): class MinAggregationV2(core.ModelBase): - """Computes the minimum value for the provided field.""" + """ + Computes the minimum value for the provided field. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] name: typing.Optional[AggregationMetricName] = None direction: typing.Optional[OrderByDirection] = None type: typing.Literal["min"] = "min" @@ -4786,9 +4846,13 @@ class SubtractPropertyExpression(core.ModelBase): class SumAggregationV2(core.ModelBase): - """Computes the sum of values for the provided field.""" + """ + Computes the sum of values for the provided field. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] name: typing.Optional[AggregationMetricName] = None direction: typing.Optional[OrderByDirection] = None type: typing.Literal["sum"] = "sum" @@ -5533,6 +5597,9 @@ class WithinPolygonQuery(core.ModelBase): "GetActionTypeByRidBatchRequest", "GetActionTypeByRidBatchRequestElement", "GetActionTypeByRidBatchResponse", + "GetObjectTypeByRidBatchRequest", + "GetObjectTypeByRidBatchRequestElement", + "GetObjectTypeByRidBatchResponse", "GetSelectedPropertyOperation", "GreatestPropertyExpression", "GroupMemberConstraint", diff --git a/foundry_sdk/v2/ontologies/object_type.py b/foundry_sdk/v2/ontologies/object_type.py index 72124890e..5b4e6c09e 100644 --- a/foundry_sdk/v2/ontologies/object_type.py +++ b/foundry_sdk/v2/ontologies/object_type.py @@ -15,6 +15,7 @@ import typing +import annotated_types import pydantic import typing_extensions @@ -96,6 +97,65 @@ def get( ), ) + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_by_rid_batch( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + requests: typing_extensions.Annotated[ + typing.List[ontologies_models.GetObjectTypeByRidBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ], + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.GetObjectTypeByRidBatchResponse: + """ + Gets a list of object types by RID in bulk. + + Object types are filtered from the response if they don't exist or the requesting token lacks the required + permissions. + + The maximum batch size for this endpoint is 100. + + :param ontology: + :type ontology: OntologyIdentifier + :param requests: + :type requests: List[GetObjectTypeByRidBatchRequestElement] + :param branch: The Foundry branch to load the object type definitions from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: ontologies_models.GetObjectTypeByRidBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectTypes/getByRidBatch", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.GetObjectTypeByRidBatchRequest( + requests=requests, + ), + response_type=ontologies_models.GetObjectTypeByRidBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + @core.maybe_ignore_preview @pydantic.validate_call @errors.handle_unexpected @@ -409,6 +469,7 @@ def list_outgoing_link_types( class _ObjectTypeClientRaw: def __init__(self, client: ObjectTypeClient) -> None: def get(_: ontologies_models.ObjectTypeV2): ... + def get_by_rid_batch(_: ontologies_models.GetObjectTypeByRidBatchResponse): ... def get_edits_history(_: ontologies_models.ObjectTypeEditsHistoryResponse): ... def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... @@ -416,6 +477,7 @@ def list(_: ontologies_models.ListObjectTypesV2Response): ... def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV2): ... self.get = core.with_raw_response(get, client.get) + self.get_by_rid_batch = core.with_raw_response(get_by_rid_batch, client.get_by_rid_batch) self.get_edits_history = core.with_raw_response(get_edits_history, client.get_edits_history) self.get_full_metadata = core.with_raw_response(get_full_metadata, client.get_full_metadata) self.get_outgoing_link_type = core.with_raw_response( @@ -430,6 +492,7 @@ def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV class _ObjectTypeClientStreaming: def __init__(self, client: ObjectTypeClient) -> None: def get(_: ontologies_models.ObjectTypeV2): ... + def get_by_rid_batch(_: ontologies_models.GetObjectTypeByRidBatchResponse): ... def get_edits_history(_: ontologies_models.ObjectTypeEditsHistoryResponse): ... def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... @@ -437,6 +500,9 @@ def list(_: ontologies_models.ListObjectTypesV2Response): ... def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV2): ... self.get = core.with_streaming_response(get, client.get) + self.get_by_rid_batch = core.with_streaming_response( + get_by_rid_batch, client.get_by_rid_batch + ) self.get_edits_history = core.with_streaming_response( get_edits_history, client.get_edits_history ) @@ -524,6 +590,65 @@ def get( ), ) + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_by_rid_batch( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + requests: typing_extensions.Annotated[ + typing.List[ontologies_models.GetObjectTypeByRidBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ], + branch: typing.Optional[core_models.FoundryBranch] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.GetObjectTypeByRidBatchResponse]: + """ + Gets a list of object types by RID in bulk. + + Object types are filtered from the response if they don't exist or the requesting token lacks the required + permissions. + + The maximum batch size for this endpoint is 100. + + :param ontology: + :type ontology: OntologyIdentifier + :param requests: + :type requests: List[GetObjectTypeByRidBatchRequestElement] + :param branch: The Foundry branch to load the object type definitions from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[ontologies_models.GetObjectTypeByRidBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectTypes/getByRidBatch", + query_params={ + "branch": branch, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.GetObjectTypeByRidBatchRequest( + requests=requests, + ), + response_type=ontologies_models.GetObjectTypeByRidBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + @core.maybe_ignore_preview @pydantic.validate_call @errors.handle_unexpected @@ -837,6 +962,7 @@ def list_outgoing_link_types( class _AsyncObjectTypeClientRaw: def __init__(self, client: AsyncObjectTypeClient) -> None: def get(_: ontologies_models.ObjectTypeV2): ... + def get_by_rid_batch(_: ontologies_models.GetObjectTypeByRidBatchResponse): ... def get_edits_history(_: ontologies_models.ObjectTypeEditsHistoryResponse): ... def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... @@ -844,6 +970,9 @@ def list(_: ontologies_models.ListObjectTypesV2Response): ... def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV2): ... self.get = core.async_with_raw_response(get, client.get) + self.get_by_rid_batch = core.async_with_raw_response( + get_by_rid_batch, client.get_by_rid_batch + ) self.get_edits_history = core.async_with_raw_response( get_edits_history, client.get_edits_history ) @@ -862,6 +991,7 @@ def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV class _AsyncObjectTypeClientStreaming: def __init__(self, client: AsyncObjectTypeClient) -> None: def get(_: ontologies_models.ObjectTypeV2): ... + def get_by_rid_batch(_: ontologies_models.GetObjectTypeByRidBatchResponse): ... def get_edits_history(_: ontologies_models.ObjectTypeEditsHistoryResponse): ... def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... @@ -869,6 +999,9 @@ def list(_: ontologies_models.ListObjectTypesV2Response): ... def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV2): ... self.get = core.async_with_streaming_response(get, client.get) + self.get_by_rid_batch = core.async_with_streaming_response( + get_by_rid_batch, client.get_by_rid_batch + ) self.get_edits_history = core.async_with_streaming_response( get_edits_history, client.get_edits_history ) diff --git a/foundry_sdk/v2/orchestration/build.py b/foundry_sdk/v2/orchestration/build.py index 4c7bba5fd..64494b94f 100644 --- a/foundry_sdk/v2/orchestration/build.py +++ b/foundry_sdk/v2/orchestration/build.py @@ -175,6 +175,9 @@ def get( ) -> orchestration_models.Build: """ Get the Build with the specified rid. + + Users are allowed to make a maximum of **4 requests per second** and **25 concurrent requests**. + :param build_rid: The RID of a Build. :type build_rid: BuildRid :param request_timeout: timeout setting for this request in seconds. @@ -222,6 +225,9 @@ def get_batch( """ Execute multiple get requests on Build. + Users are allowed to make a maximum of **4 requests per second** and **25 concurrent requests**. + + The maximum batch size for this endpoint is 100. :param body: Body of the request :type body: List[GetBuildsBatchRequestElement] @@ -540,6 +546,9 @@ def get( ) -> typing.Awaitable[orchestration_models.Build]: """ Get the Build with the specified rid. + + Users are allowed to make a maximum of **4 requests per second** and **25 concurrent requests**. + :param build_rid: The RID of a Build. :type build_rid: BuildRid :param request_timeout: timeout setting for this request in seconds. @@ -587,6 +596,9 @@ def get_batch( """ Execute multiple get requests on Build. + Users are allowed to make a maximum of **4 requests per second** and **25 concurrent requests**. + + The maximum batch size for this endpoint is 100. :param body: Body of the request :type body: List[GetBuildsBatchRequestElement] diff --git a/foundry_sdk/v2/orchestration/job.py b/foundry_sdk/v2/orchestration/job.py index 609fb2820..4bebd3b24 100644 --- a/foundry_sdk/v2/orchestration/job.py +++ b/foundry_sdk/v2/orchestration/job.py @@ -62,6 +62,9 @@ def get( ) -> orchestration_models.Job: """ Get the Job with the specified rid. + + Users are allowed to make a maximum of **4 requests per second** and **25 concurrent requests**. + :param job_rid: The RID of a Job. :type job_rid: JobRid :param preview: Enables the use of preview functionality. @@ -114,6 +117,9 @@ def get_batch( """ Execute multiple get requests on Job. + Users are allowed to make a maximum of **4 requests per second** and **25 concurrent requests**. + + The maximum batch size for this endpoint is 500. :param body: Body of the request :type body: List[GetJobsBatchRequestElement] @@ -200,6 +206,9 @@ def get( ) -> typing.Awaitable[orchestration_models.Job]: """ Get the Job with the specified rid. + + Users are allowed to make a maximum of **4 requests per second** and **25 concurrent requests**. + :param job_rid: The RID of a Job. :type job_rid: JobRid :param preview: Enables the use of preview functionality. @@ -252,6 +261,9 @@ def get_batch( """ Execute multiple get requests on Job. + Users are allowed to make a maximum of **4 requests per second** and **25 concurrent requests**. + + The maximum batch size for this endpoint is 500. :param body: Body of the request :type body: List[GetJobsBatchRequestElement] diff --git a/tests/test_resource_import.py b/tests/test_resource_import.py index 46d57f10f..378faa780 100644 --- a/tests/test_resource_import.py +++ b/tests/test_resource_import.py @@ -91,6 +91,18 @@ def test_admin_v2_authentication_provider_import(): assert AuthenticationProviderClient is not None +def test_admin_v2_cbac_banner_import(): + from foundry_sdk.v2.admin.cbac_banner import CbacBannerClient + + assert CbacBannerClient is not None + + +def test_admin_v2_cbac_marking_restrictions_import(): + from foundry_sdk.v2.admin.cbac_marking_restrictions import CbacMarkingRestrictionsClient # NOQA + + assert CbacMarkingRestrictionsClient is not None + + def test_admin_v2_enrollment_import(): from foundry_sdk.v2.admin.enrollment import EnrollmentClient @@ -181,6 +193,12 @@ def test_admin_v2_organization_import(): assert OrganizationClient is not None +def test_admin_v2_organization_guest_member_import(): + from foundry_sdk.v2.admin.organization_guest_member import OrganizationGuestMemberClient # NOQA + + assert OrganizationGuestMemberClient is not None + + def test_admin_v2_organization_role_assignment_import(): from foundry_sdk.v2.admin.organization_role_assignment import ( OrganizationRoleAssignmentClient,