diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 1d586f4..e591a81 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -15,12 +15,30 @@ docs/AddGroupResourceRequest.md docs/AddGroupUserRequest.md docs/AddResourceNhiRequest.md docs/AddResourceUserRequest.md +docs/AddRoleAssignmentInput.md +docs/AddRoleAssignmentsEntry.md +docs/AddRoleAssignmentsRequest.md +docs/AddRoleAssignmentsResponse.md +docs/AgentActivityApi.md +docs/AgentActivityClientSetting.md +docs/AgentActivityClientSettings.md +docs/AgentActivityContentReport.md +docs/AgentActivityEvent.md +docs/AgentActivityImages.md +docs/AgentActivityIngestRequest.md +docs/AgentActivityIngestResult.md +docs/AgentActivityMcpServer.md +docs/AgentActivityOpalMcpServer.md +docs/AgentActivityOpalReported.md +docs/AgentKillSwitch.md +docs/AnthropicInferenceHookVerdict.md docs/ApiAccessLevelEnum.md docs/App.md docs/AppTypeEnum.md docs/AppValidation.md docs/AppValidationSeverityEnum.md docs/AppValidationStatusEnum.md +docs/AppVisibilityInfo.md docs/ApproveRequest200Response.md docs/ApproveRequestRequest.md docs/AppsApi.md @@ -31,11 +49,33 @@ docs/Bundle.md docs/BundleGroup.md docs/BundleResource.md docs/BundlesApi.md +docs/Campaign.md +docs/CampaignConfiguration.md +docs/CampaignGroupAssetVisibilityPolicyEnum.md +docs/CampaignItem.md +docs/CampaignItemAdminOverride.md +docs/CampaignItemReview.md +docs/CampaignItemReviewDecisionEnum.md +docs/CampaignItemReviewResult.md +docs/CampaignItemReviewerAssignment.md +docs/CampaignItemReviewerAssignmentSourceEnum.md +docs/CampaignItemReviewerSourceRemoval.md +docs/CampaignItemStatusEnum.md +docs/CampaignItemTargetTypeEnum.md +docs/CampaignItemUnassignedPresetMessage.md +docs/CampaignRevokeOnEnum.md +docs/CampaignStatusEnum.md +docs/CampaignsApi.md +docs/CancelRequestRequest.md docs/Condition.md docs/ConfigurationTemplate.md docs/ConfigurationTemplatesApi.md +docs/CreateAppInfo.md docs/CreateBundleInfo.md +docs/CreateCampaignConfigurationInfo.md +docs/CreateCampaignInfo.md docs/CreateConfigurationTemplateInfo.md +docs/CreateCustomConnectorInfo.md docs/CreateDelegationRequest.md docs/CreateEventStreamInfo.md docs/CreateGroupBindingInfo.md @@ -44,7 +84,10 @@ docs/CreateGroupInfo.md docs/CreateIdpGroupMappingRequest.md docs/CreateMessageChannelInfo.md docs/CreateOnCallScheduleInfo.md +docs/CreateOpalScriptInfo.md docs/CreateOwnerInfo.md +docs/CreatePaladinContextSourceInfo.md +docs/CreatePaladinInfo.md docs/CreateRequest200Response.md docs/CreateRequestCommentRequest.md docs/CreateRequestConfigurationInfoList.md @@ -53,16 +96,27 @@ docs/CreateRequestInfoCustomMetadataInner.md docs/CreateRequestInfoGroupsInner.md docs/CreateRequestInfoResourcesInner.md docs/CreateRequestInfoSupportTicket.md +docs/CreateRequestTemplateInfo.md +docs/CreateResourceCustomAccessLevelInfo.md docs/CreateResourceInfo.md +docs/CreateServiceUserRequest.md docs/CreateTagInfo.md +docs/CreateTokenInfo.md +docs/CreateTokenResponse.md docs/CreateUARInfo.md +docs/CustomConnectorAppConfig.md +docs/CustomConnectorIdpProtocolEnum.md docs/Delegation.md docs/DelegationsApi.md docs/DenyRequestRequest.md +docs/EntityAdminFilter.md +docs/EntityDescriptionFilter.md docs/EntityItemTypeEnum.md docs/EntityNameFilter.md docs/EntityTagFilter.md +docs/EntityTagKeyFilter.md docs/EntityTypeEnum.md +docs/EscalateRequest200Response.md docs/Event.md docs/EventStream.md docs/EventStreamConnection.md @@ -73,20 +127,36 @@ docs/EventsApi.md docs/GetResourceUser200Response.md docs/Group.md docs/GroupAccessLevel.md +docs/GroupAccessLevelList.md docs/GroupBinding.md docs/GroupBindingGroup.md docs/GroupBindingsApi.md +docs/GroupConfigurationTemplate.md docs/GroupContainingGroup.md docs/GroupContainingGroupList.md +docs/GroupMemberGroup.md +docs/GroupMemberGroupList.md docs/GroupRemoteInfo.md docs/GroupRemoteInfoActiveDirectoryGroup.md +docs/GroupRemoteInfoActivecampaignGroup.md +docs/GroupRemoteInfoAhaTeam.md +docs/GroupRemoteInfoAsanaTeam.md docs/GroupRemoteInfoAwsSsoGroup.md +docs/GroupRemoteInfoAxiomGroup.md docs/GroupRemoteInfoAzureAdMicrosoft365Group.md docs/GroupRemoteInfoAzureAdSecurityGroup.md +docs/GroupRemoteInfoBitwardenGroup.md +docs/GroupRemoteInfoBoxGroup.md +docs/GroupRemoteInfoCalendlyGroup.md docs/GroupRemoteInfoClickhouseRole.md +docs/GroupRemoteInfoConfluenceGroup.md docs/GroupRemoteInfoConnectorGroup.md +docs/GroupRemoteInfoCursorGroup.md docs/GroupRemoteInfoDatabricksAccountGroup.md +docs/GroupRemoteInfoDatadogOnCallSchedule.md docs/GroupRemoteInfoDevinGroup.md +docs/GroupRemoteInfoDocusignGroup.md +docs/GroupRemoteInfoDocusignSigningGroup.md docs/GroupRemoteInfoDuoGroup.md docs/GroupRemoteInfoGithubEnterpriseTeam.md docs/GroupRemoteInfoGithubTeam.md @@ -95,19 +165,32 @@ docs/GroupRemoteInfoGoogleGroup.md docs/GroupRemoteInfoGrafanaTeam.md docs/GroupRemoteInfoHubspotTeam.md docs/GroupRemoteInfoIncidentioOnCallSchedule.md +docs/GroupRemoteInfoJiraGroup.md docs/GroupRemoteInfoLdapGroup.md +docs/GroupRemoteInfoLinearTeam.md docs/GroupRemoteInfoOktaGroup.md docs/GroupRemoteInfoOktaGroupRule.md +docs/GroupRemoteInfoOneloginGroup.md +docs/GroupRemoteInfoOneloginRole.md docs/GroupRemoteInfoPagerdutyOnCallSchedule.md +docs/GroupRemoteInfoRampDepartment.md +docs/GroupRemoteInfoRampLocation.md +docs/GroupRemoteInfoRipplingSupergroup.md +docs/GroupRemoteInfoRipplingTeam.md docs/GroupRemoteInfoRootlyOnCallSchedule.md docs/GroupRemoteInfoSlackUserGroup.md docs/GroupRemoteInfoSnowflakeRole.md +docs/GroupRemoteInfoSquareJob.md +docs/GroupRemoteInfoSquareLocation.md +docs/GroupRemoteInfoTableauGroup.md docs/GroupRemoteInfoTailscaleGroup.md docs/GroupRemoteInfoTwingateGroup.md docs/GroupRemoteInfoTwingateGroupSynced.md docs/GroupRemoteInfoWorkdayUserSecurityGroup.md +docs/GroupRemoteInfoWrikeGroup.md docs/GroupRemoteInfoZendeskGroup.md docs/GroupRemoteInfoZendeskOrganization.md +docs/GroupRemoteInfoZoomGroup.md docs/GroupResource.md docs/GroupResourceList.md docs/GroupTypeEnum.md @@ -118,23 +201,46 @@ docs/GroupsApi.md docs/IdpGroupMapping.md docs/IdpGroupMappingList.md docs/IdpGroupMappingsApi.md +docs/IdpStatusFilter.md +docs/InviteUserInfo.md +docs/McpConfigPermission.md +docs/McpConfigPlugin.md +docs/McpConfigReport.md +docs/McpConfigReportResult.md +docs/McpConfigReporter.md +docs/McpConfigServer.md +docs/McpConfigSkill.md +docs/McpConfigSubagent.md docs/MessageChannel.md docs/MessageChannelIDList.md docs/MessageChannelList.md docs/MessageChannelProviderEnum.md docs/MessageChannelsApi.md +docs/NameMatchType.md docs/NonHumanIdentitiesApi.md docs/OnCallSchedule.md docs/OnCallScheduleIDList.md docs/OnCallScheduleList.md docs/OnCallScheduleProviderEnum.md docs/OnCallSchedulesApi.md +docs/OpalAccessPathDetail.md +docs/OpalAccessPathEdgeFilter.md +docs/OpalAccessPathQueryBody.md +docs/OpalAccessQuery.md +docs/OpalAccessQueryResults.md +docs/OpalAccessResultEdge.md +docs/OpalAccessResultNode.md docs/OpalNodeQuery.md docs/OpalNodeQueryBody.md docs/OpalNodeQueryResults.md docs/OpalQueriesApi.md docs/OpalQueryResultEdge.md docs/OpalQueryResultNode.md +docs/OpalQueryResults.md +docs/OpalScript.md +docs/OpalScriptList.md +docs/OpalScriptTypeEnum.md +docs/OpalScriptsApi.md docs/Owner.md docs/OwnersApi.md docs/PageInfo.md @@ -143,6 +249,8 @@ docs/PaginatedAssignedRequestList.md docs/PaginatedBundleGroupList.md docs/PaginatedBundleList.md docs/PaginatedBundleResourceList.md +docs/PaginatedCampaignItemsList.md +docs/PaginatedCampaignsList.md docs/PaginatedConfigurationTemplateList.md docs/PaginatedDelegationsList.md docs/PaginatedEventList.md @@ -150,15 +258,30 @@ docs/PaginatedGroupBindingsList.md docs/PaginatedGroupsList.md docs/PaginatedOwnersList.md docs/PaginatedRemoteUsersList.md +docs/PaginatedRequestTemplateList.md docs/PaginatedResourcesList.md +docs/PaginatedRoleAssignmentsList.md docs/PaginatedTagsList.md docs/PaginatedTokensList.md docs/PaginatedUARsList.md docs/PaginatedUsersList.md +docs/PaginatedViewerCampaignItemsList.md +docs/Paladin.md +docs/PaladinApi.md +docs/PaladinConnector.md +docs/PaladinContextSource.md +docs/PaladinContextSourceKind.md +docs/PaladinContextSourceList.md +docs/PaladinContextSourceProvider.md +docs/PaladinList.md docs/PropagationStatus.md docs/PropagationStatusEnum.md docs/RDSEngineEnum.md docs/RemoteUser.md +docs/RemoveRoleAssignmentInput.md +docs/RemoveRoleAssignmentsEntry.md +docs/RemoveRoleAssignmentsRequest.md +docs/RemoveRoleAssignmentsResponse.md docs/Request.md docs/RequestApprovalEnum.md docs/RequestComment.md @@ -174,16 +297,30 @@ docs/RequestReviewer.md docs/RequestReviewerStages.md docs/RequestStage.md docs/RequestStatusEnum.md +docs/RequestTemplate.md +docs/RequestTemplateCustomField.md +docs/RequestTemplateCustomFieldCalloutMetadata.md +docs/RequestTemplateCustomFieldInput.md +docs/RequestTemplateCustomFieldMetadata.md +docs/RequestTemplateCustomFieldMultiChoiceMetadata.md docs/RequestTemplateCustomFieldTypeEnum.md +docs/RequestTemplatesApi.md docs/RequestedItem.md docs/RequestsApi.md docs/Resource.md docs/ResourceAccessLevel.md +docs/ResourceAccessLevelList.md docs/ResourceAccessUser.md docs/ResourceAccessUserList.md +docs/ResourceConfigurationTemplate.md +docs/ResourceCustomAccessLevelList.md +docs/ResourceCustomAccessLevelResponse.md docs/ResourceNHI.md docs/ResourceRemoteInfo.md +docs/ResourceRemoteInfoAlicloudEcsInstance.md +docs/ResourceRemoteInfoAlicloudRamRole.md docs/ResourceRemoteInfoAnthropicWorkspace.md +docs/ResourceRemoteInfoAsanaWorkspace.md docs/ResourceRemoteInfoAwsAccount.md docs/ResourceRemoteInfoAwsEc2Instance.md docs/ResourceRemoteInfoAwsEksCluster.md @@ -192,6 +329,8 @@ docs/ResourceRemoteInfoAwsOrganizationalUnit.md docs/ResourceRemoteInfoAwsPermissionSet.md docs/ResourceRemoteInfoAwsRdsCluster.md docs/ResourceRemoteInfoAwsRdsInstance.md +docs/ResourceRemoteInfoAxiomCustomRole.md +docs/ResourceRemoteInfoAxiomRole.md docs/ResourceRemoteInfoAzureEnterpriseApp.md docs/ResourceRemoteInfoAzureEntraIdRole.md docs/ResourceRemoteInfoAzureManagementGroup.md @@ -205,18 +344,33 @@ docs/ResourceRemoteInfoAzureStorageContainer.md docs/ResourceRemoteInfoAzureSubscription.md docs/ResourceRemoteInfoAzureUserAssignedManagedIdentity.md docs/ResourceRemoteInfoAzureVirtualMachine.md +docs/ResourceRemoteInfoBitwardenOrganization.md +docs/ResourceRemoteInfoBoxEnterprise.md +docs/ResourceRemoteInfoBoxFolder.md +docs/ResourceRemoteInfoCalendlyEventType.md +docs/ResourceRemoteInfoCalendlyRole.md +docs/ResourceRemoteInfoClickhouseConsoleRole.md docs/ResourceRemoteInfoClickhouseDatabase.md docs/ResourceRemoteInfoClickhouseTable.md docs/ResourceRemoteInfoCoupaRole.md docs/ResourceRemoteInfoCursorOrganization.md +docs/ResourceRemoteInfoCursorOriginRepository.md docs/ResourceRemoteInfoCustomConnector.md docs/ResourceRemoteInfoDatabricksAccountServicePrincipal.md +docs/ResourceRemoteInfoDatabricksCatalog.md +docs/ResourceRemoteInfoDatabricksFunction.md +docs/ResourceRemoteInfoDatabricksModel.md +docs/ResourceRemoteInfoDatabricksSchema.md +docs/ResourceRemoteInfoDatabricksService.md +docs/ResourceRemoteInfoDatabricksVolume.md docs/ResourceRemoteInfoDatadogRole.md docs/ResourceRemoteInfoDatastaxAstraRole.md docs/ResourceRemoteInfoDevinOrganization.md docs/ResourceRemoteInfoDevinRole.md +docs/ResourceRemoteInfoDocusignPermissionProfile.md docs/ResourceRemoteInfoGcpBigQueryDataset.md docs/ResourceRemoteInfoGcpBigQueryTable.md +docs/ResourceRemoteInfoGcpBillingAccount.md docs/ResourceRemoteInfoGcpBucket.md docs/ResourceRemoteInfoGcpComputeInstance.md docs/ResourceRemoteInfoGcpFolder.md @@ -236,46 +390,73 @@ docs/ResourceRemoteInfoGrafanaFolder.md docs/ResourceRemoteInfoGrafanaRole.md docs/ResourceRemoteInfoHubspotRole.md docs/ResourceRemoteInfoIlevelAdvancedRole.md +docs/ResourceRemoteInfoLinearOrganization.md +docs/ResourceRemoteInfoLinearProject.md docs/ResourceRemoteInfoNetsuiteRole.md docs/ResourceRemoteInfoOktaApp.md docs/ResourceRemoteInfoOktaCustomRole.md docs/ResourceRemoteInfoOktaStandardRole.md +docs/ResourceRemoteInfoOneloginApp.md docs/ResourceRemoteInfoOpenaiPlatformProject.md docs/ResourceRemoteInfoOpenaiPlatformServiceAccount.md docs/ResourceRemoteInfoOracleFusionRole.md docs/ResourceRemoteInfoPagerdutyRole.md +docs/ResourceRemoteInfoRampFund.md +docs/ResourceRemoteInfoRampRole.md +docs/ResourceRemoteInfoRipplingDepartment.md docs/ResourceRemoteInfoSalesforcePermissionSet.md docs/ResourceRemoteInfoSalesforceProfile.md docs/ResourceRemoteInfoSalesforceRole.md +docs/ResourceRemoteInfoSlackOrganization.md +docs/ResourceRemoteInfoSlackWorkspace.md docs/ResourceRemoteInfoSnowflakeDatabase.md docs/ResourceRemoteInfoSnowflakeSchema.md docs/ResourceRemoteInfoSnowflakeTable.md docs/ResourceRemoteInfoTailscaleSsh.md docs/ResourceRemoteInfoTeleportRole.md +docs/ResourceRemoteInfoTrayOrganization.md +docs/ResourceRemoteInfoTrayWorkspace.md docs/ResourceRemoteInfoTwingateResource.md +docs/ResourceRemoteInfoVercelProject.md +docs/ResourceRemoteInfoVercelRole.md docs/ResourceRemoteInfoWorkdayRole.md +docs/ResourceRemoteInfoWrikeUserType.md docs/ResourceRemoteInfoZendeskRole.md +docs/ResourceRemoteInfoZoomLicense.md +docs/ResourceRemoteInfoZoomRole.md docs/ResourceTypeEnum.md docs/ResourceUser.md docs/ResourceUserAccessStatus.md docs/ResourceUserAccessStatusEnum.md docs/ResourceWithAccessLevel.md docs/ResourcesApi.md +docs/ReviewCampaignItemDecisionInfo.md +docs/ReviewCampaignItemsInfo.md +docs/ReviewCampaignItemsResponse.md docs/ReviewStageOperator.md docs/ReviewerIDList.md docs/ReviewerStage.md +docs/ReviewerStageEscalation.md docs/ReviewerStageList.md docs/RiskSensitivityEnum.md +docs/RoleAssignment.md +docs/RoleAssignmentEntityTypeEnum.md +docs/RoleAssignmentsApi.md docs/RolePermissionNameEnum.md docs/RolePermissionTargetTypeEnum.md docs/RuleClauses.md docs/RuleConjunction.md docs/RuleDisjunction.md +docs/RunOpalQueryRequest.md docs/ScopedRolePermission.md docs/ScopedRolePermissionList.md +docs/ServiceUsersApi.md docs/Session.md docs/SessionsApi.md docs/SessionsList.md +docs/SetAgentKillSwitchRequest.md +docs/SortDirectionEnum.md +docs/StopCampaignRequest.md docs/StringMatchType.md docs/SubEvent.md docs/SyncError.md @@ -296,7 +477,13 @@ docs/UARReviewerAssignmentPolicyEnum.md docs/UARScope.md docs/UarsApi.md docs/UpdateAccessRuleInfo.md +docs/UpdateAppInfo.md +docs/UpdateCampaignConfigurationInfo.md +docs/UpdateCampaignInfo.md +docs/UpdateCampaignItemReviewersInfo.md +docs/UpdateCampaignItemReviewersResult.md docs/UpdateConfigurationTemplateInfo.md +docs/UpdateCustomConnectorInfo.md docs/UpdateEventStreamInfo.md docs/UpdateGroupBindingInfo.md docs/UpdateGroupBindingInfoList.md @@ -306,17 +493,31 @@ docs/UpdateGroupResourcesInfo.md docs/UpdateGroupUserRequest.md docs/UpdateIdpGroupMappingsRequest.md docs/UpdateIdpGroupMappingsRequestMappingsInner.md +docs/UpdateOpalScriptInfo.md docs/UpdateOwnerInfo.md docs/UpdateOwnerInfoList.md +docs/UpdatePaladinInfo.md +docs/UpdateRequestTemplateInfo.md +docs/UpdateResourceCustomAccessLevelInfo.md docs/UpdateResourceInfo.md docs/UpdateResourceInfoList.md docs/UpdateResourceUserRequest.md +docs/UpdateUserInfo.md docs/User.md +docs/UserAccess.md +docs/UserAccessEntityTypeEnum.md +docs/UserAccessLevel.md +docs/UserAccessList.md docs/UserAttributeSelector.md docs/UserHrIdpStatusEnum.md docs/UserIDList.md docs/UserList.md +docs/UserProductRoleEnum.md docs/UsersApi.md +docs/ViewerCampaignItem.md +docs/ViewerCampaignItemReviewDecisionEnum.md +docs/ViewerCampaignItemSortFieldEnum.md +docs/ViewerCampaignItemStatusEnum.md docs/VisibilityInfo.md docs/VisibilityTypeEnum.md docs/WebhookApiKeyCredential.md @@ -328,8 +529,10 @@ git_push.sh opal_security/__init__.py opal_security/api/__init__.py opal_security/api/access_rules_api.py +opal_security/api/agent_activity_api.py opal_security/api/apps_api.py opal_security/api/bundles_api.py +opal_security/api/campaigns_api.py opal_security/api/configuration_templates_api.py opal_security/api/delegations_api.py opal_security/api/event_streams_api.py @@ -341,9 +544,14 @@ opal_security/api/message_channels_api.py opal_security/api/non_human_identities_api.py opal_security/api/on_call_schedules_api.py opal_security/api/opal_queries_api.py +opal_security/api/opal_scripts_api.py opal_security/api/owners_api.py +opal_security/api/paladin_api.py +opal_security/api/request_templates_api.py opal_security/api/requests_api.py opal_security/api/resources_api.py +opal_security/api/role_assignments_api.py +opal_security/api/service_users_api.py opal_security/api/sessions_api.py opal_security/api/tags_api.py opal_security/api/tokens_api.py @@ -365,12 +573,29 @@ opal_security/models/add_group_resource_request.py opal_security/models/add_group_user_request.py opal_security/models/add_resource_nhi_request.py opal_security/models/add_resource_user_request.py +opal_security/models/add_role_assignment_input.py +opal_security/models/add_role_assignments_entry.py +opal_security/models/add_role_assignments_request.py +opal_security/models/add_role_assignments_response.py +opal_security/models/agent_activity_client_setting.py +opal_security/models/agent_activity_client_settings.py +opal_security/models/agent_activity_content_report.py +opal_security/models/agent_activity_event.py +opal_security/models/agent_activity_images.py +opal_security/models/agent_activity_ingest_request.py +opal_security/models/agent_activity_ingest_result.py +opal_security/models/agent_activity_mcp_server.py +opal_security/models/agent_activity_opal_mcp_server.py +opal_security/models/agent_activity_opal_reported.py +opal_security/models/agent_kill_switch.py +opal_security/models/anthropic_inference_hook_verdict.py opal_security/models/api_access_level_enum.py opal_security/models/app.py opal_security/models/app_type_enum.py opal_security/models/app_validation.py opal_security/models/app_validation_severity_enum.py opal_security/models/app_validation_status_enum.py +opal_security/models/app_visibility_info.py opal_security/models/approve_request200_response.py opal_security/models/approve_request_request.py opal_security/models/apps_list.py @@ -379,10 +604,31 @@ opal_security/models/aws_permission_set_metadata_aws_permission_set.py opal_security/models/bundle.py opal_security/models/bundle_group.py opal_security/models/bundle_resource.py +opal_security/models/campaign.py +opal_security/models/campaign_configuration.py +opal_security/models/campaign_group_asset_visibility_policy_enum.py +opal_security/models/campaign_item.py +opal_security/models/campaign_item_admin_override.py +opal_security/models/campaign_item_review.py +opal_security/models/campaign_item_review_decision_enum.py +opal_security/models/campaign_item_review_result.py +opal_security/models/campaign_item_reviewer_assignment.py +opal_security/models/campaign_item_reviewer_assignment_source_enum.py +opal_security/models/campaign_item_reviewer_source_removal.py +opal_security/models/campaign_item_status_enum.py +opal_security/models/campaign_item_target_type_enum.py +opal_security/models/campaign_item_unassigned_preset_message.py +opal_security/models/campaign_revoke_on_enum.py +opal_security/models/campaign_status_enum.py +opal_security/models/cancel_request_request.py opal_security/models/condition.py opal_security/models/configuration_template.py +opal_security/models/create_app_info.py opal_security/models/create_bundle_info.py +opal_security/models/create_campaign_configuration_info.py +opal_security/models/create_campaign_info.py opal_security/models/create_configuration_template_info.py +opal_security/models/create_custom_connector_info.py opal_security/models/create_delegation_request.py opal_security/models/create_event_stream_info.py opal_security/models/create_group_binding_info.py @@ -391,7 +637,10 @@ opal_security/models/create_group_info.py opal_security/models/create_idp_group_mapping_request.py opal_security/models/create_message_channel_info.py opal_security/models/create_on_call_schedule_info.py +opal_security/models/create_opal_script_info.py opal_security/models/create_owner_info.py +opal_security/models/create_paladin_context_source_info.py +opal_security/models/create_paladin_info.py opal_security/models/create_request200_response.py opal_security/models/create_request_comment_request.py opal_security/models/create_request_configuration_info_list.py @@ -400,15 +649,26 @@ opal_security/models/create_request_info_custom_metadata_inner.py opal_security/models/create_request_info_groups_inner.py opal_security/models/create_request_info_resources_inner.py opal_security/models/create_request_info_support_ticket.py +opal_security/models/create_request_template_info.py +opal_security/models/create_resource_custom_access_level_info.py opal_security/models/create_resource_info.py +opal_security/models/create_service_user_request.py opal_security/models/create_tag_info.py +opal_security/models/create_token_info.py +opal_security/models/create_token_response.py opal_security/models/create_uar_info.py +opal_security/models/custom_connector_app_config.py +opal_security/models/custom_connector_idp_protocol_enum.py opal_security/models/delegation.py opal_security/models/deny_request_request.py +opal_security/models/entity_admin_filter.py +opal_security/models/entity_description_filter.py opal_security/models/entity_item_type_enum.py opal_security/models/entity_name_filter.py opal_security/models/entity_tag_filter.py +opal_security/models/entity_tag_key_filter.py opal_security/models/entity_type_enum.py +opal_security/models/escalate_request200_response.py opal_security/models/event.py opal_security/models/event_stream.py opal_security/models/event_stream_connection.py @@ -417,19 +677,35 @@ opal_security/models/event_stream_list.py opal_security/models/get_resource_user200_response.py opal_security/models/group.py opal_security/models/group_access_level.py +opal_security/models/group_access_level_list.py opal_security/models/group_binding.py opal_security/models/group_binding_group.py +opal_security/models/group_configuration_template.py opal_security/models/group_containing_group.py opal_security/models/group_containing_group_list.py +opal_security/models/group_member_group.py +opal_security/models/group_member_group_list.py opal_security/models/group_remote_info.py opal_security/models/group_remote_info_active_directory_group.py +opal_security/models/group_remote_info_activecampaign_group.py +opal_security/models/group_remote_info_aha_team.py +opal_security/models/group_remote_info_asana_team.py opal_security/models/group_remote_info_aws_sso_group.py +opal_security/models/group_remote_info_axiom_group.py opal_security/models/group_remote_info_azure_ad_microsoft365_group.py opal_security/models/group_remote_info_azure_ad_security_group.py +opal_security/models/group_remote_info_bitwarden_group.py +opal_security/models/group_remote_info_box_group.py +opal_security/models/group_remote_info_calendly_group.py opal_security/models/group_remote_info_clickhouse_role.py +opal_security/models/group_remote_info_confluence_group.py opal_security/models/group_remote_info_connector_group.py +opal_security/models/group_remote_info_cursor_group.py opal_security/models/group_remote_info_databricks_account_group.py +opal_security/models/group_remote_info_datadog_on_call_schedule.py opal_security/models/group_remote_info_devin_group.py +opal_security/models/group_remote_info_docusign_group.py +opal_security/models/group_remote_info_docusign_signing_group.py opal_security/models/group_remote_info_duo_group.py opal_security/models/group_remote_info_github_enterprise_team.py opal_security/models/group_remote_info_github_team.py @@ -438,19 +714,32 @@ opal_security/models/group_remote_info_google_group.py opal_security/models/group_remote_info_grafana_team.py opal_security/models/group_remote_info_hubspot_team.py opal_security/models/group_remote_info_incidentio_on_call_schedule.py +opal_security/models/group_remote_info_jira_group.py opal_security/models/group_remote_info_ldap_group.py +opal_security/models/group_remote_info_linear_team.py opal_security/models/group_remote_info_okta_group.py opal_security/models/group_remote_info_okta_group_rule.py +opal_security/models/group_remote_info_onelogin_group.py +opal_security/models/group_remote_info_onelogin_role.py opal_security/models/group_remote_info_pagerduty_on_call_schedule.py +opal_security/models/group_remote_info_ramp_department.py +opal_security/models/group_remote_info_ramp_location.py +opal_security/models/group_remote_info_rippling_supergroup.py +opal_security/models/group_remote_info_rippling_team.py opal_security/models/group_remote_info_rootly_on_call_schedule.py opal_security/models/group_remote_info_slack_user_group.py opal_security/models/group_remote_info_snowflake_role.py +opal_security/models/group_remote_info_square_job.py +opal_security/models/group_remote_info_square_location.py +opal_security/models/group_remote_info_tableau_group.py opal_security/models/group_remote_info_tailscale_group.py opal_security/models/group_remote_info_twingate_group.py opal_security/models/group_remote_info_twingate_group_synced.py opal_security/models/group_remote_info_workday_user_security_group.py +opal_security/models/group_remote_info_wrike_group.py opal_security/models/group_remote_info_zendesk_group.py opal_security/models/group_remote_info_zendesk_organization.py +opal_security/models/group_remote_info_zoom_group.py opal_security/models/group_resource.py opal_security/models/group_resource_list.py opal_security/models/group_type_enum.py @@ -459,19 +748,41 @@ opal_security/models/group_user_list.py opal_security/models/group_with_access_level.py opal_security/models/idp_group_mapping.py opal_security/models/idp_group_mapping_list.py +opal_security/models/idp_status_filter.py +opal_security/models/invite_user_info.py +opal_security/models/mcp_config_permission.py +opal_security/models/mcp_config_plugin.py +opal_security/models/mcp_config_report.py +opal_security/models/mcp_config_report_result.py +opal_security/models/mcp_config_reporter.py +opal_security/models/mcp_config_server.py +opal_security/models/mcp_config_skill.py +opal_security/models/mcp_config_subagent.py opal_security/models/message_channel.py opal_security/models/message_channel_id_list.py opal_security/models/message_channel_list.py opal_security/models/message_channel_provider_enum.py +opal_security/models/name_match_type.py opal_security/models/on_call_schedule.py opal_security/models/on_call_schedule_id_list.py opal_security/models/on_call_schedule_list.py opal_security/models/on_call_schedule_provider_enum.py +opal_security/models/opal_access_path_detail.py +opal_security/models/opal_access_path_edge_filter.py +opal_security/models/opal_access_path_query_body.py +opal_security/models/opal_access_query.py +opal_security/models/opal_access_query_results.py +opal_security/models/opal_access_result_edge.py +opal_security/models/opal_access_result_node.py opal_security/models/opal_node_query.py opal_security/models/opal_node_query_body.py opal_security/models/opal_node_query_results.py opal_security/models/opal_query_result_edge.py opal_security/models/opal_query_result_node.py +opal_security/models/opal_query_results.py +opal_security/models/opal_script.py +opal_security/models/opal_script_list.py +opal_security/models/opal_script_type_enum.py opal_security/models/owner.py opal_security/models/page_info.py opal_security/models/paginated_access_rules_list.py @@ -479,6 +790,8 @@ opal_security/models/paginated_assigned_request_list.py opal_security/models/paginated_bundle_group_list.py opal_security/models/paginated_bundle_list.py opal_security/models/paginated_bundle_resource_list.py +opal_security/models/paginated_campaign_items_list.py +opal_security/models/paginated_campaigns_list.py opal_security/models/paginated_configuration_template_list.py opal_security/models/paginated_delegations_list.py opal_security/models/paginated_event_list.py @@ -486,15 +799,29 @@ opal_security/models/paginated_group_bindings_list.py opal_security/models/paginated_groups_list.py opal_security/models/paginated_owners_list.py opal_security/models/paginated_remote_users_list.py +opal_security/models/paginated_request_template_list.py opal_security/models/paginated_resources_list.py +opal_security/models/paginated_role_assignments_list.py opal_security/models/paginated_tags_list.py opal_security/models/paginated_tokens_list.py opal_security/models/paginated_uars_list.py opal_security/models/paginated_users_list.py +opal_security/models/paginated_viewer_campaign_items_list.py +opal_security/models/paladin.py +opal_security/models/paladin_connector.py +opal_security/models/paladin_context_source.py +opal_security/models/paladin_context_source_kind.py +opal_security/models/paladin_context_source_list.py +opal_security/models/paladin_context_source_provider.py +opal_security/models/paladin_list.py opal_security/models/propagation_status.py opal_security/models/propagation_status_enum.py opal_security/models/rds_engine_enum.py opal_security/models/remote_user.py +opal_security/models/remove_role_assignment_input.py +opal_security/models/remove_role_assignments_entry.py +opal_security/models/remove_role_assignments_request.py +opal_security/models/remove_role_assignments_response.py opal_security/models/request.py opal_security/models/request_approval_enum.py opal_security/models/request_comment.py @@ -510,15 +837,28 @@ opal_security/models/request_reviewer.py opal_security/models/request_reviewer_stages.py opal_security/models/request_stage.py opal_security/models/request_status_enum.py +opal_security/models/request_template.py +opal_security/models/request_template_custom_field.py +opal_security/models/request_template_custom_field_callout_metadata.py +opal_security/models/request_template_custom_field_input.py +opal_security/models/request_template_custom_field_metadata.py +opal_security/models/request_template_custom_field_multi_choice_metadata.py opal_security/models/request_template_custom_field_type_enum.py opal_security/models/requested_item.py opal_security/models/resource.py opal_security/models/resource_access_level.py +opal_security/models/resource_access_level_list.py opal_security/models/resource_access_user.py opal_security/models/resource_access_user_list.py +opal_security/models/resource_configuration_template.py +opal_security/models/resource_custom_access_level_list.py +opal_security/models/resource_custom_access_level_response.py opal_security/models/resource_nhi.py opal_security/models/resource_remote_info.py +opal_security/models/resource_remote_info_alicloud_ecs_instance.py +opal_security/models/resource_remote_info_alicloud_ram_role.py opal_security/models/resource_remote_info_anthropic_workspace.py +opal_security/models/resource_remote_info_asana_workspace.py opal_security/models/resource_remote_info_aws_account.py opal_security/models/resource_remote_info_aws_ec2_instance.py opal_security/models/resource_remote_info_aws_eks_cluster.py @@ -527,6 +867,8 @@ opal_security/models/resource_remote_info_aws_organizational_unit.py opal_security/models/resource_remote_info_aws_permission_set.py opal_security/models/resource_remote_info_aws_rds_cluster.py opal_security/models/resource_remote_info_aws_rds_instance.py +opal_security/models/resource_remote_info_axiom_custom_role.py +opal_security/models/resource_remote_info_axiom_role.py opal_security/models/resource_remote_info_azure_enterprise_app.py opal_security/models/resource_remote_info_azure_entra_id_role.py opal_security/models/resource_remote_info_azure_management_group.py @@ -540,18 +882,33 @@ opal_security/models/resource_remote_info_azure_storage_container.py opal_security/models/resource_remote_info_azure_subscription.py opal_security/models/resource_remote_info_azure_user_assigned_managed_identity.py opal_security/models/resource_remote_info_azure_virtual_machine.py +opal_security/models/resource_remote_info_bitwarden_organization.py +opal_security/models/resource_remote_info_box_enterprise.py +opal_security/models/resource_remote_info_box_folder.py +opal_security/models/resource_remote_info_calendly_event_type.py +opal_security/models/resource_remote_info_calendly_role.py +opal_security/models/resource_remote_info_clickhouse_console_role.py opal_security/models/resource_remote_info_clickhouse_database.py opal_security/models/resource_remote_info_clickhouse_table.py opal_security/models/resource_remote_info_coupa_role.py opal_security/models/resource_remote_info_cursor_organization.py +opal_security/models/resource_remote_info_cursor_origin_repository.py opal_security/models/resource_remote_info_custom_connector.py opal_security/models/resource_remote_info_databricks_account_service_principal.py +opal_security/models/resource_remote_info_databricks_catalog.py +opal_security/models/resource_remote_info_databricks_function.py +opal_security/models/resource_remote_info_databricks_model.py +opal_security/models/resource_remote_info_databricks_schema.py +opal_security/models/resource_remote_info_databricks_service.py +opal_security/models/resource_remote_info_databricks_volume.py opal_security/models/resource_remote_info_datadog_role.py opal_security/models/resource_remote_info_datastax_astra_role.py opal_security/models/resource_remote_info_devin_organization.py opal_security/models/resource_remote_info_devin_role.py +opal_security/models/resource_remote_info_docusign_permission_profile.py opal_security/models/resource_remote_info_gcp_big_query_dataset.py opal_security/models/resource_remote_info_gcp_big_query_table.py +opal_security/models/resource_remote_info_gcp_billing_account.py opal_security/models/resource_remote_info_gcp_bucket.py opal_security/models/resource_remote_info_gcp_compute_instance.py opal_security/models/resource_remote_info_gcp_folder.py @@ -571,44 +928,69 @@ opal_security/models/resource_remote_info_grafana_folder.py opal_security/models/resource_remote_info_grafana_role.py opal_security/models/resource_remote_info_hubspot_role.py opal_security/models/resource_remote_info_ilevel_advanced_role.py +opal_security/models/resource_remote_info_linear_organization.py +opal_security/models/resource_remote_info_linear_project.py opal_security/models/resource_remote_info_netsuite_role.py opal_security/models/resource_remote_info_okta_app.py opal_security/models/resource_remote_info_okta_custom_role.py opal_security/models/resource_remote_info_okta_standard_role.py +opal_security/models/resource_remote_info_onelogin_app.py opal_security/models/resource_remote_info_openai_platform_project.py opal_security/models/resource_remote_info_openai_platform_service_account.py opal_security/models/resource_remote_info_oracle_fusion_role.py opal_security/models/resource_remote_info_pagerduty_role.py +opal_security/models/resource_remote_info_ramp_fund.py +opal_security/models/resource_remote_info_ramp_role.py +opal_security/models/resource_remote_info_rippling_department.py opal_security/models/resource_remote_info_salesforce_permission_set.py opal_security/models/resource_remote_info_salesforce_profile.py opal_security/models/resource_remote_info_salesforce_role.py +opal_security/models/resource_remote_info_slack_organization.py +opal_security/models/resource_remote_info_slack_workspace.py opal_security/models/resource_remote_info_snowflake_database.py opal_security/models/resource_remote_info_snowflake_schema.py opal_security/models/resource_remote_info_snowflake_table.py opal_security/models/resource_remote_info_tailscale_ssh.py opal_security/models/resource_remote_info_teleport_role.py +opal_security/models/resource_remote_info_tray_organization.py +opal_security/models/resource_remote_info_tray_workspace.py opal_security/models/resource_remote_info_twingate_resource.py +opal_security/models/resource_remote_info_vercel_project.py +opal_security/models/resource_remote_info_vercel_role.py opal_security/models/resource_remote_info_workday_role.py +opal_security/models/resource_remote_info_wrike_user_type.py opal_security/models/resource_remote_info_zendesk_role.py +opal_security/models/resource_remote_info_zoom_license.py +opal_security/models/resource_remote_info_zoom_role.py opal_security/models/resource_type_enum.py opal_security/models/resource_user.py opal_security/models/resource_user_access_status.py opal_security/models/resource_user_access_status_enum.py opal_security/models/resource_with_access_level.py +opal_security/models/review_campaign_item_decision_info.py +opal_security/models/review_campaign_items_info.py +opal_security/models/review_campaign_items_response.py opal_security/models/review_stage_operator.py opal_security/models/reviewer_id_list.py opal_security/models/reviewer_stage.py +opal_security/models/reviewer_stage_escalation.py opal_security/models/reviewer_stage_list.py opal_security/models/risk_sensitivity_enum.py +opal_security/models/role_assignment.py +opal_security/models/role_assignment_entity_type_enum.py opal_security/models/role_permission_name_enum.py opal_security/models/role_permission_target_type_enum.py opal_security/models/rule_clauses.py opal_security/models/rule_conjunction.py opal_security/models/rule_disjunction.py +opal_security/models/run_opal_query_request.py opal_security/models/scoped_role_permission.py opal_security/models/scoped_role_permission_list.py opal_security/models/session.py opal_security/models/sessions_list.py +opal_security/models/set_agent_kill_switch_request.py +opal_security/models/sort_direction_enum.py +opal_security/models/stop_campaign_request.py opal_security/models/string_match_type.py opal_security/models/sub_event.py opal_security/models/sync_error.py @@ -626,7 +1008,13 @@ opal_security/models/uar.py opal_security/models/uar_reviewer_assignment_policy_enum.py opal_security/models/uar_scope.py opal_security/models/update_access_rule_info.py +opal_security/models/update_app_info.py +opal_security/models/update_campaign_configuration_info.py +opal_security/models/update_campaign_info.py +opal_security/models/update_campaign_item_reviewers_info.py +opal_security/models/update_campaign_item_reviewers_result.py opal_security/models/update_configuration_template_info.py +opal_security/models/update_custom_connector_info.py opal_security/models/update_event_stream_info.py opal_security/models/update_group_binding_info.py opal_security/models/update_group_binding_info_list.py @@ -636,16 +1024,30 @@ opal_security/models/update_group_resources_info.py opal_security/models/update_group_user_request.py opal_security/models/update_idp_group_mappings_request.py opal_security/models/update_idp_group_mappings_request_mappings_inner.py +opal_security/models/update_opal_script_info.py opal_security/models/update_owner_info.py opal_security/models/update_owner_info_list.py +opal_security/models/update_paladin_info.py +opal_security/models/update_request_template_info.py +opal_security/models/update_resource_custom_access_level_info.py opal_security/models/update_resource_info.py opal_security/models/update_resource_info_list.py opal_security/models/update_resource_user_request.py +opal_security/models/update_user_info.py opal_security/models/user.py +opal_security/models/user_access.py +opal_security/models/user_access_entity_type_enum.py +opal_security/models/user_access_level.py +opal_security/models/user_access_list.py opal_security/models/user_attribute_selector.py opal_security/models/user_hr_idp_status_enum.py opal_security/models/user_id_list.py opal_security/models/user_list.py +opal_security/models/user_product_role_enum.py +opal_security/models/viewer_campaign_item.py +opal_security/models/viewer_campaign_item_review_decision_enum.py +opal_security/models/viewer_campaign_item_sort_field_enum.py +opal_security/models/viewer_campaign_item_status_enum.py opal_security/models/visibility_info.py opal_security/models/visibility_type_enum.py opal_security/models/webhook_api_key_credential.py @@ -655,47 +1057,210 @@ opal_security/models/webhook_credentials.py opal_security/models/webhook_hmac_credential.py opal_security/py.typed opal_security/rest.py -pyproject.toml requirements.txt setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_access_entity_filters.py -test/test_access_relationship_filters.py -test/test_create_event_stream_info.py -test/test_entity_item_type_enum.py -test/test_entity_name_filter.py -test/test_entity_tag_filter.py -test/test_event_stream.py -test/test_event_stream_connection.py -test/test_event_stream_connection_type_enum.py -test/test_event_stream_list.py -test/test_event_streams_api.py -test/test_group_remote_info_grafana_team.py -test/test_group_remote_info_hubspot_team.py -test/test_group_remote_info_slack_user_group.py -test/test_group_remote_info_twingate_group_synced.py -test/test_group_remote_info_zendesk_group.py -test/test_group_remote_info_zendesk_organization.py -test/test_opal_node_query.py -test/test_opal_node_query_body.py -test/test_opal_node_query_results.py -test/test_opal_queries_api.py -test/test_opal_query_result_edge.py -test/test_opal_query_result_node.py -test/test_paginated_access_rules_list.py -test/test_resource_remote_info_grafana_dashboard.py -test/test_resource_remote_info_grafana_folder.py -test/test_resource_remote_info_grafana_role.py -test/test_resource_remote_info_hubspot_role.py -test/test_resource_remote_info_zendesk_role.py -test/test_string_match_type.py -test/test_update_event_stream_info.py -test/test_user_attribute_selector.py -test/test_webhook_api_key_credential.py -test/test_webhook_api_key_location_enum.py -test/test_webhook_auth_type_enum.py -test/test_webhook_credentials.py -test/test_webhook_hmac_credential.py +test/test_add_role_assignment_input.py +test/test_add_role_assignments_entry.py +test/test_add_role_assignments_request.py +test/test_add_role_assignments_response.py +test/test_agent_activity_api.py +test/test_agent_activity_client_setting.py +test/test_agent_activity_client_settings.py +test/test_agent_activity_content_report.py +test/test_agent_activity_event.py +test/test_agent_activity_images.py +test/test_agent_activity_ingest_request.py +test/test_agent_activity_ingest_result.py +test/test_agent_activity_mcp_server.py +test/test_agent_activity_opal_mcp_server.py +test/test_agent_activity_opal_reported.py +test/test_agent_kill_switch.py +test/test_anthropic_inference_hook_verdict.py +test/test_app_visibility_info.py +test/test_campaign.py +test/test_campaign_configuration.py +test/test_campaign_group_asset_visibility_policy_enum.py +test/test_campaign_item.py +test/test_campaign_item_admin_override.py +test/test_campaign_item_review.py +test/test_campaign_item_review_decision_enum.py +test/test_campaign_item_review_result.py +test/test_campaign_item_reviewer_assignment.py +test/test_campaign_item_reviewer_assignment_source_enum.py +test/test_campaign_item_reviewer_source_removal.py +test/test_campaign_item_status_enum.py +test/test_campaign_item_target_type_enum.py +test/test_campaign_item_unassigned_preset_message.py +test/test_campaign_revoke_on_enum.py +test/test_campaign_status_enum.py +test/test_campaigns_api.py +test/test_cancel_request_request.py +test/test_create_app_info.py +test/test_create_campaign_configuration_info.py +test/test_create_campaign_info.py +test/test_create_custom_connector_info.py +test/test_create_opal_script_info.py +test/test_create_paladin_context_source_info.py +test/test_create_paladin_info.py +test/test_create_request_template_info.py +test/test_create_resource_custom_access_level_info.py +test/test_create_service_user_request.py +test/test_create_token_info.py +test/test_create_token_response.py +test/test_custom_connector_app_config.py +test/test_custom_connector_idp_protocol_enum.py +test/test_entity_admin_filter.py +test/test_entity_description_filter.py +test/test_entity_tag_key_filter.py +test/test_escalate_request200_response.py +test/test_group_access_level_list.py +test/test_group_configuration_template.py +test/test_group_member_group.py +test/test_group_member_group_list.py +test/test_group_remote_info_activecampaign_group.py +test/test_group_remote_info_aha_team.py +test/test_group_remote_info_asana_team.py +test/test_group_remote_info_axiom_group.py +test/test_group_remote_info_bitwarden_group.py +test/test_group_remote_info_box_group.py +test/test_group_remote_info_calendly_group.py +test/test_group_remote_info_confluence_group.py +test/test_group_remote_info_cursor_group.py +test/test_group_remote_info_datadog_on_call_schedule.py +test/test_group_remote_info_docusign_group.py +test/test_group_remote_info_docusign_signing_group.py +test/test_group_remote_info_jira_group.py +test/test_group_remote_info_linear_team.py +test/test_group_remote_info_onelogin_group.py +test/test_group_remote_info_onelogin_role.py +test/test_group_remote_info_ramp_department.py +test/test_group_remote_info_ramp_location.py +test/test_group_remote_info_rippling_supergroup.py +test/test_group_remote_info_rippling_team.py +test/test_group_remote_info_square_job.py +test/test_group_remote_info_square_location.py +test/test_group_remote_info_tableau_group.py +test/test_group_remote_info_wrike_group.py +test/test_group_remote_info_zoom_group.py +test/test_idp_status_filter.py +test/test_invite_user_info.py +test/test_mcp_config_permission.py +test/test_mcp_config_plugin.py +test/test_mcp_config_report.py +test/test_mcp_config_report_result.py +test/test_mcp_config_reporter.py +test/test_mcp_config_server.py +test/test_mcp_config_skill.py +test/test_mcp_config_subagent.py +test/test_name_match_type.py +test/test_opal_access_path_detail.py +test/test_opal_access_path_edge_filter.py +test/test_opal_access_path_query_body.py +test/test_opal_access_query.py +test/test_opal_access_query_results.py +test/test_opal_access_result_edge.py +test/test_opal_access_result_node.py +test/test_opal_query_results.py +test/test_opal_script.py +test/test_opal_script_list.py +test/test_opal_script_type_enum.py +test/test_opal_scripts_api.py +test/test_paginated_campaign_items_list.py +test/test_paginated_campaigns_list.py +test/test_paginated_request_template_list.py +test/test_paginated_role_assignments_list.py +test/test_paginated_viewer_campaign_items_list.py +test/test_paladin.py +test/test_paladin_api.py +test/test_paladin_connector.py +test/test_paladin_context_source.py +test/test_paladin_context_source_kind.py +test/test_paladin_context_source_list.py +test/test_paladin_context_source_provider.py +test/test_paladin_list.py +test/test_remove_role_assignment_input.py +test/test_remove_role_assignments_entry.py +test/test_remove_role_assignments_request.py +test/test_remove_role_assignments_response.py +test/test_request_template.py +test/test_request_template_custom_field.py +test/test_request_template_custom_field_callout_metadata.py +test/test_request_template_custom_field_input.py +test/test_request_template_custom_field_metadata.py +test/test_request_template_custom_field_multi_choice_metadata.py +test/test_request_templates_api.py +test/test_resource_access_level_list.py +test/test_resource_configuration_template.py +test/test_resource_custom_access_level_list.py +test/test_resource_custom_access_level_response.py +test/test_resource_remote_info_alicloud_ecs_instance.py +test/test_resource_remote_info_alicloud_ram_role.py +test/test_resource_remote_info_asana_workspace.py +test/test_resource_remote_info_axiom_custom_role.py +test/test_resource_remote_info_axiom_role.py +test/test_resource_remote_info_bitwarden_organization.py +test/test_resource_remote_info_box_enterprise.py +test/test_resource_remote_info_box_folder.py +test/test_resource_remote_info_calendly_event_type.py +test/test_resource_remote_info_calendly_role.py +test/test_resource_remote_info_clickhouse_console_role.py +test/test_resource_remote_info_cursor_origin_repository.py +test/test_resource_remote_info_databricks_catalog.py +test/test_resource_remote_info_databricks_function.py +test/test_resource_remote_info_databricks_model.py +test/test_resource_remote_info_databricks_schema.py +test/test_resource_remote_info_databricks_service.py +test/test_resource_remote_info_databricks_volume.py +test/test_resource_remote_info_docusign_permission_profile.py +test/test_resource_remote_info_gcp_billing_account.py +test/test_resource_remote_info_linear_organization.py +test/test_resource_remote_info_linear_project.py +test/test_resource_remote_info_onelogin_app.py +test/test_resource_remote_info_ramp_fund.py +test/test_resource_remote_info_ramp_role.py +test/test_resource_remote_info_rippling_department.py +test/test_resource_remote_info_slack_organization.py +test/test_resource_remote_info_slack_workspace.py +test/test_resource_remote_info_tray_organization.py +test/test_resource_remote_info_tray_workspace.py +test/test_resource_remote_info_vercel_project.py +test/test_resource_remote_info_vercel_role.py +test/test_resource_remote_info_wrike_user_type.py +test/test_resource_remote_info_zoom_license.py +test/test_resource_remote_info_zoom_role.py +test/test_review_campaign_item_decision_info.py +test/test_review_campaign_items_info.py +test/test_review_campaign_items_response.py +test/test_reviewer_stage_escalation.py +test/test_role_assignment.py +test/test_role_assignment_entity_type_enum.py +test/test_role_assignments_api.py +test/test_run_opal_query_request.py +test/test_service_users_api.py +test/test_set_agent_kill_switch_request.py +test/test_sort_direction_enum.py +test/test_stop_campaign_request.py +test/test_update_app_info.py +test/test_update_campaign_configuration_info.py +test/test_update_campaign_info.py +test/test_update_campaign_item_reviewers_info.py +test/test_update_campaign_item_reviewers_result.py +test/test_update_custom_connector_info.py +test/test_update_opal_script_info.py +test/test_update_paladin_info.py +test/test_update_request_template_info.py +test/test_update_resource_custom_access_level_info.py +test/test_update_user_info.py +test/test_user_access.py +test/test_user_access_entity_type_enum.py +test/test_user_access_level.py +test/test_user_access_list.py +test/test_user_product_role_enum.py +test/test_viewer_campaign_item.py +test/test_viewer_campaign_item_review_decision_enum.py +test/test_viewer_campaign_item_sort_field_enum.py +test/test_viewer_campaign_item_status_enum.py tox.ini diff --git a/README.md b/README.md index 81688b4..f4b6d2a 100644 --- a/README.md +++ b/README.md @@ -144,9 +144,20 @@ Class | Method | HTTP request | Description *AccessRulesApi* | [**get_access_rule**](docs/AccessRulesApi.md#get_access_rule) | **GET** /access-rules/{access_rule_id} | *AccessRulesApi* | [**get_access_rules**](docs/AccessRulesApi.md#get_access_rules) | **GET** /access-rules | *AccessRulesApi* | [**update_access_rule**](docs/AccessRulesApi.md#update_access_rule) | **PUT** /access-rules/{access_rule_id} | +*AgentActivityApi* | [**anthropic_inference_hook**](docs/AgentActivityApi.md#anthropic_inference_hook) | **POST** /inference-hooks/anthropic | Anthropic inference hook verdict +*AgentActivityApi* | [**get_agent_activity_client_settings**](docs/AgentActivityApi.md#get_agent_activity_client_settings) | **GET** /agent-activity/client-settings | Get agent activity client settings +*AgentActivityApi* | [**get_agent_kill_switch**](docs/AgentActivityApi.md#get_agent_kill_switch) | **GET** /agent-kill-switch | Get the agent kill switch +*AgentActivityApi* | [**report_agent_activity**](docs/AgentActivityApi.md#report_agent_activity) | **POST** /agent-activity | Report agent activity +*AgentActivityApi* | [**report_mcp_config**](docs/AgentActivityApi.md#report_mcp_config) | **POST** /agent-activity/mcp-config | Report MCP server configuration +*AgentActivityApi* | [**set_agent_kill_switch**](docs/AgentActivityApi.md#set_agent_kill_switch) | **PUT** /agent-kill-switch | Set the agent kill switch +*AppsApi* | [**create_app**](docs/AppsApi.md#create_app) | **POST** /apps | Create app +*AppsApi* | [**delete_app**](docs/AppsApi.md#delete_app) | **DELETE** /apps/{app_id} | Delete app *AppsApi* | [**get_app**](docs/AppsApi.md#get_app) | **GET** /apps/{app_id} | Get app by ID +*AppsApi* | [**get_app_visibility**](docs/AppsApi.md#get_app_visibility) | **GET** /apps/{app_id}/visibility | Get app visibility *AppsApi* | [**get_apps**](docs/AppsApi.md#get_apps) | **GET** /apps | Get apps *AppsApi* | [**get_sync_errors**](docs/AppsApi.md#get_sync_errors) | **GET** /sync_errors | +*AppsApi* | [**set_app_visibility**](docs/AppsApi.md#set_app_visibility) | **PUT** /apps/{app_id}/visibility | Set app visibility +*AppsApi* | [**update_app**](docs/AppsApi.md#update_app) | **PUT** /apps/{app_id} | Update app *BundlesApi* | [**add_bundle_group**](docs/BundlesApi.md#add_bundle_group) | **POST** /bundles/{bundle_id}/groups | *BundlesApi* | [**add_bundle_resource**](docs/BundlesApi.md#add_bundle_resource) | **POST** /bundles/{bundle_id}/resources | *BundlesApi* | [**create_bundle**](docs/BundlesApi.md#create_bundle) | **POST** /bundles | @@ -160,6 +171,17 @@ Class | Method | HTTP request | Description *BundlesApi* | [**remove_bundle_resource**](docs/BundlesApi.md#remove_bundle_resource) | **DELETE** /bundles/{bundle_id}/resources/{resource_id} | *BundlesApi* | [**set_bundle_visibility**](docs/BundlesApi.md#set_bundle_visibility) | **PUT** /bundles/{bundle_id}/visibility | *BundlesApi* | [**update_bundle**](docs/BundlesApi.md#update_bundle) | **PUT** /bundles/{bundle_id} | +*CampaignsApi* | [**create_campaign**](docs/CampaignsApi.md#create_campaign) | **POST** /campaigns | +*CampaignsApi* | [**end_campaign**](docs/CampaignsApi.md#end_campaign) | **POST** /campaigns/{campaign_id}/end | End campaign +*CampaignsApi* | [**get_campaign**](docs/CampaignsApi.md#get_campaign) | **GET** /campaigns/{campaign_id} | Get campaign by ID +*CampaignsApi* | [**get_campaign_items**](docs/CampaignsApi.md#get_campaign_items) | **GET** /campaigns/{campaign_id}/items | List campaign items +*CampaignsApi* | [**get_campaign_viewer_items**](docs/CampaignsApi.md#get_campaign_viewer_items) | **GET** /campaigns/{campaign_id}/viewer-items | List viewer campaign items +*CampaignsApi* | [**get_campaigns**](docs/CampaignsApi.md#get_campaigns) | **GET** /campaigns | +*CampaignsApi* | [**review_campaign_items**](docs/CampaignsApi.md#review_campaign_items) | **POST** /campaigns/{campaign_id}/reviews | Submit campaign item review decisions +*CampaignsApi* | [**start_campaign**](docs/CampaignsApi.md#start_campaign) | **POST** /campaigns/{campaign_id}/start | Start campaign +*CampaignsApi* | [**stop_campaign**](docs/CampaignsApi.md#stop_campaign) | **POST** /campaigns/{campaign_id}/stop | Stop campaign +*CampaignsApi* | [**update_campaign**](docs/CampaignsApi.md#update_campaign) | **PUT** /campaigns/{campaign_id} | Update campaign +*CampaignsApi* | [**update_campaign_item_reviewers**](docs/CampaignsApi.md#update_campaign_item_reviewers) | **POST** /campaigns/{campaign_id}/item-reviewers | Update campaign item reviewers *ConfigurationTemplatesApi* | [**create_configuration_template**](docs/ConfigurationTemplatesApi.md#create_configuration_template) | **POST** /configuration-templates | *ConfigurationTemplatesApi* | [**delete_configuration_template**](docs/ConfigurationTemplatesApi.md#delete_configuration_template) | **DELETE** /configuration-templates/{configuration_template_id} | *ConfigurationTemplatesApi* | [**get_configuration_templates**](docs/ConfigurationTemplatesApi.md#get_configuration_templates) | **GET** /configuration-templates | @@ -186,8 +208,11 @@ Class | Method | HTTP request | Description *GroupsApi* | [**delete_group**](docs/GroupsApi.md#delete_group) | **DELETE** /groups/{group_id} | *GroupsApi* | [**delete_group_user**](docs/GroupsApi.md#delete_group_user) | **DELETE** /groups/{group_id}/users/{user_id} | *GroupsApi* | [**get_group**](docs/GroupsApi.md#get_group) | **GET** /groups/{group_id} | Get group by ID +*GroupsApi* | [**get_group_access_levels**](docs/GroupsApi.md#get_group_access_levels) | **GET** /groups/{group_id}/access_levels | Get group access levels +*GroupsApi* | [**get_group_configuration_template**](docs/GroupsApi.md#get_group_configuration_template) | **GET** /groups/{group_id}/configuration-template | Get the ID of the configuration template linked to a group *GroupsApi* | [**get_group_containing_group**](docs/GroupsApi.md#get_group_containing_group) | **GET** /groups/{group_id}/containing-groups/{containing_group_id} | Get nested group by ID *GroupsApi* | [**get_group_containing_groups**](docs/GroupsApi.md#get_group_containing_groups) | **GET** /groups/{group_id}/containing-groups | Get nested groups +*GroupsApi* | [**get_group_groups**](docs/GroupsApi.md#get_group_groups) | **GET** /groups/{group_id}/groups | Get member groups *GroupsApi* | [**get_group_message_channels**](docs/GroupsApi.md#get_group_message_channels) | **GET** /groups/{group_id}/message-channels | *GroupsApi* | [**get_group_on_call_schedules**](docs/GroupsApi.md#get_group_on_call_schedules) | **GET** /groups/{group_id}/on-call-schedules | *GroupsApi* | [**get_group_resources**](docs/GroupsApi.md#get_group_resources) | **GET** /groups/{group_id}/resources | @@ -205,6 +230,7 @@ Class | Method | HTTP request | Description *GroupsApi* | [**set_group_reviewer_stages**](docs/GroupsApi.md#set_group_reviewer_stages) | **PUT** /groups/{group_id}/reviewer-stages | *GroupsApi* | [**set_group_reviewers**](docs/GroupsApi.md#set_group_reviewers) | **PUT** /groups/{group_id}/reviewers | *GroupsApi* | [**set_group_visibility**](docs/GroupsApi.md#set_group_visibility) | **PUT** /groups/{group_id}/visibility | +*GroupsApi* | [**update_group_configuration_template**](docs/GroupsApi.md#update_group_configuration_template) | **PUT** /groups/{group_id}/configuration-template | Set the ID of the configuration template linked to a group *GroupsApi* | [**update_group_user**](docs/GroupsApi.md#update_group_user) | **PUT** /groups/{group_id}/users/{user_id} | *GroupsApi* | [**update_groups**](docs/GroupsApi.md#update_groups) | **PUT** /groups | *IdpGroupMappingsApi* | [**create_idp_group_mapping**](docs/IdpGroupMappingsApi.md#create_idp_group_mapping) | **POST** /idp-group-mappings/{app_resource_id}/groups/{group_id} | @@ -220,6 +246,12 @@ Class | Method | HTTP request | Description *OnCallSchedulesApi* | [**get_on_call_schedule**](docs/OnCallSchedulesApi.md#get_on_call_schedule) | **GET** /on-call-schedules/{on_call_schedule_id} | Get on call schedule by ID *OnCallSchedulesApi* | [**get_on_call_schedules**](docs/OnCallSchedulesApi.md#get_on_call_schedules) | **GET** /on-call-schedules | Get on call schedules *OpalQueriesApi* | [**run_opal_query**](docs/OpalQueriesApi.md#run_opal_query) | **POST** /queries/run | Run an ad-hoc OpalQuery +*OpalScriptsApi* | [**create_opal_script**](docs/OpalScriptsApi.md#create_opal_script) | **POST** /opal-scripts | Create OpalScript +*OpalScriptsApi* | [**delete_opal_script**](docs/OpalScriptsApi.md#delete_opal_script) | **DELETE** /opal-scripts/{opal_script_id} | Delete OpalScript +*OpalScriptsApi* | [**get_opal_script**](docs/OpalScriptsApi.md#get_opal_script) | **GET** /opal-scripts/{opal_script_id} | Get OpalScript by ID +*OpalScriptsApi* | [**get_opal_script_from_name**](docs/OpalScriptsApi.md#get_opal_script_from_name) | **GET** /opal-scripts/name/{opal_script_name} | Get OpalScript by name +*OpalScriptsApi* | [**get_opal_scripts**](docs/OpalScriptsApi.md#get_opal_scripts) | **GET** /opal-scripts | List OpalScripts +*OpalScriptsApi* | [**update_opal_script**](docs/OpalScriptsApi.md#update_opal_script) | **PUT** /opal-scripts/{opal_script_id} | Update OpalScript *OwnersApi* | [**create_owner**](docs/OwnersApi.md#create_owner) | **POST** /owners | *OwnersApi* | [**delete_owner**](docs/OwnersApi.md#delete_owner) | **DELETE** /owners/{owner_id} | *OwnersApi* | [**get_owner**](docs/OwnersApi.md#get_owner) | **GET** /owners/{owner_id} | Get owner by ID @@ -228,21 +260,43 @@ Class | Method | HTTP request | Description *OwnersApi* | [**get_owners**](docs/OwnersApi.md#get_owners) | **GET** /owners | Get owners *OwnersApi* | [**set_owner_users**](docs/OwnersApi.md#set_owner_users) | **PUT** /owners/{owner_id}/users | *OwnersApi* | [**update_owners**](docs/OwnersApi.md#update_owners) | **PUT** /owners | +*PaladinApi* | [**create_paladin**](docs/PaladinApi.md#create_paladin) | **POST** /paladin | Create Paladin +*PaladinApi* | [**create_paladin_context_source**](docs/PaladinApi.md#create_paladin_context_source) | **POST** /paladin/{paladin_id}/context-sources | Add a Paladin context source +*PaladinApi* | [**delete_paladin**](docs/PaladinApi.md#delete_paladin) | **DELETE** /paladin/{paladin_id} | Delete Paladin +*PaladinApi* | [**delete_paladin_context_source**](docs/PaladinApi.md#delete_paladin_context_source) | **DELETE** /paladin/{paladin_id}/context-sources/{context_source_id} | Remove a Paladin context source +*PaladinApi* | [**get_paladin**](docs/PaladinApi.md#get_paladin) | **GET** /paladin/{paladin_id} | Get Paladin by ID +*PaladinApi* | [**get_paladin_from_name**](docs/PaladinApi.md#get_paladin_from_name) | **GET** /paladin/name/{paladin_name} | Get Paladins by name +*PaladinApi* | [**list_paladin_context_sources**](docs/PaladinApi.md#list_paladin_context_sources) | **GET** /paladin/{paladin_id}/context-sources | List Paladin context sources +*PaladinApi* | [**update_paladin**](docs/PaladinApi.md#update_paladin) | **PUT** /paladin/{paladin_id} | Update Paladin +*RequestTemplatesApi* | [**create_request_template**](docs/RequestTemplatesApi.md#create_request_template) | **POST** /request-templates | +*RequestTemplatesApi* | [**delete_request_template**](docs/RequestTemplatesApi.md#delete_request_template) | **DELETE** /request-templates/{request_template_id} | +*RequestTemplatesApi* | [**get_request_template**](docs/RequestTemplatesApi.md#get_request_template) | **GET** /request-templates/{request_template_id} | +*RequestTemplatesApi* | [**get_request_templates**](docs/RequestTemplatesApi.md#get_request_templates) | **GET** /request-templates | +*RequestTemplatesApi* | [**update_request_template**](docs/RequestTemplatesApi.md#update_request_template) | **PUT** /request-templates | *RequestsApi* | [**approve_request**](docs/RequestsApi.md#approve_request) | **POST** /requests/{id}/approve | +*RequestsApi* | [**cancel_request**](docs/RequestsApi.md#cancel_request) | **POST** /requests/{id}/cancel | Cancel request *RequestsApi* | [**create_request**](docs/RequestsApi.md#create_request) | **POST** /requests | *RequestsApi* | [**create_request_comment**](docs/RequestsApi.md#create_request_comment) | **POST** /requests/{id}/comments | *RequestsApi* | [**deny_request**](docs/RequestsApi.md#deny_request) | **POST** /requests/{id}/deny | +*RequestsApi* | [**escalate_request**](docs/RequestsApi.md#escalate_request) | **POST** /requests/{id}/escalate | Escalate request to skip-manager *RequestsApi* | [**get_request**](docs/RequestsApi.md#get_request) | **GET** /requests/{id} | Get request by ID *RequestsApi* | [**get_request_comments**](docs/RequestsApi.md#get_request_comments) | **GET** /requests/{id}/comments | *RequestsApi* | [**get_requests**](docs/RequestsApi.md#get_requests) | **GET** /requests | Get requests *RequestsApi* | [**get_requests_relay**](docs/RequestsApi.md#get_requests_relay) | **GET** /requests/relay | Get requests via Relay +*RequestsApi* | [**remind_request**](docs/RequestsApi.md#remind_request) | **POST** /requests/{id}/remind | Send request reminder +*RequestsApi* | [**remind_request_reviewer**](docs/RequestsApi.md#remind_request_reviewer) | **POST** /requests/{id}/reviewers/{reviewer_id}/remind | Send reminder to a reviewer *ResourcesApi* | [**add_resource_nhi**](docs/ResourcesApi.md#add_resource_nhi) | **POST** /resources/{resource_id}/non-human-identities/{non_human_identity_id} | *ResourcesApi* | [**add_resource_user**](docs/ResourcesApi.md#add_resource_user) | **POST** /resources/{resource_id}/users/{user_id} | *ResourcesApi* | [**create_resource**](docs/ResourcesApi.md#create_resource) | **POST** /resources | +*ResourcesApi* | [**create_resource_custom_access_level**](docs/ResourcesApi.md#create_resource_custom_access_level) | **POST** /resources/{resource_id}/custom-access-levels | *ResourcesApi* | [**delete_resource**](docs/ResourcesApi.md#delete_resource) | **DELETE** /resources/{resource_id} | +*ResourcesApi* | [**delete_resource_custom_access_level**](docs/ResourcesApi.md#delete_resource_custom_access_level) | **DELETE** /resources/{resource_id}/custom-access-levels/{access_level_remote_id} | *ResourcesApi* | [**delete_resource_nhi**](docs/ResourcesApi.md#delete_resource_nhi) | **DELETE** /resources/{resource_id}/non-human-identities/{non_human_identity_id} | *ResourcesApi* | [**delete_resource_user**](docs/ResourcesApi.md#delete_resource_user) | **DELETE** /resources/{resource_id}/users/{user_id} | *ResourcesApi* | [**get_resource**](docs/ResourcesApi.md#get_resource) | **GET** /resources/{resource_id} | Get resource by ID +*ResourcesApi* | [**get_resource_access_levels**](docs/ResourcesApi.md#get_resource_access_levels) | **GET** /resources/{resource_id}/access_levels | Get resource access levels +*ResourcesApi* | [**get_resource_configuration_template**](docs/ResourcesApi.md#get_resource_configuration_template) | **GET** /resources/{resource_id}/configuration-template | Get the ID of the configuration template linked to a resource +*ResourcesApi* | [**get_resource_custom_access_levels**](docs/ResourcesApi.md#get_resource_custom_access_levels) | **GET** /resources/{resource_id}/custom-access-levels | *ResourcesApi* | [**get_resource_groups**](docs/ResourcesApi.md#get_resource_groups) | **GET** /resources/{resource_id}/groups | *ResourcesApi* | [**get_resource_message_channels**](docs/ResourcesApi.md#get_resource_message_channels) | **GET** /resources/{resource_id}/message-channels | *ResourcesApi* | [**get_resource_nhis**](docs/ResourcesApi.md#get_resource_nhis) | **GET** /resources/{resource_id}/non-human-identities | @@ -261,8 +315,14 @@ Class | Method | HTTP request | Description *ResourcesApi* | [**set_resource_reviewers**](docs/ResourcesApi.md#set_resource_reviewers) | **PUT** /resources/{resource_id}/reviewers | *ResourcesApi* | [**set_resource_scoped_role_permissions**](docs/ResourcesApi.md#set_resource_scoped_role_permissions) | **PUT** /resources/{resource_id}/scoped-role-permissions | *ResourcesApi* | [**set_resource_visibility**](docs/ResourcesApi.md#set_resource_visibility) | **PUT** /resources/{resource_id}/visibility | +*ResourcesApi* | [**update_resource_configuration_template**](docs/ResourcesApi.md#update_resource_configuration_template) | **PUT** /resources/{resource_id}/configuration-template | Set the ID of the configuration template linked to a resource +*ResourcesApi* | [**update_resource_custom_access_level**](docs/ResourcesApi.md#update_resource_custom_access_level) | **PATCH** /resources/{resource_id}/custom-access-levels/{access_level_remote_id} | *ResourcesApi* | [**update_resource_user**](docs/ResourcesApi.md#update_resource_user) | **PUT** /resources/{resource_id}/users/{user_id} | *ResourcesApi* | [**update_resources**](docs/ResourcesApi.md#update_resources) | **PUT** /resources | +*RoleAssignmentsApi* | [**add_role_assignments**](docs/RoleAssignmentsApi.md#add_role_assignments) | **POST** /role-assignments | Add role assignments +*RoleAssignmentsApi* | [**list_role_assignments**](docs/RoleAssignmentsApi.md#list_role_assignments) | **GET** /role-assignments | List role assignments +*RoleAssignmentsApi* | [**remove_role_assignments**](docs/RoleAssignmentsApi.md#remove_role_assignments) | **DELETE** /role-assignments | Remove role assignments +*ServiceUsersApi* | [**create_service_user**](docs/ServiceUsersApi.md#create_service_user) | **POST** /service-users | Create service user *SessionsApi* | [**sessions**](docs/SessionsApi.md#sessions) | **GET** /sessions | *TagsApi* | [**add_group_tag**](docs/TagsApi.md#add_group_tag) | **POST** /tags/{tag_id}/groups/{group_id} | *TagsApi* | [**add_resource_tag**](docs/TagsApi.md#add_resource_tag) | **POST** /tags/{tag_id}/resources/{resource_id} | @@ -275,14 +335,23 @@ Class | Method | HTTP request | Description *TagsApi* | [**remove_group_tag**](docs/TagsApi.md#remove_group_tag) | **DELETE** /tags/{tag_id}/groups/{group_id} | *TagsApi* | [**remove_resource_tag**](docs/TagsApi.md#remove_resource_tag) | **DELETE** /tags/{tag_id}/resources/{resource_id} | *TagsApi* | [**remove_user_tag**](docs/TagsApi.md#remove_user_tag) | **DELETE** /tags/{tag_id}/users/{user_id} | +*TokensApi* | [**create_token**](docs/TokensApi.md#create_token) | **POST** /tokens | Create token *TokensApi* | [**delete_token**](docs/TokensApi.md#delete_token) | **DELETE** /tokens/{token_id} | Delete token *TokensApi* | [**get_tokens**](docs/TokensApi.md#get_tokens) | **GET** /tokens | Get tokens *UarsApi* | [**create_uar**](docs/UarsApi.md#create_uar) | **POST** /uar | *UarsApi* | [**get_uar**](docs/UarsApi.md#get_uar) | **GET** /uar/{uar_id} | *UarsApi* | [**get_uars**](docs/UarsApi.md#get_uars) | **GET** /uars | +*UsersApi* | [**delete_user**](docs/UsersApi.md#delete_user) | **DELETE** /users/{user_id} | *UsersApi* | [**get_remote_users**](docs/UsersApi.md#get_remote_users) | **GET** /users/remote_users | +*UsersApi* | [**get_user_access**](docs/UsersApi.md#get_user_access) | **GET** /users/{user_id}/access | Get a user's access +*UsersApi* | [**get_user_by_id**](docs/UsersApi.md#get_user_by_id) | **GET** /users/{user_id} | Get user by ID *UsersApi* | [**get_user_tags**](docs/UsersApi.md#get_user_tags) | **GET** /users/{user_id}/tags | +*UsersApi* | [**get_user_whoami**](docs/UsersApi.md#get_user_whoami) | **GET** /users/whoami | *UsersApi* | [**get_users**](docs/UsersApi.md#get_users) | **GET** /users | +*UsersApi* | [**invite_user**](docs/UsersApi.md#invite_user) | **POST** /users | +*UsersApi* | [**reset_user_mfa**](docs/UsersApi.md#reset_user_mfa) | **POST** /users/{user_id}/mfa/reset | Reset a user's Opal MFA +*UsersApi* | [**revoke_all_user_access**](docs/UsersApi.md#revoke_all_user_access) | **POST** /users/{user_id}/revoke-all | Revoke all of a user's access +*UsersApi* | [**update_user**](docs/UsersApi.md#update_user) | **PATCH** /users/{user_id} | *UsersApi* | [**user**](docs/UsersApi.md#user) | **GET** /user | @@ -299,12 +368,29 @@ Class | Method | HTTP request | Description - [AddGroupUserRequest](docs/AddGroupUserRequest.md) - [AddResourceNhiRequest](docs/AddResourceNhiRequest.md) - [AddResourceUserRequest](docs/AddResourceUserRequest.md) + - [AddRoleAssignmentInput](docs/AddRoleAssignmentInput.md) + - [AddRoleAssignmentsEntry](docs/AddRoleAssignmentsEntry.md) + - [AddRoleAssignmentsRequest](docs/AddRoleAssignmentsRequest.md) + - [AddRoleAssignmentsResponse](docs/AddRoleAssignmentsResponse.md) + - [AgentActivityClientSetting](docs/AgentActivityClientSetting.md) + - [AgentActivityClientSettings](docs/AgentActivityClientSettings.md) + - [AgentActivityContentReport](docs/AgentActivityContentReport.md) + - [AgentActivityEvent](docs/AgentActivityEvent.md) + - [AgentActivityImages](docs/AgentActivityImages.md) + - [AgentActivityIngestRequest](docs/AgentActivityIngestRequest.md) + - [AgentActivityIngestResult](docs/AgentActivityIngestResult.md) + - [AgentActivityMcpServer](docs/AgentActivityMcpServer.md) + - [AgentActivityOpalMcpServer](docs/AgentActivityOpalMcpServer.md) + - [AgentActivityOpalReported](docs/AgentActivityOpalReported.md) + - [AgentKillSwitch](docs/AgentKillSwitch.md) + - [AnthropicInferenceHookVerdict](docs/AnthropicInferenceHookVerdict.md) - [ApiAccessLevelEnum](docs/ApiAccessLevelEnum.md) - [App](docs/App.md) - [AppTypeEnum](docs/AppTypeEnum.md) - [AppValidation](docs/AppValidation.md) - [AppValidationSeverityEnum](docs/AppValidationSeverityEnum.md) - [AppValidationStatusEnum](docs/AppValidationStatusEnum.md) + - [AppVisibilityInfo](docs/AppVisibilityInfo.md) - [ApproveRequest200Response](docs/ApproveRequest200Response.md) - [ApproveRequestRequest](docs/ApproveRequestRequest.md) - [AppsList](docs/AppsList.md) @@ -313,10 +399,31 @@ Class | Method | HTTP request | Description - [Bundle](docs/Bundle.md) - [BundleGroup](docs/BundleGroup.md) - [BundleResource](docs/BundleResource.md) + - [Campaign](docs/Campaign.md) + - [CampaignConfiguration](docs/CampaignConfiguration.md) + - [CampaignGroupAssetVisibilityPolicyEnum](docs/CampaignGroupAssetVisibilityPolicyEnum.md) + - [CampaignItem](docs/CampaignItem.md) + - [CampaignItemAdminOverride](docs/CampaignItemAdminOverride.md) + - [CampaignItemReview](docs/CampaignItemReview.md) + - [CampaignItemReviewDecisionEnum](docs/CampaignItemReviewDecisionEnum.md) + - [CampaignItemReviewResult](docs/CampaignItemReviewResult.md) + - [CampaignItemReviewerAssignment](docs/CampaignItemReviewerAssignment.md) + - [CampaignItemReviewerAssignmentSourceEnum](docs/CampaignItemReviewerAssignmentSourceEnum.md) + - [CampaignItemReviewerSourceRemoval](docs/CampaignItemReviewerSourceRemoval.md) + - [CampaignItemStatusEnum](docs/CampaignItemStatusEnum.md) + - [CampaignItemTargetTypeEnum](docs/CampaignItemTargetTypeEnum.md) + - [CampaignItemUnassignedPresetMessage](docs/CampaignItemUnassignedPresetMessage.md) + - [CampaignRevokeOnEnum](docs/CampaignRevokeOnEnum.md) + - [CampaignStatusEnum](docs/CampaignStatusEnum.md) + - [CancelRequestRequest](docs/CancelRequestRequest.md) - [Condition](docs/Condition.md) - [ConfigurationTemplate](docs/ConfigurationTemplate.md) + - [CreateAppInfo](docs/CreateAppInfo.md) - [CreateBundleInfo](docs/CreateBundleInfo.md) + - [CreateCampaignConfigurationInfo](docs/CreateCampaignConfigurationInfo.md) + - [CreateCampaignInfo](docs/CreateCampaignInfo.md) - [CreateConfigurationTemplateInfo](docs/CreateConfigurationTemplateInfo.md) + - [CreateCustomConnectorInfo](docs/CreateCustomConnectorInfo.md) - [CreateDelegationRequest](docs/CreateDelegationRequest.md) - [CreateEventStreamInfo](docs/CreateEventStreamInfo.md) - [CreateGroupBindingInfo](docs/CreateGroupBindingInfo.md) @@ -325,7 +432,10 @@ Class | Method | HTTP request | Description - [CreateIdpGroupMappingRequest](docs/CreateIdpGroupMappingRequest.md) - [CreateMessageChannelInfo](docs/CreateMessageChannelInfo.md) - [CreateOnCallScheduleInfo](docs/CreateOnCallScheduleInfo.md) + - [CreateOpalScriptInfo](docs/CreateOpalScriptInfo.md) - [CreateOwnerInfo](docs/CreateOwnerInfo.md) + - [CreatePaladinContextSourceInfo](docs/CreatePaladinContextSourceInfo.md) + - [CreatePaladinInfo](docs/CreatePaladinInfo.md) - [CreateRequest200Response](docs/CreateRequest200Response.md) - [CreateRequestCommentRequest](docs/CreateRequestCommentRequest.md) - [CreateRequestConfigurationInfoList](docs/CreateRequestConfigurationInfoList.md) @@ -334,15 +444,26 @@ Class | Method | HTTP request | Description - [CreateRequestInfoGroupsInner](docs/CreateRequestInfoGroupsInner.md) - [CreateRequestInfoResourcesInner](docs/CreateRequestInfoResourcesInner.md) - [CreateRequestInfoSupportTicket](docs/CreateRequestInfoSupportTicket.md) + - [CreateRequestTemplateInfo](docs/CreateRequestTemplateInfo.md) + - [CreateResourceCustomAccessLevelInfo](docs/CreateResourceCustomAccessLevelInfo.md) - [CreateResourceInfo](docs/CreateResourceInfo.md) + - [CreateServiceUserRequest](docs/CreateServiceUserRequest.md) - [CreateTagInfo](docs/CreateTagInfo.md) + - [CreateTokenInfo](docs/CreateTokenInfo.md) + - [CreateTokenResponse](docs/CreateTokenResponse.md) - [CreateUARInfo](docs/CreateUARInfo.md) + - [CustomConnectorAppConfig](docs/CustomConnectorAppConfig.md) + - [CustomConnectorIdpProtocolEnum](docs/CustomConnectorIdpProtocolEnum.md) - [Delegation](docs/Delegation.md) - [DenyRequestRequest](docs/DenyRequestRequest.md) + - [EntityAdminFilter](docs/EntityAdminFilter.md) + - [EntityDescriptionFilter](docs/EntityDescriptionFilter.md) - [EntityItemTypeEnum](docs/EntityItemTypeEnum.md) - [EntityNameFilter](docs/EntityNameFilter.md) - [EntityTagFilter](docs/EntityTagFilter.md) + - [EntityTagKeyFilter](docs/EntityTagKeyFilter.md) - [EntityTypeEnum](docs/EntityTypeEnum.md) + - [EscalateRequest200Response](docs/EscalateRequest200Response.md) - [Event](docs/Event.md) - [EventStream](docs/EventStream.md) - [EventStreamConnection](docs/EventStreamConnection.md) @@ -351,19 +472,35 @@ Class | Method | HTTP request | Description - [GetResourceUser200Response](docs/GetResourceUser200Response.md) - [Group](docs/Group.md) - [GroupAccessLevel](docs/GroupAccessLevel.md) + - [GroupAccessLevelList](docs/GroupAccessLevelList.md) - [GroupBinding](docs/GroupBinding.md) - [GroupBindingGroup](docs/GroupBindingGroup.md) + - [GroupConfigurationTemplate](docs/GroupConfigurationTemplate.md) - [GroupContainingGroup](docs/GroupContainingGroup.md) - [GroupContainingGroupList](docs/GroupContainingGroupList.md) + - [GroupMemberGroup](docs/GroupMemberGroup.md) + - [GroupMemberGroupList](docs/GroupMemberGroupList.md) - [GroupRemoteInfo](docs/GroupRemoteInfo.md) - [GroupRemoteInfoActiveDirectoryGroup](docs/GroupRemoteInfoActiveDirectoryGroup.md) + - [GroupRemoteInfoActivecampaignGroup](docs/GroupRemoteInfoActivecampaignGroup.md) + - [GroupRemoteInfoAhaTeam](docs/GroupRemoteInfoAhaTeam.md) + - [GroupRemoteInfoAsanaTeam](docs/GroupRemoteInfoAsanaTeam.md) - [GroupRemoteInfoAwsSsoGroup](docs/GroupRemoteInfoAwsSsoGroup.md) + - [GroupRemoteInfoAxiomGroup](docs/GroupRemoteInfoAxiomGroup.md) - [GroupRemoteInfoAzureAdMicrosoft365Group](docs/GroupRemoteInfoAzureAdMicrosoft365Group.md) - [GroupRemoteInfoAzureAdSecurityGroup](docs/GroupRemoteInfoAzureAdSecurityGroup.md) + - [GroupRemoteInfoBitwardenGroup](docs/GroupRemoteInfoBitwardenGroup.md) + - [GroupRemoteInfoBoxGroup](docs/GroupRemoteInfoBoxGroup.md) + - [GroupRemoteInfoCalendlyGroup](docs/GroupRemoteInfoCalendlyGroup.md) - [GroupRemoteInfoClickhouseRole](docs/GroupRemoteInfoClickhouseRole.md) + - [GroupRemoteInfoConfluenceGroup](docs/GroupRemoteInfoConfluenceGroup.md) - [GroupRemoteInfoConnectorGroup](docs/GroupRemoteInfoConnectorGroup.md) + - [GroupRemoteInfoCursorGroup](docs/GroupRemoteInfoCursorGroup.md) - [GroupRemoteInfoDatabricksAccountGroup](docs/GroupRemoteInfoDatabricksAccountGroup.md) + - [GroupRemoteInfoDatadogOnCallSchedule](docs/GroupRemoteInfoDatadogOnCallSchedule.md) - [GroupRemoteInfoDevinGroup](docs/GroupRemoteInfoDevinGroup.md) + - [GroupRemoteInfoDocusignGroup](docs/GroupRemoteInfoDocusignGroup.md) + - [GroupRemoteInfoDocusignSigningGroup](docs/GroupRemoteInfoDocusignSigningGroup.md) - [GroupRemoteInfoDuoGroup](docs/GroupRemoteInfoDuoGroup.md) - [GroupRemoteInfoGithubEnterpriseTeam](docs/GroupRemoteInfoGithubEnterpriseTeam.md) - [GroupRemoteInfoGithubTeam](docs/GroupRemoteInfoGithubTeam.md) @@ -372,19 +509,32 @@ Class | Method | HTTP request | Description - [GroupRemoteInfoGrafanaTeam](docs/GroupRemoteInfoGrafanaTeam.md) - [GroupRemoteInfoHubspotTeam](docs/GroupRemoteInfoHubspotTeam.md) - [GroupRemoteInfoIncidentioOnCallSchedule](docs/GroupRemoteInfoIncidentioOnCallSchedule.md) + - [GroupRemoteInfoJiraGroup](docs/GroupRemoteInfoJiraGroup.md) - [GroupRemoteInfoLdapGroup](docs/GroupRemoteInfoLdapGroup.md) + - [GroupRemoteInfoLinearTeam](docs/GroupRemoteInfoLinearTeam.md) - [GroupRemoteInfoOktaGroup](docs/GroupRemoteInfoOktaGroup.md) - [GroupRemoteInfoOktaGroupRule](docs/GroupRemoteInfoOktaGroupRule.md) + - [GroupRemoteInfoOneloginGroup](docs/GroupRemoteInfoOneloginGroup.md) + - [GroupRemoteInfoOneloginRole](docs/GroupRemoteInfoOneloginRole.md) - [GroupRemoteInfoPagerdutyOnCallSchedule](docs/GroupRemoteInfoPagerdutyOnCallSchedule.md) + - [GroupRemoteInfoRampDepartment](docs/GroupRemoteInfoRampDepartment.md) + - [GroupRemoteInfoRampLocation](docs/GroupRemoteInfoRampLocation.md) + - [GroupRemoteInfoRipplingSupergroup](docs/GroupRemoteInfoRipplingSupergroup.md) + - [GroupRemoteInfoRipplingTeam](docs/GroupRemoteInfoRipplingTeam.md) - [GroupRemoteInfoRootlyOnCallSchedule](docs/GroupRemoteInfoRootlyOnCallSchedule.md) - [GroupRemoteInfoSlackUserGroup](docs/GroupRemoteInfoSlackUserGroup.md) - [GroupRemoteInfoSnowflakeRole](docs/GroupRemoteInfoSnowflakeRole.md) + - [GroupRemoteInfoSquareJob](docs/GroupRemoteInfoSquareJob.md) + - [GroupRemoteInfoSquareLocation](docs/GroupRemoteInfoSquareLocation.md) + - [GroupRemoteInfoTableauGroup](docs/GroupRemoteInfoTableauGroup.md) - [GroupRemoteInfoTailscaleGroup](docs/GroupRemoteInfoTailscaleGroup.md) - [GroupRemoteInfoTwingateGroup](docs/GroupRemoteInfoTwingateGroup.md) - [GroupRemoteInfoTwingateGroupSynced](docs/GroupRemoteInfoTwingateGroupSynced.md) - [GroupRemoteInfoWorkdayUserSecurityGroup](docs/GroupRemoteInfoWorkdayUserSecurityGroup.md) + - [GroupRemoteInfoWrikeGroup](docs/GroupRemoteInfoWrikeGroup.md) - [GroupRemoteInfoZendeskGroup](docs/GroupRemoteInfoZendeskGroup.md) - [GroupRemoteInfoZendeskOrganization](docs/GroupRemoteInfoZendeskOrganization.md) + - [GroupRemoteInfoZoomGroup](docs/GroupRemoteInfoZoomGroup.md) - [GroupResource](docs/GroupResource.md) - [GroupResourceList](docs/GroupResourceList.md) - [GroupTypeEnum](docs/GroupTypeEnum.md) @@ -393,19 +543,41 @@ Class | Method | HTTP request | Description - [GroupWithAccessLevel](docs/GroupWithAccessLevel.md) - [IdpGroupMapping](docs/IdpGroupMapping.md) - [IdpGroupMappingList](docs/IdpGroupMappingList.md) + - [IdpStatusFilter](docs/IdpStatusFilter.md) + - [InviteUserInfo](docs/InviteUserInfo.md) + - [McpConfigPermission](docs/McpConfigPermission.md) + - [McpConfigPlugin](docs/McpConfigPlugin.md) + - [McpConfigReport](docs/McpConfigReport.md) + - [McpConfigReportResult](docs/McpConfigReportResult.md) + - [McpConfigReporter](docs/McpConfigReporter.md) + - [McpConfigServer](docs/McpConfigServer.md) + - [McpConfigSkill](docs/McpConfigSkill.md) + - [McpConfigSubagent](docs/McpConfigSubagent.md) - [MessageChannel](docs/MessageChannel.md) - [MessageChannelIDList](docs/MessageChannelIDList.md) - [MessageChannelList](docs/MessageChannelList.md) - [MessageChannelProviderEnum](docs/MessageChannelProviderEnum.md) + - [NameMatchType](docs/NameMatchType.md) - [OnCallSchedule](docs/OnCallSchedule.md) - [OnCallScheduleIDList](docs/OnCallScheduleIDList.md) - [OnCallScheduleList](docs/OnCallScheduleList.md) - [OnCallScheduleProviderEnum](docs/OnCallScheduleProviderEnum.md) + - [OpalAccessPathDetail](docs/OpalAccessPathDetail.md) + - [OpalAccessPathEdgeFilter](docs/OpalAccessPathEdgeFilter.md) + - [OpalAccessPathQueryBody](docs/OpalAccessPathQueryBody.md) + - [OpalAccessQuery](docs/OpalAccessQuery.md) + - [OpalAccessQueryResults](docs/OpalAccessQueryResults.md) + - [OpalAccessResultEdge](docs/OpalAccessResultEdge.md) + - [OpalAccessResultNode](docs/OpalAccessResultNode.md) - [OpalNodeQuery](docs/OpalNodeQuery.md) - [OpalNodeQueryBody](docs/OpalNodeQueryBody.md) - [OpalNodeQueryResults](docs/OpalNodeQueryResults.md) - [OpalQueryResultEdge](docs/OpalQueryResultEdge.md) - [OpalQueryResultNode](docs/OpalQueryResultNode.md) + - [OpalQueryResults](docs/OpalQueryResults.md) + - [OpalScript](docs/OpalScript.md) + - [OpalScriptList](docs/OpalScriptList.md) + - [OpalScriptTypeEnum](docs/OpalScriptTypeEnum.md) - [Owner](docs/Owner.md) - [PageInfo](docs/PageInfo.md) - [PaginatedAccessRulesList](docs/PaginatedAccessRulesList.md) @@ -413,6 +585,8 @@ Class | Method | HTTP request | Description - [PaginatedBundleGroupList](docs/PaginatedBundleGroupList.md) - [PaginatedBundleList](docs/PaginatedBundleList.md) - [PaginatedBundleResourceList](docs/PaginatedBundleResourceList.md) + - [PaginatedCampaignItemsList](docs/PaginatedCampaignItemsList.md) + - [PaginatedCampaignsList](docs/PaginatedCampaignsList.md) - [PaginatedConfigurationTemplateList](docs/PaginatedConfigurationTemplateList.md) - [PaginatedDelegationsList](docs/PaginatedDelegationsList.md) - [PaginatedEventList](docs/PaginatedEventList.md) @@ -420,15 +594,29 @@ Class | Method | HTTP request | Description - [PaginatedGroupsList](docs/PaginatedGroupsList.md) - [PaginatedOwnersList](docs/PaginatedOwnersList.md) - [PaginatedRemoteUsersList](docs/PaginatedRemoteUsersList.md) + - [PaginatedRequestTemplateList](docs/PaginatedRequestTemplateList.md) - [PaginatedResourcesList](docs/PaginatedResourcesList.md) + - [PaginatedRoleAssignmentsList](docs/PaginatedRoleAssignmentsList.md) - [PaginatedTagsList](docs/PaginatedTagsList.md) - [PaginatedTokensList](docs/PaginatedTokensList.md) - [PaginatedUARsList](docs/PaginatedUARsList.md) - [PaginatedUsersList](docs/PaginatedUsersList.md) + - [PaginatedViewerCampaignItemsList](docs/PaginatedViewerCampaignItemsList.md) + - [Paladin](docs/Paladin.md) + - [PaladinConnector](docs/PaladinConnector.md) + - [PaladinContextSource](docs/PaladinContextSource.md) + - [PaladinContextSourceKind](docs/PaladinContextSourceKind.md) + - [PaladinContextSourceList](docs/PaladinContextSourceList.md) + - [PaladinContextSourceProvider](docs/PaladinContextSourceProvider.md) + - [PaladinList](docs/PaladinList.md) - [PropagationStatus](docs/PropagationStatus.md) - [PropagationStatusEnum](docs/PropagationStatusEnum.md) - [RDSEngineEnum](docs/RDSEngineEnum.md) - [RemoteUser](docs/RemoteUser.md) + - [RemoveRoleAssignmentInput](docs/RemoveRoleAssignmentInput.md) + - [RemoveRoleAssignmentsEntry](docs/RemoveRoleAssignmentsEntry.md) + - [RemoveRoleAssignmentsRequest](docs/RemoveRoleAssignmentsRequest.md) + - [RemoveRoleAssignmentsResponse](docs/RemoveRoleAssignmentsResponse.md) - [Request](docs/Request.md) - [RequestApprovalEnum](docs/RequestApprovalEnum.md) - [RequestComment](docs/RequestComment.md) @@ -444,15 +632,28 @@ Class | Method | HTTP request | Description - [RequestReviewerStages](docs/RequestReviewerStages.md) - [RequestStage](docs/RequestStage.md) - [RequestStatusEnum](docs/RequestStatusEnum.md) + - [RequestTemplate](docs/RequestTemplate.md) + - [RequestTemplateCustomField](docs/RequestTemplateCustomField.md) + - [RequestTemplateCustomFieldCalloutMetadata](docs/RequestTemplateCustomFieldCalloutMetadata.md) + - [RequestTemplateCustomFieldInput](docs/RequestTemplateCustomFieldInput.md) + - [RequestTemplateCustomFieldMetadata](docs/RequestTemplateCustomFieldMetadata.md) + - [RequestTemplateCustomFieldMultiChoiceMetadata](docs/RequestTemplateCustomFieldMultiChoiceMetadata.md) - [RequestTemplateCustomFieldTypeEnum](docs/RequestTemplateCustomFieldTypeEnum.md) - [RequestedItem](docs/RequestedItem.md) - [Resource](docs/Resource.md) - [ResourceAccessLevel](docs/ResourceAccessLevel.md) + - [ResourceAccessLevelList](docs/ResourceAccessLevelList.md) - [ResourceAccessUser](docs/ResourceAccessUser.md) - [ResourceAccessUserList](docs/ResourceAccessUserList.md) + - [ResourceConfigurationTemplate](docs/ResourceConfigurationTemplate.md) + - [ResourceCustomAccessLevelList](docs/ResourceCustomAccessLevelList.md) + - [ResourceCustomAccessLevelResponse](docs/ResourceCustomAccessLevelResponse.md) - [ResourceNHI](docs/ResourceNHI.md) - [ResourceRemoteInfo](docs/ResourceRemoteInfo.md) + - [ResourceRemoteInfoAlicloudEcsInstance](docs/ResourceRemoteInfoAlicloudEcsInstance.md) + - [ResourceRemoteInfoAlicloudRamRole](docs/ResourceRemoteInfoAlicloudRamRole.md) - [ResourceRemoteInfoAnthropicWorkspace](docs/ResourceRemoteInfoAnthropicWorkspace.md) + - [ResourceRemoteInfoAsanaWorkspace](docs/ResourceRemoteInfoAsanaWorkspace.md) - [ResourceRemoteInfoAwsAccount](docs/ResourceRemoteInfoAwsAccount.md) - [ResourceRemoteInfoAwsEc2Instance](docs/ResourceRemoteInfoAwsEc2Instance.md) - [ResourceRemoteInfoAwsEksCluster](docs/ResourceRemoteInfoAwsEksCluster.md) @@ -461,6 +662,8 @@ Class | Method | HTTP request | Description - [ResourceRemoteInfoAwsPermissionSet](docs/ResourceRemoteInfoAwsPermissionSet.md) - [ResourceRemoteInfoAwsRdsCluster](docs/ResourceRemoteInfoAwsRdsCluster.md) - [ResourceRemoteInfoAwsRdsInstance](docs/ResourceRemoteInfoAwsRdsInstance.md) + - [ResourceRemoteInfoAxiomCustomRole](docs/ResourceRemoteInfoAxiomCustomRole.md) + - [ResourceRemoteInfoAxiomRole](docs/ResourceRemoteInfoAxiomRole.md) - [ResourceRemoteInfoAzureEnterpriseApp](docs/ResourceRemoteInfoAzureEnterpriseApp.md) - [ResourceRemoteInfoAzureEntraIdRole](docs/ResourceRemoteInfoAzureEntraIdRole.md) - [ResourceRemoteInfoAzureManagementGroup](docs/ResourceRemoteInfoAzureManagementGroup.md) @@ -474,18 +677,33 @@ Class | Method | HTTP request | Description - [ResourceRemoteInfoAzureSubscription](docs/ResourceRemoteInfoAzureSubscription.md) - [ResourceRemoteInfoAzureUserAssignedManagedIdentity](docs/ResourceRemoteInfoAzureUserAssignedManagedIdentity.md) - [ResourceRemoteInfoAzureVirtualMachine](docs/ResourceRemoteInfoAzureVirtualMachine.md) + - [ResourceRemoteInfoBitwardenOrganization](docs/ResourceRemoteInfoBitwardenOrganization.md) + - [ResourceRemoteInfoBoxEnterprise](docs/ResourceRemoteInfoBoxEnterprise.md) + - [ResourceRemoteInfoBoxFolder](docs/ResourceRemoteInfoBoxFolder.md) + - [ResourceRemoteInfoCalendlyEventType](docs/ResourceRemoteInfoCalendlyEventType.md) + - [ResourceRemoteInfoCalendlyRole](docs/ResourceRemoteInfoCalendlyRole.md) + - [ResourceRemoteInfoClickhouseConsoleRole](docs/ResourceRemoteInfoClickhouseConsoleRole.md) - [ResourceRemoteInfoClickhouseDatabase](docs/ResourceRemoteInfoClickhouseDatabase.md) - [ResourceRemoteInfoClickhouseTable](docs/ResourceRemoteInfoClickhouseTable.md) - [ResourceRemoteInfoCoupaRole](docs/ResourceRemoteInfoCoupaRole.md) - [ResourceRemoteInfoCursorOrganization](docs/ResourceRemoteInfoCursorOrganization.md) + - [ResourceRemoteInfoCursorOriginRepository](docs/ResourceRemoteInfoCursorOriginRepository.md) - [ResourceRemoteInfoCustomConnector](docs/ResourceRemoteInfoCustomConnector.md) - [ResourceRemoteInfoDatabricksAccountServicePrincipal](docs/ResourceRemoteInfoDatabricksAccountServicePrincipal.md) + - [ResourceRemoteInfoDatabricksCatalog](docs/ResourceRemoteInfoDatabricksCatalog.md) + - [ResourceRemoteInfoDatabricksFunction](docs/ResourceRemoteInfoDatabricksFunction.md) + - [ResourceRemoteInfoDatabricksModel](docs/ResourceRemoteInfoDatabricksModel.md) + - [ResourceRemoteInfoDatabricksSchema](docs/ResourceRemoteInfoDatabricksSchema.md) + - [ResourceRemoteInfoDatabricksService](docs/ResourceRemoteInfoDatabricksService.md) + - [ResourceRemoteInfoDatabricksVolume](docs/ResourceRemoteInfoDatabricksVolume.md) - [ResourceRemoteInfoDatadogRole](docs/ResourceRemoteInfoDatadogRole.md) - [ResourceRemoteInfoDatastaxAstraRole](docs/ResourceRemoteInfoDatastaxAstraRole.md) - [ResourceRemoteInfoDevinOrganization](docs/ResourceRemoteInfoDevinOrganization.md) - [ResourceRemoteInfoDevinRole](docs/ResourceRemoteInfoDevinRole.md) + - [ResourceRemoteInfoDocusignPermissionProfile](docs/ResourceRemoteInfoDocusignPermissionProfile.md) - [ResourceRemoteInfoGcpBigQueryDataset](docs/ResourceRemoteInfoGcpBigQueryDataset.md) - [ResourceRemoteInfoGcpBigQueryTable](docs/ResourceRemoteInfoGcpBigQueryTable.md) + - [ResourceRemoteInfoGcpBillingAccount](docs/ResourceRemoteInfoGcpBillingAccount.md) - [ResourceRemoteInfoGcpBucket](docs/ResourceRemoteInfoGcpBucket.md) - [ResourceRemoteInfoGcpComputeInstance](docs/ResourceRemoteInfoGcpComputeInstance.md) - [ResourceRemoteInfoGcpFolder](docs/ResourceRemoteInfoGcpFolder.md) @@ -505,44 +723,69 @@ Class | Method | HTTP request | Description - [ResourceRemoteInfoGrafanaRole](docs/ResourceRemoteInfoGrafanaRole.md) - [ResourceRemoteInfoHubspotRole](docs/ResourceRemoteInfoHubspotRole.md) - [ResourceRemoteInfoIlevelAdvancedRole](docs/ResourceRemoteInfoIlevelAdvancedRole.md) + - [ResourceRemoteInfoLinearOrganization](docs/ResourceRemoteInfoLinearOrganization.md) + - [ResourceRemoteInfoLinearProject](docs/ResourceRemoteInfoLinearProject.md) - [ResourceRemoteInfoNetsuiteRole](docs/ResourceRemoteInfoNetsuiteRole.md) - [ResourceRemoteInfoOktaApp](docs/ResourceRemoteInfoOktaApp.md) - [ResourceRemoteInfoOktaCustomRole](docs/ResourceRemoteInfoOktaCustomRole.md) - [ResourceRemoteInfoOktaStandardRole](docs/ResourceRemoteInfoOktaStandardRole.md) + - [ResourceRemoteInfoOneloginApp](docs/ResourceRemoteInfoOneloginApp.md) - [ResourceRemoteInfoOpenaiPlatformProject](docs/ResourceRemoteInfoOpenaiPlatformProject.md) - [ResourceRemoteInfoOpenaiPlatformServiceAccount](docs/ResourceRemoteInfoOpenaiPlatformServiceAccount.md) - [ResourceRemoteInfoOracleFusionRole](docs/ResourceRemoteInfoOracleFusionRole.md) - [ResourceRemoteInfoPagerdutyRole](docs/ResourceRemoteInfoPagerdutyRole.md) + - [ResourceRemoteInfoRampFund](docs/ResourceRemoteInfoRampFund.md) + - [ResourceRemoteInfoRampRole](docs/ResourceRemoteInfoRampRole.md) + - [ResourceRemoteInfoRipplingDepartment](docs/ResourceRemoteInfoRipplingDepartment.md) - [ResourceRemoteInfoSalesforcePermissionSet](docs/ResourceRemoteInfoSalesforcePermissionSet.md) - [ResourceRemoteInfoSalesforceProfile](docs/ResourceRemoteInfoSalesforceProfile.md) - [ResourceRemoteInfoSalesforceRole](docs/ResourceRemoteInfoSalesforceRole.md) + - [ResourceRemoteInfoSlackOrganization](docs/ResourceRemoteInfoSlackOrganization.md) + - [ResourceRemoteInfoSlackWorkspace](docs/ResourceRemoteInfoSlackWorkspace.md) - [ResourceRemoteInfoSnowflakeDatabase](docs/ResourceRemoteInfoSnowflakeDatabase.md) - [ResourceRemoteInfoSnowflakeSchema](docs/ResourceRemoteInfoSnowflakeSchema.md) - [ResourceRemoteInfoSnowflakeTable](docs/ResourceRemoteInfoSnowflakeTable.md) - [ResourceRemoteInfoTailscaleSsh](docs/ResourceRemoteInfoTailscaleSsh.md) - [ResourceRemoteInfoTeleportRole](docs/ResourceRemoteInfoTeleportRole.md) + - [ResourceRemoteInfoTrayOrganization](docs/ResourceRemoteInfoTrayOrganization.md) + - [ResourceRemoteInfoTrayWorkspace](docs/ResourceRemoteInfoTrayWorkspace.md) - [ResourceRemoteInfoTwingateResource](docs/ResourceRemoteInfoTwingateResource.md) + - [ResourceRemoteInfoVercelProject](docs/ResourceRemoteInfoVercelProject.md) + - [ResourceRemoteInfoVercelRole](docs/ResourceRemoteInfoVercelRole.md) - [ResourceRemoteInfoWorkdayRole](docs/ResourceRemoteInfoWorkdayRole.md) + - [ResourceRemoteInfoWrikeUserType](docs/ResourceRemoteInfoWrikeUserType.md) - [ResourceRemoteInfoZendeskRole](docs/ResourceRemoteInfoZendeskRole.md) + - [ResourceRemoteInfoZoomLicense](docs/ResourceRemoteInfoZoomLicense.md) + - [ResourceRemoteInfoZoomRole](docs/ResourceRemoteInfoZoomRole.md) - [ResourceTypeEnum](docs/ResourceTypeEnum.md) - [ResourceUser](docs/ResourceUser.md) - [ResourceUserAccessStatus](docs/ResourceUserAccessStatus.md) - [ResourceUserAccessStatusEnum](docs/ResourceUserAccessStatusEnum.md) - [ResourceWithAccessLevel](docs/ResourceWithAccessLevel.md) + - [ReviewCampaignItemDecisionInfo](docs/ReviewCampaignItemDecisionInfo.md) + - [ReviewCampaignItemsInfo](docs/ReviewCampaignItemsInfo.md) + - [ReviewCampaignItemsResponse](docs/ReviewCampaignItemsResponse.md) - [ReviewStageOperator](docs/ReviewStageOperator.md) - [ReviewerIDList](docs/ReviewerIDList.md) - [ReviewerStage](docs/ReviewerStage.md) + - [ReviewerStageEscalation](docs/ReviewerStageEscalation.md) - [ReviewerStageList](docs/ReviewerStageList.md) - [RiskSensitivityEnum](docs/RiskSensitivityEnum.md) + - [RoleAssignment](docs/RoleAssignment.md) + - [RoleAssignmentEntityTypeEnum](docs/RoleAssignmentEntityTypeEnum.md) - [RolePermissionNameEnum](docs/RolePermissionNameEnum.md) - [RolePermissionTargetTypeEnum](docs/RolePermissionTargetTypeEnum.md) - [RuleClauses](docs/RuleClauses.md) - [RuleConjunction](docs/RuleConjunction.md) - [RuleDisjunction](docs/RuleDisjunction.md) + - [RunOpalQueryRequest](docs/RunOpalQueryRequest.md) - [ScopedRolePermission](docs/ScopedRolePermission.md) - [ScopedRolePermissionList](docs/ScopedRolePermissionList.md) - [Session](docs/Session.md) - [SessionsList](docs/SessionsList.md) + - [SetAgentKillSwitchRequest](docs/SetAgentKillSwitchRequest.md) + - [SortDirectionEnum](docs/SortDirectionEnum.md) + - [StopCampaignRequest](docs/StopCampaignRequest.md) - [StringMatchType](docs/StringMatchType.md) - [SubEvent](docs/SubEvent.md) - [SyncError](docs/SyncError.md) @@ -560,7 +803,13 @@ Class | Method | HTTP request | Description - [UARReviewerAssignmentPolicyEnum](docs/UARReviewerAssignmentPolicyEnum.md) - [UARScope](docs/UARScope.md) - [UpdateAccessRuleInfo](docs/UpdateAccessRuleInfo.md) + - [UpdateAppInfo](docs/UpdateAppInfo.md) + - [UpdateCampaignConfigurationInfo](docs/UpdateCampaignConfigurationInfo.md) + - [UpdateCampaignInfo](docs/UpdateCampaignInfo.md) + - [UpdateCampaignItemReviewersInfo](docs/UpdateCampaignItemReviewersInfo.md) + - [UpdateCampaignItemReviewersResult](docs/UpdateCampaignItemReviewersResult.md) - [UpdateConfigurationTemplateInfo](docs/UpdateConfigurationTemplateInfo.md) + - [UpdateCustomConnectorInfo](docs/UpdateCustomConnectorInfo.md) - [UpdateEventStreamInfo](docs/UpdateEventStreamInfo.md) - [UpdateGroupBindingInfo](docs/UpdateGroupBindingInfo.md) - [UpdateGroupBindingInfoList](docs/UpdateGroupBindingInfoList.md) @@ -570,16 +819,30 @@ Class | Method | HTTP request | Description - [UpdateGroupUserRequest](docs/UpdateGroupUserRequest.md) - [UpdateIdpGroupMappingsRequest](docs/UpdateIdpGroupMappingsRequest.md) - [UpdateIdpGroupMappingsRequestMappingsInner](docs/UpdateIdpGroupMappingsRequestMappingsInner.md) + - [UpdateOpalScriptInfo](docs/UpdateOpalScriptInfo.md) - [UpdateOwnerInfo](docs/UpdateOwnerInfo.md) - [UpdateOwnerInfoList](docs/UpdateOwnerInfoList.md) + - [UpdatePaladinInfo](docs/UpdatePaladinInfo.md) + - [UpdateRequestTemplateInfo](docs/UpdateRequestTemplateInfo.md) + - [UpdateResourceCustomAccessLevelInfo](docs/UpdateResourceCustomAccessLevelInfo.md) - [UpdateResourceInfo](docs/UpdateResourceInfo.md) - [UpdateResourceInfoList](docs/UpdateResourceInfoList.md) - [UpdateResourceUserRequest](docs/UpdateResourceUserRequest.md) + - [UpdateUserInfo](docs/UpdateUserInfo.md) - [User](docs/User.md) + - [UserAccess](docs/UserAccess.md) + - [UserAccessEntityTypeEnum](docs/UserAccessEntityTypeEnum.md) + - [UserAccessLevel](docs/UserAccessLevel.md) + - [UserAccessList](docs/UserAccessList.md) - [UserAttributeSelector](docs/UserAttributeSelector.md) - [UserHrIdpStatusEnum](docs/UserHrIdpStatusEnum.md) - [UserIDList](docs/UserIDList.md) - [UserList](docs/UserList.md) + - [UserProductRoleEnum](docs/UserProductRoleEnum.md) + - [ViewerCampaignItem](docs/ViewerCampaignItem.md) + - [ViewerCampaignItemReviewDecisionEnum](docs/ViewerCampaignItemReviewDecisionEnum.md) + - [ViewerCampaignItemSortFieldEnum](docs/ViewerCampaignItemSortFieldEnum.md) + - [ViewerCampaignItemStatusEnum](docs/ViewerCampaignItemStatusEnum.md) - [VisibilityInfo](docs/VisibilityInfo.md) - [VisibilityTypeEnum](docs/VisibilityTypeEnum.md) - [WebhookApiKeyCredential](docs/WebhookApiKeyCredential.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index b1418bc..1df7dc3 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -16,10 +16,14 @@ servers: tags: - name: access-rules description: Operations related to access rules + - name: agent-activity + description: Operations related to agent activity telemetry - name: apps description: Operations related to apps - name: bundles description: Operations related to bundles + - name: campaigns + description: Operations related to access review campaigns - name: configuration-templates description: Operations related to configuration templates - name: delegations @@ -42,12 +46,21 @@ tags: description: Operations related to on-call schedules - name: opal-queries description: Operations related to OpalQuery + - name: opal-scripts + description: Operations related to OpalScripts - name: owners description: Operations related to owners - name: requests description: Operations related to requests - name: resources description: Operations related to resources + - name: role-assignments + description: Operations related to role assignments (general grants between an entity and a principal) + - name: paladin + description: Operations related to Paladin + - name: service-users + description: Operations related to service users (non-human identities owned by a team) + - name: sessions description: Operations related to sessions - name: tags @@ -55,10 +68,324 @@ tags: - name: tokens description: Operations related to API tokens - name: uars - description: Operations related to UARs + description: Operations related to UARs. Deprecated in favor of the `campaigns` API. - name: users description: Operations related to users paths: + /agent-activity: + post: + summary: Report agent activity + description: >- + **Prototype (AG-285).** Reports activity observed by an agent runtime on a + developer's machine - today, Claude Code hook events. + + + This is **telemetry from cooperating machines, not attestation**. Opal can only + see what a configured, consenting client chooses to send, cannot verify that a + fleet is configured at all, and has no way to detect a machine that is reporting + nothing. Absence of activity for an agent therefore means "nothing was reported", + never "the agent did nothing". + + + The request body is either a batch envelope (`{"events": [...]}`), a bare JSON + array of events, or a single raw Claude Code hook payload - the last so a hook can + POST here directly with no relay in between. + + + The bearer token establishes the **organization** and nothing finer. No field in + the payload is treated as an identity claim Opal trusts: the actor headers below + are used for best-effort attribution and display only. Events that cannot be + attributed to an agent are retained and surfaced as unattributed activity rather + than dropped. + operationId: reportAgentActivity + parameters: + - description: >- + The identity the reporting client claims this activity belongs to - an email or + an Anthropic user id. **Unverified**: a Claude Code hook payload contains no + user identity, so this has to be injected by whoever deploys the hook (via the + http handler's `headers` map and `allowedEnvVars` interpolation), and whoever + controls the machine controls the header. Used only when the API key itself does + not identify a developer. When the email belongs to a person in the organization, + that person is recorded as who the activity was reported for (always as a claim), + and the activity is attributed to the one Claude agent they own, if they own + exactly one. The API key's own email is never treated this way: a key belongs to + whoever created it, which with a shared key is not who is at the keyboard. + Omitting it is valid. When an event's `opal_reported` object carries other emails, + Opal also tries them, in the order `configured_email`, `claude_account_email`, + `git_email`, after this header and skipping any that repeat it. The first one that + resolves to an agent wins. + explode: false + in: header + name: X-Opal-Actor + required: false + schema: + type: string + style: simple + - description: >- + The name of the machine that sent this request, as that machine reports it + (`hostname -s`). **Unverified**: two machines can share a name, and whoever + controls the machine controls the header. Stored with each event, so a reader can + tell which machine reported it. When an event's own `opal_reported.hostname` + names a different machine, this header wins and the body's value is kept beside + it. Omitting it is valid. + explode: false + in: header + name: X-Opal-Host + required: false + schema: + type: string + style: simple + - description: >- + `1` when the sender collects conversation content: the prompt of a + `UserPromptSubmit` event, the `tool_response` of a `PostToolUse` event and the + `last_assistant_message` of a `Stop` or `SubagentStop` event. Without it (or an + event's own `opal_content`) those fields are read and discarded, as before. An + `http` hook sets it in its `headers` map, because it cannot change the payload. + Opal stores the content only when the organization stores content as well. + explode: false + in: header + name: X-Opal-Content + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AgentActivityIngestRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AgentActivityIngestResult" + description: >- + A per-batch accounting of what was accepted, stored, and attributed. An organization + that has agent activity turned off gets a 200 with an empty body for every body + shape, so a sender does not keep the events and try again. + "400": + description: The body was unparseable, empty, or carried more events than one request may. + "413": + description: The request body exceeded the maximum accepted size. + security: + - BearerAuth: [] + tags: + - agent-activity + /agent-activity/client-settings: + get: + summary: Get agent activity client settings + description: >- + **Prototype.** Returns how a client that reports agent activity (today, the + Claude Code hook kit on a developer's machine) should send batched events for this + organization: the minimum gap between two sends from one machine, the most events and + bytes one request to `/agent-activity` may carry, the request rate to stay under, and + how long the answer may be cached. + + + The rate is derived from the organization's own rate limit for `POST /agent-activity`, + which every client in the organization shares: the clients that asked for these + settings in the last cache period or two share half of it evenly, and the checks + before tool calls keep the other half. A check before a tool call is not batched and + should not be held back by this rate. A client is counted by its `X-Opal-Host` and + `X-Opal-Actor` headers, so it should send the same ones it sends to `/agent-activity`. + + + A client should ask for these at most once per `cache_seconds`, and keep using its + last answer, or its own defaults, when it cannot get one. + operationId: getAgentActivityClientSettings + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AgentActivityClientSettings" + description: The settings for this organization. + "403": + description: Agent activity ingest is not enabled for this organization. + security: + - BearerAuth: [] + tags: + - agent-activity + /agent-activity/mcp-config: + post: + summary: Report MCP server configuration + description: >- + **Prototype.** Reports the MCP servers configured in Claude Code on one + developer's machine, as the Opal hook kit read them: user-level and per-project + servers in `~/.claude.json`, a project's `.mcp.json`, `managed-mcp.json`, and servers + a plugin provides when they can be found. + + + For each server the kit sends its name, the scope it was configured in, its + transport, and either its URL (`http`, `sse`) or a hash of its command's shape + (`stdio`). It never sends environment values, headers or command arguments, which can + hold secrets. Opal adds each server to the organization's MCP server registry and + records that this person has it configured. Nothing on the machine is changed. + + + Like `/agent-activity`, this is **telemetry from cooperating machines**: the identity + and the list are what the machine says. The bearer token establishes the organization + and nothing finer. + operationId: reportMcpConfig + parameters: + - description: >- + The identity the reporting client claims - an email, or an operating-system user + name. **Unverified**, used the same way as on `/agent-activity`. + explode: false + in: header + name: X-Opal-Actor + required: false + schema: + type: string + style: simple + - description: >- + The name of the machine that sent the report, as that machine reports it + (`hostname -s`). **Unverified.** A server this machine listed before and this report + leaves out is marked removed for the reporting person, unless another of their machines + still lists it. Omitting it is valid: the reports without one count as one machine. + explode: false + in: header + name: X-Opal-Host + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/McpConfigReport" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/McpConfigReportResult" + description: How many servers were read and recorded. + "400": + description: The body was unparseable, or carried more servers than one report may. + "403": + description: The MCP server registry is not enabled for this organization. + "413": + description: The request body exceeded the maximum accepted size. + security: + - BearerAuth: [] + tags: + - agent-activity + /inference-hooks/anthropic: + post: + summary: Anthropic inference hook verdict + description: >- + **Prototype (AG-336).** The AI security server endpoint for Anthropic Inference hooks. + Anthropic POSTs each governed frame here and waits for an allow or deny verdict. + Configure it in claude.ai with this URL and a custom `Authorization: Bearer ` + request header. + + + `tool_call` frames are evaluated against the organization's runtime policy rules. One + verdict covers every tool call in the frame. Every other frame type, including `prompt`, is + allowed without inspection. Any non-200 response is a webhook failure, so the + organization's Anthropic failure-handling setting decides the outcome. + + + Once the organization saves its Anthropic signing secret in Opal, a `tool_call` frame must + carry a valid Standard Webhooks signature (`webhook-id`, `webhook-timestamp`, + `webhook-signature`), or it is answered with a 401. + operationId: anthropicInferenceHook + requestBody: + content: + application/json: + schema: + additionalProperties: true + type: object + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnthropicInferenceHookVerdict" + description: The verdict for the frame. + "401": + description: The frame is unsigned or its signature does not verify. Anthropic applies the organization's failure handling. + "500": + description: The frame could not be evaluated. Anthropic applies the organization's failure handling. + security: + - BearerAuth: [] + tags: + - agent-activity + /agent-kill-switch: + get: + summary: Get the agent kill switch + description: >- + **Prototype (AG-297).** Returns whether agent tool calls are currently being denied + for this organization, and the activation that is in force or that last was. + + + `active` is evaluated against the clock on every read, so an activation past its + `expires_at` reads as inactive without anything having swept it. + operationId: getAgentKillSwitch + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AgentKillSwitch" + description: The current state of the kill switch. + "403": + description: + The caller is not an admin, or the agent kill switch is not enabled for this + organization. + security: + - BearerAuth: [] + tags: + - agent-activity + put: + summary: Set the agent kill switch + description: >- + **Prototype (AG-297).** Turns the org-level agent kill switch on or off. Admin only. + + + While it is on, Opal answers every `PreToolUse` hook POST to `/agent-activity` with + a `deny` decision, so a cooperating Claude Code client stops running tools. + + + **It is not a security boundary, and it fails open.** It reaches only clients that + are configured to POST to `/agent-activity` and that honour the answer; a client on + a non-default base URL, an older build, or with no hook deployed is unaffected. If + Opal is unreachable or slow the tool call proceeds, because Claude Code treats a + failed `PreToolUse` hook as a non-blocking error by design. + + + Activation is always time-bound: `duration_minutes` is capped, and an activation + that reaches `expires_at` stops denying on its own. + operationId: setAgentKillSwitch + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SetAgentKillSwitchRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AgentKillSwitch" + description: The state of the kill switch after the change. + "400": + description: The body was unparseable, or `duration_minutes` was out of range. + "403": + description: + The caller is not an admin, or the agent kill switch is not enabled for this + organization. + security: + - BearerAuth: [] + tags: + - agent-activity /apps: get: summary: Get apps @@ -99,6 +426,34 @@ paths: - BearerAuth: [] tags: - apps + post: + summary: Create app + description: |- + Creates an `App` in Opal. Currently supports only Push-only apps (`CUSTOM`) + and Custom Connector apps (`CUSTOM_CONNECTOR`). + operationId: createApp + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateAppInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/App" + description: The app that was created. + "400": + description: | + Invalid request body — for example, `visibility_group_ids` is + non-empty while `visibility` is `GLOBAL`, an unsupported `app_type`, + or a missing/invalid `custom_connector` configuration. + security: + - BearerAuth: [] + tags: + - apps /apps/{app_id}: get: summary: Get app by ID @@ -126,6 +481,161 @@ paths: - BearerAuth: [] tags: - apps + put: + summary: Update app + description: |- + Updates an `App`. Currently supports only Push-only apps (`CUSTOM`) and + Custom Connector apps (`CUSTOM_CONNECTOR`). + operationId: updateApp + parameters: + - description: The ID of the app. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: app_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateAppInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/App" + description: The updated app. + "400": + description: | + Invalid request body — for example, `visibility_group_ids` is + non-empty while the effective visibility is `GLOBAL` (either + explicitly on this request or already stored on the app), or a + `custom_connector` field is invalid for this app type. + security: + - BearerAuth: [] + tags: + - apps + delete: + summary: Delete app + description: |- + Deletes an `App`. Currently supports only Push-only apps (`CUSTOM`) and + Custom Connector apps (`CUSTOM_CONNECTOR`). Matches the UI: soft-deletes + the app and cleans up its resources, groups, and users. + operationId: deleteApp + parameters: + - description: The ID of the app. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: app_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: The app was successfully deleted. + security: + - BearerAuth: [] + tags: + - apps + /apps/{app_id}/visibility: + get: + summary: Get app visibility + description: Returns the visibility of this app. + operationId: getAppVisibility + parameters: + - description: The ID of the app. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: false + in: path + name: app_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AppVisibilityInfo" + description: The visibility info of this app. + "400": + description: + This endpoint only supports apps whose type is managed via + `POST /v1/apps` and `PATCH /v1/apps/{id}` (`CUSTOM`, `OPAL_*`, + and similar). Discovery-sourced app types (for example + `AWS_SSO`) are rejected with 400. + "403": + description: The caller is not authorized to view this app's visibility. + "404": + description: The app was not found. + security: + - BearerAuth: [] + tags: + - apps + put: + summary: Set app visibility + description: |- + Sets the visibility of this app. Preferred over setting + `visibility` / `visibility_group_ids` / `import_visibility` inline on + `POST /apps` or `PATCH /apps/{app_id}` for drift-sensitive callers + (Terraform, GitOps). Semantics are a replace, not a merge: + `visibility_group_ids` is written to exactly what the request sends + (an omitted or empty array clears all groups), and `import_visibility` + is updated only when present. + operationId: setAppVisibility + parameters: + - description: The ID of the app. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: false + in: path + name: app_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/AppVisibilityInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AppVisibilityInfo" + description: The updated visibility info of this app. + "400": + description: | + Invalid request body or app state. Returned for any of: + a malformed JSON body, an unknown field, an invalid `visibility` + or `import_visibility` enum value, a `visibility_group_ids` entry + that does not resolve to a group in the caller's org, a + `visibility_group_ids` value that is non-empty while the effective + `visibility` is `GLOBAL` (either sent on this request or already + stored on the app), or an app whose type does not support + visibility writes (only `CUSTOM` and `CUSTOM_CONNECTOR` do). + "403": + description: The caller is not authorized to edit this app's visibility. + "404": + description: The app was not found. + security: + - BearerAuth: [] + tags: + - apps /bundles: get: summary: Get bundles @@ -598,164 +1108,313 @@ paths: - BearerAuth: [] tags: - bundles - /configuration-templates: + /campaigns: get: - description: Returns a list of `ConfigurationTemplate` objects. - operationId: getConfigurationTemplates - responses: + description: Returns a list of `Campaign` objects. + operationId: getCampaigns + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + - description: Campaign name to filter by. Returns campaigns whose names contain this substring (case-insensitive). + example: Q3 Access Review + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Filter by campaign status. Status is derived from lifecycle timestamps and review progress. + example: ONGOING + explode: true + in: query + name: status + required: false + schema: + $ref: "#/components/schemas/CampaignStatusEnum" + style: form + - description: Include campaigns created after this timestamp (exclusive). ISO 8601 format. + example: 2026-01-01T00:00:00Z + explode: true + in: query + name: created_at_after + required: false + schema: + type: string + format: date-time + style: form + - description: Include campaigns created before this timestamp (exclusive). ISO 8601 format. + example: 2026-12-31T23:59:59Z + explode: true + in: query + name: created_at_before + required: false + schema: + type: string + format: date-time + style: form + - description: Include campaigns started after this timestamp (exclusive). ISO 8601 format. + example: 2026-01-01T00:00:00Z + explode: true + in: query + name: started_at_after + required: false + schema: + type: string + format: date-time + style: form + - description: Include campaigns started before this timestamp (exclusive). ISO 8601 format. + example: 2026-12-31T23:59:59Z + explode: true + in: query + name: started_at_before + required: false + schema: + type: string + format: date-time + style: form + - description: Include campaigns ended after this timestamp (exclusive). ISO 8601 format. + example: 2026-01-01T00:00:00Z + explode: true + in: query + name: ended_at_after + required: false + schema: + type: string + format: date-time + style: form + - description: Include campaigns ended before this timestamp (exclusive). ISO 8601 format. + example: 2026-12-31T23:59:59Z + explode: true + in: query + name: ended_at_before + required: false + schema: + type: string + format: date-time + style: form + - description: Include campaigns stopped after this timestamp (exclusive). ISO 8601 format. + example: 2026-01-01T00:00:00Z + explode: true + in: query + name: stopped_at_after + required: false + schema: + type: string + format: date-time + style: form + - description: Include campaigns stopped before this timestamp (exclusive). ISO 8601 format. + example: 2026-12-31T23:59:59Z + explode: true + in: query + name: stopped_at_before + required: false + schema: + type: string + format: date-time + style: form + responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PaginatedConfigurationTemplateList" - description: One page worth of configuration templates for your organization. + $ref: "#/components/schemas/PaginatedCampaignsList" + description: A list of campaigns for your organization. security: - BearerAuth: [] tags: - - configuration-templates + - campaigns post: - description: Creates a configuration template. - operationId: createConfigurationTemplate + description: | + Creates a campaign. Campaign scope only supports direct access edges: + `configuration.query.edgeFilter.directOnly` defaults to `true`, is + always stored as `true`, and passing `false` returns 400. + operationId: createCampaign requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/CreateConfigurationTemplateInfo" + $ref: "#/components/schemas/CreateCampaignInfo" responses: - "200": + "201": + description: The campaign successfully created. content: application/json: schema: - $ref: "#/components/schemas/ConfigurationTemplate" - description: The configuration template just created. + $ref: "#/components/schemas/Campaign" security: - BearerAuth: [] tags: - - configuration-templates - put: - description: Update a configuration template. - operationId: updateConfigurationTemplate + - campaigns + /campaigns/{campaign_id}: + get: + summary: Get campaign by ID + description: Returns a `Campaign` object. + operationId: getCampaign + parameters: + - description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + explode: true + in: path + name: campaign_id + required: true + schema: + format: uuid + type: string + style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/ConfigurationTemplate" - description: The configuration template just updated. - requestBody: - description: Configuration template to be updated - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateConfigurationTemplateInfo" + $ref: "#/components/schemas/Campaign" + description: The requested `Campaign`. security: - BearerAuth: [] tags: - - configuration-templates - /configuration-templates/{configuration_template_id}: - delete: - description: Deletes a configuration template. - operationId: deleteConfigurationTemplate + - campaigns + put: + summary: Update campaign + description: | + Partially updates a campaign. Omitted fields are left unchanged. + `configuration.query` and `configuration.reviewer_assignment_policy` + cannot be updated after create; including either field returns 400. + `configuration.cron_expression` and + `configuration.recurring_duration_days` may only be set on template + campaigns; setting them on a one-off campaign returns 400. + `configuration.is_template` is immutable and not accepted on update. + Configuration updates on a stopped or ended (non-template) campaign + return 400. Name-only updates are still allowed. + operationId: updateCampaign parameters: - - description: The ID of the configuration template. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + explode: true in: path - name: configuration_template_id + name: campaign_id required: true schema: format: uuid type: string style: simple - responses: - "200": - description: The configuration template was successfully deleted. - security: - - BearerAuth: [] - tags: - - configuration-templates - /event-streams: - get: - summary: Get event streams - description: Returns a list of configured event streaming connections for your organization. - operationId: getEventStreams + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateCampaignInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/EventStreamList" - description: A list of event streams for your organization. + $ref: "#/components/schemas/Campaign" + description: The updated `Campaign`. security: - BearerAuth: [] tags: - - event-streams + - campaigns + /campaigns/{campaign_id}/start: post: - summary: Create event stream - description: Creates a new event streaming connection. - operationId: createEventStream - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/CreateEventStreamInfo" + summary: Start campaign + description: | + Starts a draft campaign immediately, setting `started_at` and + `started_by_user_id`. Returns 400 if the campaign is not in draft + state, or if it is a recurring template (`is_template: true`) — + templates spawn draft campaigns on their schedule and cannot be + started directly. + operationId: startCampaign + parameters: + - description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + explode: true + in: path + name: campaign_id + required: true + schema: + format: uuid + type: string + style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/EventStream" - description: The event stream just created. Credentials are returned in clear text only on creation. + $ref: "#/components/schemas/Campaign" + description: The started `Campaign`. security: - BearerAuth: [] tags: - - event-streams - /event-streams/{event_stream_id}: - put: - summary: Update event stream - description: Updates an existing event streaming connection. - operationId: updateEventStream + - campaigns + /campaigns/{campaign_id}/stop: + post: + summary: Stop campaign + description: | + Stops an ongoing campaign immediately, setting `stopped_at` and + `stopped_by_user_id`. Returns 400 if the campaign has not started or + has already stopped. + operationId: stopCampaign parameters: - - description: The ID of the event stream. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + explode: true in: path - name: event_stream_id + name: campaign_id required: true schema: format: uuid type: string style: simple requestBody: - required: true + required: false content: application/json: schema: - $ref: "#/components/schemas/UpdateEventStreamInfo" + $ref: "#/components/schemas/StopCampaignRequest" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/EventStream" - description: The updated event stream. + $ref: "#/components/schemas/Campaign" + description: The stopped `Campaign`. security: - BearerAuth: [] tags: - - event-streams - delete: - summary: Delete event stream - description: Deletes an event streaming connection. - operationId: deleteEventStream + - campaigns + /campaigns/{campaign_id}/end: + post: + summary: End campaign + description: | + Ends a stopped campaign, setting `ended_at` and `ended_by_user_id`, + applying pending access changes, and queuing report generation. + Returns 400 unless the campaign is started and stopped and not already + ended. + operationId: endCampaign parameters: - - description: The ID of the event stream. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + explode: true in: path - name: event_stream_id + name: campaign_id required: true schema: format: uuid @@ -763,151 +1422,228 @@ paths: style: simple responses: "200": - description: The event stream was successfully deleted. + content: + application/json: + schema: + $ref: "#/components/schemas/Campaign" + description: The ended `Campaign`. security: - BearerAuth: [] tags: - - event-streams - /events: + - campaigns + /campaigns/{campaign_id}/items: get: - description: Returns a list of `Event` objects. - operationId: events + summary: List campaign items + description: | + Returns a paginated list of review items for a campaign — the same rows + shown on the admin Reviews tab. Status is derived using the same rules + as the UI Status column. Soft-deleted role assignments are still + returned with `is_target_deleted: true`. + operationId: getCampaignItems parameters: - - description: A start date filter for the events. - examples: - withDate: - summary: Example with date - value: 2021-11-01 - withDatetime: - summary: Example with date and time in ISO 8601 datetime format. - value: 2025-01-01T00:00:00Z + - description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + explode: true + in: path + name: campaign_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true in: query - name: start_date_filter + name: cursor required: false schema: type: string style: form - - description: An end date filter for the events. - examples: - withDate: - summary: Example with date - value: 2021-11-12 - withDatetime: - summary: Example with date and time in ISO 8601 datetime format. - value: 2025-01-01T00:00:00Z + - description: | + Number of results to return per page. Default is 200; maximum is + 500 (the campaign-items list cap). + example: 200 explode: true in: query - name: end_date_filter + name: page_size required: false schema: - type: string + type: integer + maximum: 500 style: form - - description: An actor filter for the events. Supply the ID of the actor. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + - description: | + Filter by derived item status. When multiple values are provided, + items matching any status are returned (OR). explode: true in: query - name: actor_filter + name: statuses required: false schema: - format: uuid - type: string + items: + $ref: "#/components/schemas/CampaignItemStatusEnum" + type: array style: form - - description: An object filter for the events. Supply the ID of the object. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + - description: Restrict to items assigned to this reviewer user ID. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 explode: true in: query - name: object_filter + name: reviewer_user_id required: false schema: format: uuid type: string style: form - - description: An event type filter for the events. - example: USER_MFA_RESET + - description: When true, restrict to items with no reviewer assigned. explode: true in: query - name: event_type_filter + name: unassigned required: false schema: - type: string + type: boolean style: form - - description: - An API filter for the events. Supply the name and preview of the - API token. - example: fullaccess:**************************M_g== + - description: | + Case-insensitive search over principal name, asset name, and + reviewer name. explode: true in: query - name: api_token_filter + name: search required: false schema: type: string style: form - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedCampaignItemsList" + description: A page of campaign items. + "404": + description: Campaign not found. + security: + - BearerAuth: [] + tags: + - campaigns + /campaigns/{campaign_id}/item-reviewers: + post: + summary: Update campaign item reviewers + description: | + Atomically assigns and unassigns reviewers on campaign items in one + request. All `campaign_item_id`s must belong to `{campaign_id}`. + Existing assign pairs are ignored; missing unassign pairs are skipped. + Completed reviews (`decided_at` set) are never removed. + Requires settings-edit permission. Returns 400 if the campaign has ended. + operationId: updateCampaignItemReviewers + parameters: + - description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 explode: true - in: query - name: cursor - required: false + in: path + name: campaign_id + required: true schema: + format: uuid type: string - style: form - - description: Number of results to return per page. Default is 200. - example: 200 - explode: true - in: query - name: page_size - required: false - schema: - type: integer - maximum: 1000 - style: form + style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateCampaignItemReviewersInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PaginatedEventList" - description: One page worth of events with the appropriate filters applied. + $ref: "#/components/schemas/UpdateCampaignItemReviewersResult" + description: Reviews for all referenced items after the update. + "400": + description: | + Invalid input, items not in this campaign, campaign ended, + or self-review violation. + "403": + description: Missing settings-edit permission. + "404": + description: Campaign or one or more campaign items not found. security: - BearerAuth: [] tags: - - events - /events/{event_id}: - get: - summary: Get event by ID - description: Returns an `Event` object. - operationId: getEvent + - campaigns + /campaigns/{campaign_id}/reviews: + post: + summary: Submit campaign item review decisions + description: | + Submits one or more review decisions for campaign item reviews assigned + to the authenticated user. Mirrors the GraphQL `reviewCampaignItems` + mutation. + + Each decision targets a `campaign_item_review_id` that must belong to + this campaign and be assigned to the caller. Supported decisions are + `APPROVED`, `REVOKED`, `CHANGE_ROLE`, and `REASSIGNED`. + + For `CHANGE_ROLE`, `access_level_remote_id` is required. For + `REASSIGNED`, either supply `new_reviewer_user_ids` (manual) or an + `assignment_source` preset (`PRINCIPAL_MANAGER` / `ASSET_ADMIN_OWNER`). + Reassignment also requires the campaign configuration flag + `allow_reviewer_reassignment` to be enabled. + + When the campaign uses `revoke_on: ACTION`, `REVOKED` decisions revoke + access immediately. + operationId: reviewCampaignItems parameters: - - description: The ID of the event. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + - description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 explode: true in: path - name: event_id + name: campaign_id required: true schema: format: uuid type: string style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ReviewCampaignItemsInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/Event" - description: The requested `Event`. - "404": - description: Event not found. + $ref: "#/components/schemas/ReviewCampaignItemsResponse" + description: The updated campaign item reviews. security: - BearerAuth: [] tags: - - events - /groups: + - campaigns + /campaigns/{campaign_id}/viewer-items: get: - summary: Get groups - description: Returns a list of groups for your organization. - operationId: getGroups + summary: List viewer campaign items + description: | + Returns a paginated list of campaign review items assigned to the + current authenticated viewer. Matches GraphQL `Campaign.viewerItems`. + + Campaign access matches `GET /campaigns/{campaign_id}` and GraphQL + `campaign(id)`: the caller must have access-review read permission or + be a reviewer on the campaign. Otherwise the request fails with 403 + (same as get-by-id). Item rows are still scoped to the caller's own + reviews (empty page when the caller is an admin but not a reviewer). + operationId: getCampaignViewerItems parameters: + - description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + explode: true + in: path + name: campaign_id + required: true + schema: + format: uuid + type: string + style: simple - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true @@ -917,7 +1653,9 @@ paths: schema: type: string style: form - - description: Number of results to return per page. Default is 200. + - description: | + Number of results to return per page. Default is 200; maximum is + 500. example: 200 explode: true in: query @@ -925,141 +1663,166 @@ paths: required: false schema: type: integer - maximum: 1000 + maximum: 500 style: form - - description: The group type to filter by. - example: OPAL_GROUP + - description: | + Sort by. Omit to sort by created_at. explode: true in: query - name: group_type_filter + name: sort_field required: false schema: - $ref: "#/components/schemas/GroupTypeEnum" + $ref: "#/components/schemas/ViewerCampaignItemSortFieldEnum" style: form - - description: The group ids to filter by. - example: - - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - - 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false + - description: Sort direction. + explode: true in: query - name: group_ids + name: sort_direction + required: false + schema: + $ref: "#/components/schemas/SortDirectionEnum" + style: form + - description: | + Filter by review status. When multiple values are provided, + items matching any status are returned (OR). + explode: true + in: query + name: statuses + required: false + schema: + items: + $ref: "#/components/schemas/ViewerCampaignItemStatusEnum" + type: array + style: form + - description: Filter by access level name. + explode: true + in: query + name: access_level_names required: false schema: items: - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid type: string type: array style: form - - description: Group name. - example: example-name + - description: Filter by principal ID. explode: true in: query - name: group_name + name: principal_ids required: false schema: - type: string + items: + format: uuid + type: string + type: array style: form - - description: - The IDs of the tags to filter by. Returns only groups that have any - of these tags applied. + - description: Filter by entity ID. + explode: true in: query - name: tag_ids + name: entity_ids required: false schema: + items: + format: uuid + type: string type: array + style: form + - description: Filter to specific campaign item review IDs. + explode: true + in: query + name: item_ids + required: false + schema: items: format: uuid type: string + type: array + style: form + - description: Restrict to items in this AI-suggestion bucket. + explode: true + in: query + name: ai_bucket_id + required: false + schema: + format: uuid + type: string + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PaginatedGroupsList" - description: One page worth groups associated with your organization. + $ref: "#/components/schemas/PaginatedViewerCampaignItemsList" + description: A page of viewer campaign items. security: - BearerAuth: [] tags: - - groups - put: - description: Bulk updates a list of groups. - operationId: updateGroups - requestBody: - description: Groups to be updated - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateGroupInfoList" + - campaigns + /configuration-templates: + get: + description: Returns a list of `ConfigurationTemplate` objects. + operationId: getConfigurationTemplates responses: "200": content: application/json: schema: - $ref: "#/components/schemas/UpdateGroupInfoList" - description: The resulting updated group infos. + $ref: "#/components/schemas/PaginatedConfigurationTemplateList" + description: One page worth of configuration templates for your organization. security: - BearerAuth: [] tags: - - groups + - configuration-templates post: - description: Creates an Opal group or [imports a remote - group](https://docs.opal.dev/reference/end-system-objects). - operationId: createGroup + description: Creates a configuration template. + operationId: createConfigurationTemplate requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/CreateGroupInfo" + $ref: "#/components/schemas/CreateConfigurationTemplateInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/Group" - description: The group just created. + $ref: "#/components/schemas/ConfigurationTemplate" + description: The configuration template just created. security: - BearerAuth: [] tags: - - groups - /groups/{group_id}: - get: - summary: Get group by ID - description: Returns a `Group` object. - operationId: getGroup - parameters: - - description: The ID of the group. - example: 32acc112-21ff-4669-91c2-21e27683eaa1 - explode: true - in: path - name: group_id - required: true - schema: - format: uuid - type: string - style: simple + - configuration-templates + put: + description: Update a configuration template. + operationId: updateConfigurationTemplate responses: "200": content: application/json: schema: - $ref: "#/components/schemas/Group" - description: The requested `Group`. + $ref: "#/components/schemas/ConfigurationTemplate" + description: The configuration template just updated. + requestBody: + description: Configuration template to be updated + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateConfigurationTemplateInfo" security: - BearerAuth: [] tags: - - groups + - configuration-templates + /configuration-templates/{configuration_template_id}: delete: - description: Deletes a group. - operationId: delete_group + description: Deletes a configuration template. + operationId: deleteConfigurationTemplate parameters: - - description: The ID of the group. + - description: The ID of the configuration template. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: group_id + name: configuration_template_id required: true schema: format: uuid @@ -1067,107 +1830,59 @@ paths: style: simple responses: "200": - description: The group was successfully deleted. + description: The configuration template was successfully deleted. security: - BearerAuth: [] tags: - - groups - /groups/{group_id}/message-channels: + - configuration-templates + /event-streams: get: - description: Gets the list of audit and reviewer message channels attached to a group. - operationId: get_group_message_channels - parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: group_id - required: true - schema: - format: uuid - type: string - style: simple + summary: Get event streams + description: Returns a list of configured event streaming connections for your organization. + operationId: getEventStreams responses: "200": content: application/json: schema: - $ref: "#/components/schemas/MessageChannelList" - description: The audit and reviewer message channels attached to the group. + $ref: "#/components/schemas/EventStreamList" + description: A list of event streams for your organization. security: - BearerAuth: [] tags: - - groups - put: - description: Sets the list of audit message channels attached to a group. - operationId: set_group_message_channels - parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: group_id - required: true - schema: - format: uuid - type: string - style: simple + - event-streams + post: + summary: Create event stream + description: Creates a new event streaming connection. + operationId: createEventStream requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/MessageChannelIDList" - responses: - "200": - content: - application/json: - schema: - items: - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid - type: string - type: array - description: The updated audit message channel IDs for the group. - security: - - BearerAuth: [] - tags: - - groups - /groups/{group_id}/on-call-schedules: - get: - description: Gets the list of on call schedules attached to a group. - operationId: get_group_on_call_schedules - parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: group_id - required: true - schema: - format: uuid - type: string - style: simple + $ref: "#/components/schemas/CreateEventStreamInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/OnCallScheduleList" - description: The on call schedules attached to the group. + $ref: "#/components/schemas/EventStream" + description: The event stream just created. Credentials are returned in clear text only on creation. security: - BearerAuth: [] tags: - - groups + - event-streams + /event-streams/{event_stream_id}: put: - description: Sets the list of on call schedules attached to a group. - operationId: set_group_on_call_schedules + summary: Update event stream + description: Updates an existing event streaming connection. + operationId: updateEventStream parameters: - - description: The ID of the group. + - description: The ID of the event stream. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: group_id + name: event_stream_id required: true schema: format: uuid @@ -1178,32 +1893,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/OnCallScheduleIDList" + $ref: "#/components/schemas/UpdateEventStreamInfo" responses: "200": content: application/json: schema: - items: - example: bb0197c0-5ea5-45d9-b3b7-b6c439be6435 - format: uuid - type: string - type: array - description: The updated on call schedule IDs for the group. + $ref: "#/components/schemas/EventStream" + description: The updated event stream. security: - BearerAuth: [] tags: - - groups - /groups/{group_id}/resources: - get: - description: Gets the list of resources that the group gives access to. - operationId: get_group_resources + - event-streams + delete: + summary: Delete event stream + description: Deletes an event streaming connection. + operationId: deleteEventStream parameters: - - description: The ID of the group. + - description: The ID of the event stream. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: group_id + name: event_stream_id required: true schema: format: uuid @@ -1211,270 +1922,314 @@ paths: style: simple responses: "200": - content: - application/json: - schema: - $ref: "#/components/schemas/GroupResourceList" - description: The resources that the group gives access to. + description: The event stream was successfully deleted. security: - BearerAuth: [] tags: - - groups - put: - description: Sets the list of resources that the group gives access to. - operationId: set_group_resources + - event-streams + /events: + get: + description: Returns a list of `Event` objects. + operationId: events parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: group_id - required: true + - description: A start date filter for the events. + examples: + withDate: + summary: Example with date + value: 2021-11-01 + withDatetime: + summary: Example with date and time in ISO 8601 datetime format. + value: 2025-01-01T00:00:00Z + explode: true + in: query + name: start_date_filter + required: false + schema: + type: string + style: form + - description: An end date filter for the events. + examples: + withDate: + summary: Example with date + value: 2021-11-12 + withDatetime: + summary: Example with date and time in ISO 8601 datetime format. + value: 2025-01-01T00:00:00Z + explode: true + in: query + name: end_date_filter + required: false + schema: + type: string + style: form + - description: An actor filter for the events. Supply the ID of the actor. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: true + in: query + name: actor_filter + required: false schema: format: uuid type: string - style: simple - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateGroupResourcesInfo" - responses: - "200": - description: The group resource were successfully set. - security: - - BearerAuth: [] - tags: - - groups - /groups/{group_id}/containing-groups: - get: - summary: Get nested groups - description: Gets the list of groups that the group gives access to. - operationId: get_group_containing_groups - parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: group_id - required: true + style: form + - description: An object filter for the events. Supply the ID of the object. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: true + in: query + name: object_filter + required: false schema: format: uuid type: string - style: simple - - description: The access level's remote ID to filter by. - example: arn:aws:iam::590304332660:role/AdministratorAccess + style: form + - description: An event type filter for the events. + example: USER_MFA_RESET explode: true in: query - name: access_level_remote_id + name: event_type_filter required: false schema: type: string style: form - + - description: + An API filter for the events. Supply the name and preview of the + API token. + example: fullaccess:**************************M_g== + explode: true + in: query + name: api_token_filter + required: false + schema: + type: string + style: form + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GroupContainingGroupList" - description: The groups that the group gives access to. + $ref: "#/components/schemas/PaginatedEventList" + description: One page worth of events with the appropriate filters applied. security: - BearerAuth: [] tags: - - groups - post: - description: Creates a new containing group. - operationId: add_group_containing_group + - events + /events/{event_id}: + get: + summary: Get event by ID + description: Returns an `Event` object. + operationId: getEvent parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The ID of the event. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: true in: path - name: group_id + name: event_id required: true schema: format: uuid type: string style: simple - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GroupContainingGroup" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GroupContainingGroup" - description: The created `GroupContainingGroup` object. + $ref: "#/components/schemas/Event" + description: The requested `Event`. + "404": + description: Event not found. security: - BearerAuth: [] tags: - - groups - /groups/{group_id}/containing-groups/{containing_group_id}: + - events + /groups: get: - summary: Get nested group by ID - description: Gets a specific containing group for a group. - operationId: get_group_containing_group - parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: group_id - required: true + summary: Get groups + description: Returns a list of groups for your organization. + operationId: getGroups + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false schema: - format: uuid type: string - style: simple - - description: The ID of the containing group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: containing_group_id - required: true + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false schema: - format: uuid - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/GroupContainingGroup" - description: The created `GroupContainingGroup` object. - security: - - BearerAuth: [] - tags: - - groups - delete: - description: Removes a containing group from a group. - operationId: remove_group_containing_group - parameters: - - description: The ID of the member group to remove. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: group_id - required: true + type: integer + maximum: 1000 + style: form + - description: >- + The group type to filter by. Required when remote_id is provided. + example: OPAL_GROUP + explode: true + in: query + name: group_type_filter + required: false schema: - format: uuid - type: string - style: simple - - description: The ID of the containing group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + $ref: "#/components/schemas/GroupTypeEnum" + style: form + - description: The group ids to filter by. + example: + - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + - 1b978423-db0a-4037-a4cf-f79c60cb67b3 explode: false - in: path - name: containing_group_id - required: true + in: query + name: group_ids + required: false schema: - format: uuid - type: string - style: simple - - description: The remote ID of the member group's access level to filter by. - example: arn:aws:iam::590304332660:role/AdministratorAccess + items: + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + type: array + style: form + - description: >- + Filter groups by name. Matches against both `name` and `remote_name`. + Matching is case-insensitive. Use `group_name_match` to choose the + match type; when omitted, CONTAINS (substring) is used. + example: example-name explode: true in: query - name: access_level_remote_id + name: group_name required: false schema: type: string style: form - - responses: - "204": - description: The member group was successfully removed from the containing group. - security: - - BearerAuth: [] - tags: - - groups - /groups/{group_id}/resources/{resource_id}: - post: - description: Adds a resource to a group. - operationId: add_group_resource - parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: group_id - required: true + - description: >- + How to apply `group_name`. Requires `group_name` to be set. Defaults + to CONTAINS when `group_name` is provided without this parameter. + explode: true + in: query + name: group_name_match + required: false schema: - format: uuid - type: string - style: simple - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: resource_id - required: true + $ref: "#/components/schemas/NameMatchType" + style: form + - description: >- + Filter groups by their remote id. Returns groups whose remote id + matches the provided value exactly. Requires group_type_filter. + Remote ids are only unique within a connection, so groups from + different connections can share a remote id and more than one group + may be returned. Unmanaged groups are not returned. + explode: true + in: query + name: remote_id + required: false schema: - format: uuid type: string - style: simple + style: form - description: - The remote ID of the access level to grant to this user. If - omitted, the default access level remote ID value (empty string) is - used. - example: arn:aws:iam::590304332660:role/AdministratorAccess + The IDs of the tags to filter by. Returns only groups that have any + of these tags applied. + in: query + name: tag_ids + required: false + schema: + type: array + items: + format: uuid + type: string + - description: + If true, only return groups that allow access requests. Does not check + whether the caller is permitted to request the group. + example: true explode: true in: query - name: access_level_remote_id + name: requestable required: false schema: - type: string + type: boolean style: form - deprecated: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedGroupsList" + description: One page worth groups associated with your organization. + security: + - BearerAuth: [] + tags: + - groups + put: + description: Bulk updates a list of groups. + operationId: updateGroups requestBody: - required: false + description: Groups to be updated + required: true content: application/json: schema: - example: - access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess - duration_minutes: 60 - properties: - access_level_remote_id: - description: - The remote ID of the access level to grant to this user. If - omitted, the default access level remote ID value (empty - string) is used. - example: arn:aws:iam::590304332660:role/AdministratorAccess - type: string - duration_minutes: - description: - The duration for which the resource can be accessed (in minutes). - Use 0 to set to indefinite. - example: 60 - type: integer - maximum: 525960 # One year - minimum: 0 - type: object + $ref: "#/components/schemas/UpdateGroupInfoList" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GroupResource" - description: The created `GroupResource` object. + $ref: "#/components/schemas/UpdateGroupInfoList" + description: The resulting updated group infos. security: - BearerAuth: [] tags: - groups - /groups/{group_id}/visibility: + post: + description: Creates an Opal group or [imports a remote + group](https://docs.opal.dev/reference/end-system-objects). + operationId: createGroup + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateGroupInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Group" + description: The group just created. + security: + - BearerAuth: [] + tags: + - groups + /groups/{group_id}: get: - description: Gets the visibility of this group. - operationId: get_group_visibility + summary: Get group by ID + description: Returns a `Group` object. + operationId: getGroup parameters: - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true in: path name: group_id required: true @@ -1487,15 +2242,15 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/VisibilityInfo" - description: The visibility info of this group. + $ref: "#/components/schemas/Group" + description: The requested `Group`. security: - BearerAuth: [] tags: - groups - put: - description: Sets the visibility of this group. - operationId: set_group_visibility + delete: + description: Deletes a group. + operationId: delete_group parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 @@ -1507,30 +2262,33 @@ paths: format: uuid type: string style: simple - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/VisibilityInfo" responses: "200": - content: - application/json: - schema: - $ref: "#/components/schemas/VisibilityInfo" - description: The visibility info of this group. + description: The group was successfully deleted. security: - BearerAuth: [] tags: - groups - /groups/{group_id}/reviewers: + /groups/{group_id}/configuration-template: get: - deprecated: true - description: Gets the list of owner IDs of the reviewers for a group. - operationId: get_group_reviewers + summary: Get the ID of the configuration template linked to a group + description: | + Returns the ID of the configuration template that the group is currently + linked to. The response body is + `{"configuration_template_id": "" | null}`: + + * `` is the ID of the configuration template the group is linked to. + * `null` means the group is not linked to any configuration template + and uses its own private configuration. + + This endpoint only exposes the link between a group and a configuration + template — it does not return the template's own fields (name, + description, request configurations, visibility, etc.). To read those, + call `GET /configuration-templates/{configuration_template_id}` with the + ID returned here. + operationId: get_group_configuration_template parameters: - - description: The ID of the group. + - description: The ID of the group whose configuration template link is being read. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path @@ -1545,20 +2303,110 @@ paths: content: application/json: schema: - items: - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid - type: string - type: array - description: The IDs of owners that are reviewers for this group. + $ref: "#/components/schemas/GroupConfigurationTemplate" + description: The ID of the configuration template currently linked to the group, or `null` if the group uses its own private configuration. + "403": + description: The caller is not authorized to view this group. + "404": + description: The group was not found. security: - BearerAuth: [] tags: - groups put: - deprecated: true - description: Sets the list of reviewers for a group. - operationId: set_group_reviewers + summary: Set the ID of the configuration template linked to a group + description: | + Attaches, repoints, or detaches the configuration template linked to a + group. This endpoint only manages the link (by ID) between a group and + an existing configuration template — it does not create, modify, or + delete the template itself. To manage a template's own fields (name, + description, request configurations, visibility, etc.), use the + `/configuration-templates` endpoints. + + The request body is `{"configuration_template_id": "" | null}`: + + * A `` value links the group to the configuration template with + that ID. If the group was previously linked to a different + template, the group is repointed in place. + * `null` detaches the group from its current configuration template. + The template is deep-copied into a new private configuration with + the same settings so the group's current behaviour is preserved, + and the group is repointed at the fork. + + The `configuration_template_id` field is required. Sending `{}` or any + body in which the field is omitted is rejected with `400`. + + The call is idempotent: if the request body matches the group's current + link, no changes are made and no audit events are emitted. + + This endpoint is the preferred, Terraform-friendly surface for linking + and unlinking configuration templates on groups. The equivalent + `configuration_template_id` field on `PUT /groups` remains available + but is deprecated for this purpose. + operationId: update_group_configuration_template + parameters: + - description: The ID of the group whose configuration template link is being set. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: group_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GroupConfigurationTemplate" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GroupConfigurationTemplate" + description: The ID of the configuration template now linked to the group, or `null` if the group was detached. + "400": + description: The request body was malformed, the required `configuration_template_id` field was omitted, or the target `configuration_template_id` does not reference a configuration template. + "403": + description: The caller is not authorized to update this group. + "404": + description: The group was not found. + security: + - BearerAuth: [] + tags: + - groups + /groups/{group_id}/message-channels: + get: + description: Gets the list of audit and reviewer message channels attached to a group. + operationId: get_group_message_channels + parameters: + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: group_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/MessageChannelList" + description: The audit and reviewer message channels attached to the group. + security: + - BearerAuth: [] + tags: + - groups + put: + description: Sets the list of audit message channels attached to a group. + operationId: set_group_message_channels parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 @@ -1575,7 +2423,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ReviewerIDList" + $ref: "#/components/schemas/MessageChannelIDList" responses: "200": content: @@ -1586,16 +2434,15 @@ paths: format: uuid type: string type: array - description: The updated IDs of owners that are reviewers for this group + description: The updated audit message channel IDs for the group. security: - BearerAuth: [] tags: - groups - /groups/{group_id}/reviewer-stages: + /groups/{group_id}/on-call-schedules: get: - deprecated: true - description: Gets the list of reviewer stages for a group. - operationId: get_group_reviewer_stages + description: Gets the list of on call schedules attached to a group. + operationId: get_group_on_call_schedules parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 @@ -1612,19 +2459,15 @@ paths: content: application/json: schema: - description: A list of reviewer stages. - items: - $ref: "#/components/schemas/ReviewerStage" - type: array - description: The reviewer stages for this group. + $ref: "#/components/schemas/OnCallScheduleList" + description: The on call schedules attached to the group. security: - BearerAuth: [] tags: - groups put: - deprecated: true - description: Sets the list of reviewer stages for a group. - operationId: set_group_reviewer_stages + description: Sets the list of on call schedules attached to a group. + operationId: set_group_on_call_schedules parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 @@ -1641,29 +2484,33 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ReviewerStageList" + $ref: "#/components/schemas/OnCallScheduleIDList" responses: "200": content: application/json: schema: - description: A list of reviewer stages. items: - $ref: "#/components/schemas/ReviewerStage" + example: bb0197c0-5ea5-45d9-b3b7-b6c439be6435 + format: uuid + type: string type: array - description: The updated reviewer stages for this group. + description: The updated on call schedule IDs for the group. security: - BearerAuth: [] tags: - groups - /groups/{group_id}/tags: + /groups/{group_id}/access_levels: get: - description: Returns all tags applied to the group. - operationId: get_group_tags + summary: Get group access levels + description: + Returns the list of access levels defined for the group. Groups that + only offer default (unnamed) access return an empty list. + operationId: get_group_access_levels parameters: - - description: The ID of the group whose tags to return. + - description: The ID of the group whose access levels to return. name: group_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path required: true @@ -1676,16 +2523,18 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/TagsList" - description: The tags applied to the group. + $ref: "#/components/schemas/GroupAccessLevelList" + description: The access levels defined for the group. + "404": + description: Group not found. security: - BearerAuth: [] tags: - groups - /groups/{group_id}/users: + /groups/{group_id}/resources: get: - description: Gets the list of users for this group. - operationId: get_group_users + description: Gets the list of resources that the group gives access to. + operationId: get_group_resources parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 @@ -1697,43 +2546,24 @@ paths: format: uuid type: string style: simple - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - - description: Number of results to return per page. Default is 200. - example: 200 - explode: true - in: query - name: page_size - required: false - schema: - type: integer - maximum: 1000 - style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GroupUserList" - description: List of users with access to this group. + $ref: "#/components/schemas/GroupResourceList" + description: The resources that the group gives access to. security: - BearerAuth: [] tags: - groups - /groups/{group_id}/users/{user_id}: put: - description: Updates a user's access level or duration in this group. - operationId: update_group_user + description: Sets the list of resources that the group gives access to. + operationId: set_group_resources parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false in: path name: group_id required: true @@ -1741,53 +2571,24 @@ paths: format: uuid type: string style: simple - - description: The ID of the user whose access is being updated. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 - in: path - name: user_id - required: true - schema: - format: uuid - type: string - style: simple requestBody: required: true content: application/json: schema: - type: object - example: - duration_minutes: 60 - access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess - properties: - duration_minutes: - description: - The updated duration for which the group can be accessed (in - minutes). Use 0 for indefinite, or a negative value to - revoke access. - type: integer - maximum: 525960 # One year - example: 120 - access_level_remote_id: - description: The updated remote ID of the access level granted to this user. - type: string - example: arn:aws:iam::590304332660:role/ReadOnlyAccess - required: - - duration_minutes + $ref: "#/components/schemas/UpdateGroupResourcesInfo" responses: "200": - description: The GroupUser was successfully updated. - content: - application/json: - schema: - $ref: "#/components/schemas/GroupUser" + description: The group resource were successfully set. security: - BearerAuth: [] tags: - groups - post: - description: Adds a user to this group. - operationId: add_group_user + /groups/{group_id}/groups: + get: + summary: Get member groups + description: Gets the list of groups that are nested directly in the group (its member groups). + operationId: get_group_groups parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 @@ -1799,33 +2600,38 @@ paths: format: uuid type: string style: simple - - description: The ID of the user to add. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GroupMemberGroupList" + description: The groups nested directly in the group. + "403": + description: The caller is not authorized to view this group. + "404": + description: The group was not found. + security: + - BearerAuth: [] + tags: + - groups + /groups/{group_id}/containing-groups: + get: + summary: Get nested groups + description: Gets the list of groups that the group gives access to. + operationId: get_group_containing_groups + parameters: + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: user_id + name: group_id required: true schema: format: uuid type: string style: simple - - description: - The duration for which the group can be accessed (in minutes). Use - 0 to set to indefinite. - example: 60 - explode: true - in: query - name: duration_minutes - required: false - schema: - type: integer - maximum: 525960 # One year - style: form - deprecated: true - - description: - The remote ID of the access level to grant to this user. If - omitted, the default access level remote ID value (empty string) is - used. + - description: The access level's remote ID to filter by. example: arn:aws:iam::590304332660:role/AdministratorAccess explode: true in: query @@ -1834,46 +2640,21 @@ paths: schema: type: string style: form - deprecated: true - requestBody: - required: false - content: - application/json: - schema: - example: - duration_minutes: 60 - access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess - properties: - duration_minutes: - description: - The duration for which the group can be accessed (in minutes). Use - 0 to set to indefinite. - example: 60 - type: integer - access_level_remote_id: - description: - The remote ID of the access level to grant to this user. If - omitted, the default access level remote ID value (empty - string) is used. - example: arn:aws:iam::590304332660:role/AdministratorAccess - type: string - required: - - duration_minutes - type: object + responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GroupUser" - description: The GroupUser that was created. - security: + $ref: "#/components/schemas/GroupContainingGroupList" + description: The groups that the group gives access to. + security: - BearerAuth: [] tags: - groups - delete: - description: Removes a user's access from this group. - operationId: delete_group_user + post: + description: Creates a new containing group. + operationId: add_group_containing_group parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 @@ -1885,163 +2666,185 @@ paths: format: uuid type: string style: simple - - description: The ID of a user to remove from this group. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GroupContainingGroup" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GroupContainingGroup" + description: The created `GroupContainingGroup` object. + security: + - BearerAuth: [] + tags: + - groups + /groups/{group_id}/containing-groups/{containing_group_id}: + get: + summary: Get nested group by ID + description: Gets a specific containing group for a group. + operationId: get_group_containing_group + parameters: + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: user_id + name: group_id required: true schema: format: uuid type: string style: simple - - description: - The remote ID of the access level for which this user has direct - access. If omitted, the default access level remote ID value (empty - string) is assumed. - example: 30 - explode: true - in: query - name: access_level_remote_id - required: false + - description: The ID of the containing group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: containing_group_id + required: true schema: + format: uuid type: string - style: form + style: simple responses: "200": - description: This user's access was successfully removed from this group. + content: + application/json: + schema: + $ref: "#/components/schemas/GroupContainingGroup" + description: The created `GroupContainingGroup` object. security: - BearerAuth: [] tags: - groups - /groups/users/{user_id}: - get: - description: Returns all groups that the user is a member of. - operationId: get_user_groups + delete: + description: Removes a containing group from a group. + operationId: remove_group_containing_group parameters: - - description: The ID of the user whose groups to return. - name: user_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + - description: The ID of the member group to remove. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path + name: group_id required: true schema: format: uuid type: string style: simple - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true - in: query - name: cursor - required: false + - description: The ID of the containing group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: containing_group_id + required: true schema: + format: uuid type: string - style: form - - description: Number of results to return per page. Default is 200. - example: 200 + style: simple + - description: The remote ID of the member group's access level to filter by. + example: arn:aws:iam::590304332660:role/AdministratorAccess explode: true in: query - name: page_size + name: access_level_remote_id required: false schema: - type: integer - maximum: 1000 + type: string style: form + responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/GroupUserList" - description: The groups that the user is a member of. + "204": + description: The member group was successfully removed from the containing group. security: - BearerAuth: [] tags: - groups - /group-bindings: - get: - summary: Get group bindings - description: Returns a list of `GroupBinding` objects. - operationId: getGroupBindings + /groups/{group_id}/resources/{resource_id}: + post: + description: Adds a resource to a group. + operationId: add_group_resource parameters: - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true - in: query - name: cursor - required: false + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: group_id + required: true schema: + format: uuid type: string - style: form - - description: Number of results to return per page. Default is 200. - example: 200 + style: simple + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: + The remote ID of the access level to grant to this user. If + omitted, the default access level remote ID value (empty string) is + used. + example: arn:aws:iam::590304332660:role/AdministratorAccess explode: true in: query - name: page_size + name: access_level_remote_id + required: false schema: - type: integer - maximum: 1000 + type: string style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/PaginatedGroupBindingsList" - description: One page worth of group bindings for your organization. - security: - - BearerAuth: [] - tags: - - group-bindings - post: - description: Creates a group binding. - operationId: createGroupBinding + deprecated: true requestBody: - required: true + required: false content: application/json: schema: - $ref: "#/components/schemas/CreateGroupBindingInfo" + example: + access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess + duration_minutes: 60 + properties: + access_level_remote_id: + description: + The remote ID of the access level to grant to this user. If + omitted, the default access level remote ID value (empty + string) is used. + example: arn:aws:iam::590304332660:role/AdministratorAccess + type: string + duration_minutes: + description: + The duration for which the resource can be accessed (in minutes). + Use 0 to set to indefinite. + example: 60 + type: integer + maximum: 153722867 # Largest duration Opal can represent (~292 years) + minimum: 0 + type: object responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GroupBinding" - description: The group binding just created. - security: - - BearerAuth: [] - tags: - - group-bindings - put: - description: Bulk updates a list of group bindings. - operationId: updateGroupBindings - requestBody: - description: Group bindings to be updated - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateGroupBindingInfoList" - responses: - "200": - description: The group bindings were successfully updated. + $ref: "#/components/schemas/GroupResource" + description: The created `GroupResource` object. security: - BearerAuth: [] tags: - - group-bindings - /group-bindings/{group_binding_id}: + - groups + /groups/{group_id}/visibility: get: - summary: Get group binding by ID - description: Returns a `GroupBinding` object. - operationId: getGroupBinding + description: Gets the visibility of this group. + operationId: get_group_visibility parameters: - - description: The ID of the group binding. - example: 32acc112-21ff-4669-91c2-21e27683eaa1 - explode: true + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false in: path - name: group_binding_id + name: group_id required: true schema: format: uuid @@ -2052,45 +2855,56 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/GroupBinding" - description: The requested `GroupBinding`. + $ref: "#/components/schemas/VisibilityInfo" + description: The visibility info of this group. + "403": + description: The caller is not authorized to view this group's visibility. security: - BearerAuth: [] tags: - - group-bindings - delete: - description: Deletes a group binding. - operationId: deleteGroupBinding + - groups + put: + description: Sets the visibility of this group. + operationId: set_group_visibility parameters: - - description: The ID of the group binding. + - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: group_binding_id + name: group_id required: true schema: format: uuid type: string style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/VisibilityInfo" responses: "200": - description: The group binding was successfully deleted. - security: - - BearerAuth: [] + content: + application/json: + schema: + $ref: "#/components/schemas/VisibilityInfo" + description: The visibility info of this group. + security: + - BearerAuth: [] tags: - - group-bindings - /idp-group-mappings/{app_resource_id}: + - groups + /groups/{group_id}/reviewers: get: - description: - Returns the configured set of available `IdpGroupMapping` objects - for an Okta app. - operationId: getIdpGroupMappings + deprecated: true + description: Gets the list of owner IDs of the reviewers for a group. + operationId: get_group_reviewers parameters: - - description: The ID of the Okta app. + - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: app_resource_id + name: group_id required: true schema: format: uuid @@ -2101,23 +2915,26 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/IdpGroupMappingList" - description: - The configured set of available `IdpGroupMapping` objects for an - Okta app. + items: + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + type: array + description: The IDs of owners that are reviewers for this group. security: - BearerAuth: [] tags: - - idp-group-mappings + - groups put: - description: Updates the list of available `IdpGroupMapping` objects for an Okta app. - operationId: updateIdpGroupMappings + deprecated: true + description: Sets the list of reviewers for a group. + operationId: set_group_reviewers parameters: - - description: The ID of the Okta app. + - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: app_resource_id + name: group_id required: true schema: format: uuid @@ -2128,46 +2945,28 @@ paths: content: application/json: schema: - properties: - mappings: - type: array - items: - properties: - group_id: - type: string - format: uuid - alias: - type: string - hidden_from_end_user: - type: boolean - type: object - required: - - mappings - type: object + $ref: "#/components/schemas/ReviewerIDList" responses: "200": - description: - The updated set of available `IdpGroupMapping` objects for an Okta - app. + content: + application/json: + schema: + items: + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + type: array + description: The updated IDs of owners that are reviewers for this group security: - BearerAuth: [] tags: - - idp-group-mappings - /idp-group-mappings/{app_resource_id}/groups/{group_id}: + - groups + /groups/{group_id}/reviewer-stages: get: - description: Gets an `IdpGroupMapping` object for an Okta app and group. - operationId: getIdpGroupMapping + deprecated: true + description: Gets the list of reviewer stages for a group. + operationId: get_group_reviewer_stages parameters: - - description: The ID of the Okta app. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: app_resource_id - required: true - schema: - format: uuid - type: string - style: simple - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false @@ -2183,31 +2982,20 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/IdpGroupMapping" - description: The `IdpGroupMapping` object for the Okta app and group. + description: A list of reviewer stages. + items: + $ref: "#/components/schemas/ReviewerStage" + type: array + description: The reviewer stages for this group. security: - BearerAuth: [] tags: - - idp-group-mappings - post: - description: | - Creates or updates an individual `IdpGroupMapping` object (upsert operation). - - **Behavior:** - - If the mapping doesn't exist, it will be created with the provided values - - If the mapping exists, only the fields provided in the request will be updated - operationId: createIdpGroupMapping + - groups + put: + deprecated: true + description: Sets the list of reviewer stages for a group. + operationId: set_group_reviewer_stages parameters: - - description: The ID of the Okta app. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: app_resource_id - required: true - schema: - format: uuid - type: string - style: simple - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false @@ -2219,49 +3007,56 @@ paths: type: string style: simple requestBody: - required: false + required: true content: application/json: schema: - properties: - alias: - description: Optional alias for the group mapping - type: string - nullable: true - hidden_from_end_user: - description: | - Whether this mapping should be hidden from end users. - - **New mappings**: If not provided, defaults to `false` - - **Existing mappings**: If not provided, existing value is preserved (no change) - - **Explicit values**: If provided, value is updated to the specified boolean - type: boolean - nullable: true - type: object + $ref: "#/components/schemas/ReviewerStageList" responses: "200": - description: The IDP group mapping was successfully created or updated. content: application/json: schema: - $ref: "#/components/schemas/IdpGroupMapping" + description: A list of reviewer stages. + items: + $ref: "#/components/schemas/ReviewerStage" + type: array + description: The updated reviewer stages for this group. security: - BearerAuth: [] tags: - - idp-group-mappings - delete: - description: Deletes an `IdpGroupMapping` object. - operationId: delete_idp_group_mappings + - groups + /groups/{group_id}/tags: + get: + description: Returns all tags applied to the group. + operationId: get_group_tags parameters: - - description: The ID of the Okta app. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + - description: The ID of the group whose tags to return. + name: group_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 explode: false in: path - name: app_resource_id required: true schema: format: uuid type: string style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TagsList" + description: The tags applied to the group. + security: + - BearerAuth: [] + tags: + - groups + /groups/{group_id}/users: + get: + description: Gets the list of users for this group. + operationId: get_group_users + parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false @@ -2272,19 +3067,6 @@ paths: format: uuid type: string style: simple - responses: - "200": - description: The IDP group mapping was successfully deleted. - security: - - BearerAuth: [] - tags: - - idp-group-mappings - /owners: - get: - summary: Get owners - description: Returns a list of `Owner` objects. - operationId: get_owners - parameters: - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true @@ -2294,7 +3076,13 @@ paths: schema: type: string style: form - - description: Number of results to return per page. Default is 200. + - description: + Number of results to return per page, up to 1000. When set (or when a + cursor is provided), the response contains a single page of results and + a `next` cursor; the default page size is 200. When both page_size and + cursor are omitted, the entire group membership is returned in one + response with no `next` cursor. For large groups, prefer setting + page_size and following `next`. example: 200 explode: true in: query @@ -2304,436 +3092,357 @@ paths: type: integer maximum: 1000 style: form - - description: Owner name to filter by. - example: 200 - explode: true - in: query - name: name - required: false - schema: - type: string - style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PaginatedOwnersList" - description: One page worth of owners in your organization. + $ref: "#/components/schemas/GroupUserList" + description: List of users with access to this group. security: - BearerAuth: [] tags: - - owners - post: - description: Creates an owner. - operationId: createOwner + - groups + /groups/{group_id}/users/{user_id}: + put: + description: Updates a user's access level or duration in this group. + operationId: update_group_user + parameters: + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + in: path + name: group_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the user whose access is being updated. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/CreateOwnerInfo" + type: object + example: + duration_minutes: 60 + access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess + properties: + duration_minutes: + description: + The updated duration for which the group can be accessed (in + minutes). Use 0 for indefinite, or a negative value to + revoke access. + type: integer + maximum: 153722867 # Largest duration Opal can represent (~292 years) + example: 120 + access_level_remote_id: + description: The updated remote ID of the access level granted to this user. + type: string + example: arn:aws:iam::590304332660:role/ReadOnlyAccess + required: + - duration_minutes responses: "200": + description: The GroupUser was successfully updated. content: application/json: schema: - $ref: "#/components/schemas/Owner" - description: The owner just created. + $ref: "#/components/schemas/GroupUser" security: - BearerAuth: [] tags: - - owners - put: - description: Bulk updates a list of owners. - operationId: updateOwners + - groups + post: + description: Adds a user to this group. + operationId: add_group_user + parameters: + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: group_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the user to add. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + - description: + The duration for which the group can be accessed (in minutes). Use + 0 to set to indefinite. + example: 60 + explode: true + in: query + name: duration_minutes + required: false + schema: + type: integer + maximum: 153722867 # Largest duration Opal can represent (~292 years) + style: form + deprecated: true + - description: + The remote ID of the access level to grant to this user. If + omitted, the default access level remote ID value (empty string) is + used. + example: arn:aws:iam::590304332660:role/AdministratorAccess + explode: true + in: query + name: access_level_remote_id + required: false + schema: + type: string + style: form + deprecated: true requestBody: - description: Owners to be updated - required: true + required: false content: application/json: schema: - $ref: "#/components/schemas/UpdateOwnerInfoList" + example: + duration_minutes: 60 + access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess + properties: + duration_minutes: + description: + The duration for which the group can be accessed (in minutes). Use + 0 to set to indefinite. + example: 60 + type: integer + access_level_remote_id: + description: + The remote ID of the access level to grant to this user. If + omitted, the default access level remote ID value (empty + string) is used. + example: arn:aws:iam::590304332660:role/AdministratorAccess + type: string + required: + - duration_minutes + type: object responses: "200": content: application/json: schema: - $ref: "#/components/schemas/UpdateOwnerInfoList" - description: The resulting updated owner infos. + $ref: "#/components/schemas/GroupUser" + description: The GroupUser that was created. security: - BearerAuth: [] tags: - - owners - /owners/{owner_id}: - get: - summary: Get owner by ID - description: Returns an `Owner` object. - operationId: getOwner + - groups + delete: + description: Removes a user's access from this group. + operationId: delete_group_user parameters: - - description: The ID of the owner. - example: 32acc112-21ff-4669-91c2-21e27683eaa1 - explode: true + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false in: path - name: owner_id + name: group_id required: true schema: format: uuid type: string style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Owner" - description: The owner object associated with the passed-in ID. - security: - - BearerAuth: [] - tags: - - owners - delete: - description: Deletes an owner. - operationId: delete_owner - parameters: - - description: The ID of the owner. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + - description: The ID of a user to remove from this group. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 explode: false in: path - name: owner_id + name: user_id required: true schema: format: uuid type: string style: simple + - description: + The remote ID of the access level for which this user has direct + access. If omitted, the default access level remote ID value (empty + string) is assumed. + example: 30 + explode: true + in: query + name: access_level_remote_id + required: false + schema: + type: string + style: form responses: "200": - description: The owner was successfully deleted. + description: This user's access was successfully removed from this group. security: - BearerAuth: [] tags: - - owners - /owners/name/{owner_name}: + - groups + /groups/users/{user_id}: get: - description: - Returns an `Owner` object. Does not support owners with `/` in - their name, use /owners?name=... instead. - operationId: getOwnerFromName + description: Returns all groups that the user is a member of. + operationId: get_user_groups parameters: - - description: The name of the owner. - example: MyOwner - explode: true + - description: The ID of the user whose groups to return. + name: user_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false in: path - name: owner_name required: true schema: + format: uuid type: string style: simple + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/Owner" - description: The owner object associated with the passed-in name. + $ref: "#/components/schemas/GroupUserList" + description: The groups that the user is a member of. security: - BearerAuth: [] tags: - - owners - /owners/{owner_id}/users: + - groups + /group-bindings: get: - description: - Gets the list of users for this owner, in escalation priority order - if applicable. - operationId: get_owner_users + summary: Get group bindings + description: Returns a list of `GroupBinding` objects. + operationId: getGroupBindings parameters: - - description: The ID of the owner. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: owner_id - required: true + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false schema: - format: uuid type: string - style: simple + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + schema: + type: integer + maximum: 1000 + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/UserList" - description: The users for this owner. + $ref: "#/components/schemas/PaginatedGroupBindingsList" + description: One page worth of group bindings for your organization. security: - BearerAuth: [] tags: - - owners - put: - description: - Sets the list of users for this owner. If escalation is enabled, - the order of this list is the escalation priority order of the users. If - the owner has a source group, adding or removing users from this list - won't be possible. - operationId: set_owner_users - parameters: - - description: The ID of the owner. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: owner_id - required: true - schema: - format: uuid - type: string - style: simple + - group-bindings + post: + description: Creates a group binding. + operationId: createGroupBinding requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/UserIDList" + $ref: "#/components/schemas/CreateGroupBindingInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/UserList" - description: The updated users for the owner. + $ref: "#/components/schemas/GroupBinding" + description: The group binding just created. security: - BearerAuth: [] tags: - - owners - /requests: - get: - summary: Get requests - description: - Returns a list of requests for your organization that is visible by - the admin. - operationId: getRequests - parameters: - - description: A start date filter for the events. - examples: - withDate: - summary: Example with date - value: 2021-11-01 - withDatetime: - summary: Example with date and time in ISO 8601 datetime format. - value: 2025-01-01T00:00:00Z - explode: true - in: query - name: start_date_filter - required: false - schema: - type: string - style: form - - description: An end date filter for the events. - examples: - withDate: - summary: Example with date - value: 2021-11-12 - withDatetime: - summary: Example with date and time in ISO 8601 datetime format. - value: 2025-01-01T00:00:00Z - explode: true - in: query - name: end_date_filter - required: false - schema: - type: string - style: form - - description: Filter requests by their requester ID. - example: 37cb7e41-12ba-46da-92ff-030abe0450b1 - in: query - name: requester_id - required: false - schema: - format: uuid - type: string - style: form - - description: Filter requests by their target user ID. - example: 37cb7e41-12ba-46da-92ff-030abe0450b1 - in: query - name: target_user_id - required: false - schema: - format: uuid - type: string - style: form - - description: Filter requests by the resource ID that was requested. - example: 37cb7e41-12ba-46da-92ff-030abe0450b1 - in: query - name: resource_id - required: false - schema: - format: uuid - type: string - style: form - - description: Filter requests by the group ID that was requested. - example: 37cb7e41-12ba-46da-92ff-030abe0450b1 - in: query - name: group_id - required: false - schema: - format: uuid - type: string - style: form - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - - description: Number of results to return per page. Default is 200. - example: 200 - explode: true - in: query - name: page_size - required: false - schema: - type: integer - maximum: 1000 - style: form - - description: Boolean toggle for if it should only show pending requests. - explode: true - in: query - name: show_pending_only - required: false - schema: - type: boolean - style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/RequestList" - description: The list of requests. - security: - - BearerAuth: [] - tags: - - requests - post: - description: "Create an access request" - operationId: "createRequest" + - group-bindings + put: + description: Bulk updates a list of group bindings. + operationId: updateGroupBindings requestBody: - description: Resources to be updated + description: Group bindings to be updated required: true content: application/json: schema: - $ref: "#/components/schemas/CreateRequestInfo" + $ref: "#/components/schemas/UpdateGroupBindingInfoList" responses: "200": - content: - application/json: - schema: - properties: - id: - format: uuid - type: string - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - description: The resulting request. + description: The group bindings were successfully updated. security: - BearerAuth: [] tags: - - requests - /requests/relay: + - group-bindings + /group-bindings/{group_binding_id}: get: - summary: Get requests via Relay - description: Returns a paginated list of requests using Relay-style cursor pagination. - operationId: getRequestsRelay - deprecated: true + summary: Get group binding by ID + description: Returns a `GroupBinding` object. + operationId: getGroupBinding parameters: - - description: Number of results to return after the cursor. Use either - first/after or last/before, not both. - example: 10 - in: query - name: first - required: false - schema: - type: integer - minimum: 1 - maximum: 100 - - description: - Cursor to fetch results after. Used with 'first' for forward - pagination. - example: - "Y3Vyc29yOnYyOpK5MjAyMS0wMS0wN1QwNzo0MToyNy4xMTlaFjYwZmM2YmJlZjk4YzE1N\ - 2ZhNjFhYjk4Nw==" - in: query - name: after - required: false - schema: - type: string - - description: Number of results to return before the cursor. Use either - first/after or last/before, not both. - example: 10 - in: query - name: last - required: false - schema: - type: integer - minimum: 1 - maximum: 100 - - description: - Cursor to fetch results before. Used with 'last' for backward - pagination. - example: - "Y3Vyc29yOnYyOpK5MjAyMS0wMS0wN1QwNzo0MToyNy4xMTlaFjYwZmM2YmJlZjk4YzE1N\ - 2ZhNjFhYjk4Nw==" - in: query - name: before - required: false - schema: - type: string - - description: Filter requests by their status. - example: PENDING - in: query - name: status - required: false - schema: - $ref: "#/components/schemas/RequestStatusEnum" - - description: Filter requests assigned to a specific user ID. - example: 37cb7e41-12ba-46da-92ff-030abe0450b1 - in: query - name: to - required: false - schema: - format: uuid - type: string - - description: Filter requests made by a specific user ID. - example: 37cb7e41-12ba-46da-92ff-030abe0450b1 - in: query - name: from - required: false + - description: The ID of the group binding. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: group_binding_id + required: true schema: format: uuid type: string + style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/RequestConnection" - description: A paginated list of requests using Relay-style cursor pagination. + $ref: "#/components/schemas/GroupBinding" + description: The requested `GroupBinding`. security: - BearerAuth: [] tags: - - requests - /requests/{id}: - get: - summary: Get request by ID - description: Returns a request by ID. - operationId: getRequest + - group-bindings + delete: + description: Deletes a group binding. + operationId: deleteGroupBinding parameters: - - description: The ID of the request. + - description: The ID of the group binding. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: id + name: group_binding_id required: true schema: format: uuid @@ -2741,329 +3450,259 @@ paths: style: simple responses: "200": - description: The requested request object. - content: - application/json: - schema: - $ref: "#/components/schemas/Request" + description: The group binding was successfully deleted. security: - BearerAuth: [] tags: - - requests - /requests/{id}/approve: - post: - description: "Approve an access request" - operationId: "approveRequest" + - group-bindings + /idp-group-mappings/{app_resource_id}: + get: + description: + Returns the configured set of available `IdpGroupMapping` objects + for an Okta app. + operationId: getIdpGroupMappings parameters: - - description: "The ID of the request to approve" + - description: The ID of the Okta app. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false in: path - name: id + name: app_resource_id required: true schema: - type: string format: uuid - requestBody: - description: Approval parameters - required: true - content: - application/json: - schema: - type: object - properties: - level: - $ref: "#/components/schemas/RequestApprovalEnum" - comment: - type: string - description: "Optional comment for the approval" - example: "Approved after security review" - required: - - level + type: string + style: simple responses: "200": - description: "Request successfully approved" content: application/json: schema: - type: object - properties: - request: - $ref: "#/components/schemas/Request" + $ref: "#/components/schemas/IdpGroupMappingList" + description: + The configured set of available `IdpGroupMapping` objects for an + Okta app. security: - BearerAuth: [] tags: - - requests - /requests/{id}/deny: - post: - description: "Deny an access request" - operationId: "denyRequest" + - idp-group-mappings + put: + description: Updates the list of available `IdpGroupMapping` objects for an Okta app. + operationId: updateIdpGroupMappings parameters: - - description: "The ID of the request to deny" + - description: The ID of the Okta app. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false in: path - name: id + name: app_resource_id required: true schema: - type: string format: uuid + type: string + style: simple requestBody: - description: Denial parameters required: true content: application/json: schema: - type: object properties: - comment: - type: string - description: "Comment for the denial" - example: "Denied due to insufficient justification" - level: - $ref: "#/components/schemas/RequestApprovalEnum" + mappings: + type: array + items: + properties: + group_id: + type: string + format: uuid + alias: + type: string + hidden_from_end_user: + type: boolean + type: object required: - - comment + - mappings + type: object responses: "200": - description: "Request successfully denied" - content: - application/json: - schema: - type: object - properties: - request: - $ref: "#/components/schemas/Request" + description: + The updated set of available `IdpGroupMapping` objects for an Okta + app. security: - BearerAuth: [] tags: - - requests - /requests/{id}/comments: + - idp-group-mappings + /idp-group-mappings/{app_resource_id}/groups/{group_id}: get: - description: Returns a list of comments for a specific request. - operationId: getRequestComments + description: Gets an `IdpGroupMapping` object for an Okta app and group. + operationId: getIdpGroupMapping parameters: - - description: "The ID of the request to get comments for" + - description: The ID of the Okta app. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false in: path - name: id + name: app_resource_id required: true schema: + format: uuid type: string + style: simple + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: group_id + required: true + schema: format: uuid + type: string + style: simple responses: "200": - description: A list of comments associated with the specified request. content: application/json: schema: - $ref: "#/components/schemas/RequestCommentList" + $ref: "#/components/schemas/IdpGroupMapping" + description: The `IdpGroupMapping` object for the Okta app and group. security: - BearerAuth: [] tags: - - requests + - idp-group-mappings post: - description: "Comment on an access request" - operationId: "createRequestComment" + description: | + Creates or updates an individual `IdpGroupMapping` object (upsert operation). + + **Behavior:** + - If the mapping doesn't exist, it will be created with the provided values + - If the mapping exists, only the fields provided in the request will be updated + operationId: createIdpGroupMapping parameters: - - description: "The ID of the request to comment on" + - description: The ID of the Okta app. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false in: path - name: id + name: app_resource_id required: true schema: + format: uuid type: string + style: simple + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: group_id + required: true + schema: format: uuid + type: string + style: simple requestBody: - description: Comment parameters - required: true + required: false content: application/json: schema: - type: object properties: - comment: + alias: + description: Optional alias for the group mapping type: string - description: "comment" - required: - - comment + nullable: true + hidden_from_end_user: + description: | + Whether this mapping should be hidden from end users. + - **New mappings**: If not provided, defaults to `false` + - **Existing mappings**: If not provided, existing value is preserved (no change) + - **Explicit values**: If provided, value is updated to the specified boolean + type: boolean + nullable: true + type: object responses: "200": - description: "Request successfully commented" + description: The IDP group mapping was successfully created or updated. content: application/json: schema: - type: object - properties: - request: - $ref: "#/components/schemas/Request" + $ref: "#/components/schemas/IdpGroupMapping" security: - BearerAuth: [] tags: - - requests - /resources: - get: - summary: Get resources - description: Returns a list of resources for your organization. - operationId: getResources + - idp-group-mappings + delete: + description: Deletes an `IdpGroupMapping` object. + operationId: delete_idp_group_mappings parameters: - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - - description: Number of results to return per page. Default is 200. - example: 200 - explode: true - in: query - name: page_size - required: false - schema: - type: integer - maximum: 1000 - style: form - - description: The resource type to filter by. Required when remote_id is provided. - example: AWS_IAM_ROLE - explode: true - in: query - name: resource_type_filter - required: false - schema: - $ref: "#/components/schemas/ResourceTypeEnum" - style: form - - description: The resource ids to filter by. - example: - - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - - 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: query - name: resource_ids - required: false - schema: - items: - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid - type: string - type: array - style: form - - description: Resource name. - example: example-name - explode: true - in: query - name: resource_name - required: false - schema: - type: string - style: form - - description: The parent resource id to filter by. - example: - - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + - description: The ID of the Okta app. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false - in: query - name: parent_resource_id - required: false + in: path + name: app_resource_id + required: true schema: format: uuid type: string - style: form - - description: - The ancestor resource id to filter by. Returns all resources that - are descendants of the specified resource. - example: - - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + style: simple + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false - in: query - name: ancestor_resource_id - required: false + in: path + name: group_id + required: true schema: format: uuid type: string - style: form - - description: - Filter resources by their remote id. This will return all resources - that have a remote id that matches the provided remote id. Note that - this requires resource_type_filter to be provided. - in: query - name: remote_id - required: false - schema: - type: string - style: form - - description: - The IDs of the tags to filter by. Returns only resources that have - any of these tags applied. - in: query - name: tag_ids - required: false - schema: - type: array - items: - format: uuid - type: string - style: form + style: simple responses: "200": - content: - application/json: - schema: - $ref: "#/components/schemas/PaginatedResourcesList" - description: One page worth resources associated with your organization. + description: The IDP group mapping was successfully deleted. security: - BearerAuth: [] tags: - - resources - put: - description: Bulk updates a list of resources. - operationId: updateResources - requestBody: - description: Resources to be updated - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateResourceInfoList" + - idp-group-mappings + /opal-scripts: + get: + summary: List OpalScripts + description: Returns the `OpalScript` objects in the caller's organization. + operationId: getOpalScripts responses: "200": content: application/json: schema: - $ref: "#/components/schemas/UpdateResourceInfoList" - description: The resulting updated resource infos. + $ref: "#/components/schemas/OpalScriptList" + description: The OpalScripts in the organization. security: - BearerAuth: [] tags: - - resources + - opal-scripts post: - description: Creates a resource. See - [here](https://docs.opal.dev/reference/end-system-objects) for details - about importing resources. - operationId: createResource + summary: Create OpalScript + description: Creates a new `OpalScript`. + operationId: createOpalScript requestBody: - required: true content: application/json: schema: - $ref: "#/components/schemas/CreateResourceInfo" + $ref: "#/components/schemas/CreateOpalScriptInfo" + required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/Resource" - description: The resource just created. + $ref: "#/components/schemas/OpalScript" + description: The created OpalScript. security: - BearerAuth: [] tags: - - resources - /resources/{resource_id}: + - opal-scripts + /opal-scripts/{opal_script_id}: get: - summary: Get resource by ID - description: Retrieves a resource. - operationId: get_resource + summary: Get OpalScript by ID + description: Returns an `OpalScript` object. + operationId: getOpalScript parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The ID of the OpalScript. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true in: path - name: resource_id + name: opal_script_id required: true schema: format: uuid @@ -3071,46 +3710,60 @@ paths: style: simple responses: "200": - description: The requested resource. content: application/json: schema: - $ref: "#/components/schemas/Resource" + $ref: "#/components/schemas/OpalScript" + description: The OpalScript associated with the passed-in ID. security: - BearerAuth: [] tags: - - resources - delete: - description: Deletes a resource. - operationId: delete_resource + - opal-scripts + put: + summary: Update OpalScript + description: Updates an `OpalScript` object. + operationId: updateOpalScript parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The ID of the OpalScript. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true in: path - name: resource_id + name: opal_script_id required: true schema: format: uuid type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateOpalScriptInfo" + required: true responses: "200": - description: The resource was successfully deleted. + content: + application/json: + schema: + $ref: "#/components/schemas/OpalScript" + description: The updated OpalScript. security: - BearerAuth: [] tags: - - resources - /resources/{resource_id}/message-channels: - get: - description: Gets the list of audit message channels attached to a resource. - operationId: get_resource_message_channels + - opal-scripts + delete: + summary: Delete OpalScript + description: + Deletes an `OpalScript`, along with the service user that backs it. A + script that is still named as a reviewer, or referenced by a delegation, + is rejected until those references are removed. + operationId: deleteOpalScript parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The ID of the OpalScript. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true in: path - name: resource_id + name: opal_script_id required: true schema: format: uuid @@ -3118,117 +3771,137 @@ paths: style: simple responses: "200": - content: - application/json: - schema: - $ref: "#/components/schemas/MessageChannelList" - description: The audit message channels attached to the resource. + description: The OpalScript was deleted. security: - BearerAuth: [] tags: - - resources - put: - description: Sets the list of audit message channels attached to a resource. - operationId: set_resource_message_channels + - opal-scripts + /opal-scripts/name/{opal_script_name}: + get: + summary: Get OpalScript by name + description: + Returns the `OpalScript` whose name exactly matches the given name. + OpalScript names are not unique; when more than one script matches, the + request fails and the script must be referenced by ID instead. + operationId: getOpalScriptFromName parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The name of the OpalScript. + example: MFA check + explode: true in: path - name: resource_id + name: opal_script_name required: true schema: - format: uuid type: string style: simple - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/MessageChannelIDList" responses: "200": content: application/json: schema: - items: - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid - type: string - type: array - description: The updated audit message channel IDs for the resource. + $ref: "#/components/schemas/OpalScript" + description: The OpalScript associated with the passed-in name. security: - BearerAuth: [] tags: - - resources - /resources/{resource_id}/visibility: + - opal-scripts + /owners: get: - description: Gets the visibility of this resource. - operationId: get_resource_visibility + summary: Get owners + description: Returns a list of `Owner` objects. + operationId: get_owners parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: resource_id - required: true + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false schema: - format: uuid type: string - style: simple + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + - description: Owner name to filter by. + example: 200 + explode: true + in: query + name: name + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/VisibilityInfo" - description: The visibility info of this resource. + $ref: "#/components/schemas/PaginatedOwnersList" + description: One page worth of owners in your organization. security: - BearerAuth: [] tags: - - resources + - owners + post: + description: Creates an owner. + operationId: createOwner + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateOwnerInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Owner" + description: The owner just created. + security: + - BearerAuth: [] + tags: + - owners put: - description: Sets the visibility of this resource. - operationId: set_resource_visibility - parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: resource_id - required: true - schema: - format: uuid - type: string - style: simple + description: Bulk updates a list of owners. + operationId: updateOwners requestBody: + description: Owners to be updated required: true content: application/json: schema: - $ref: "#/components/schemas/VisibilityInfo" + $ref: "#/components/schemas/UpdateOwnerInfoList" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/VisibilityInfo" - description: The visibility info of this resource. + $ref: "#/components/schemas/UpdateOwnerInfoList" + description: The resulting updated owner infos. security: - BearerAuth: [] tags: - - resources - /resources/{resource_id}/reviewers: + - owners + /owners/{owner_id}: get: - description: Gets the list of owner IDs of the reviewers for a resource. - operationId: get_resource_reviewers + summary: Get owner by ID + description: Returns an `Owner` object. + operationId: getOwner parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The ID of the owner. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true in: path - name: resource_id + name: owner_id required: true schema: format: uuid @@ -3239,61 +3912,72 @@ paths: content: application/json: schema: - items: - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid - type: string - type: array - description: The IDs of owners that are reviewers for this resource. + $ref: "#/components/schemas/Owner" + description: The owner object associated with the passed-in ID. security: - BearerAuth: [] tags: - - resources - put: - description: Sets the list of reviewers for a resource. - operationId: set_resource_reviewers + - owners + delete: + description: Deletes an owner. + operationId: delete_owner parameters: - - description: The ID of the resource. + - description: The ID of the owner. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: resource_id + name: owner_id required: true schema: format: uuid type: string style: simple - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/ReviewerIDList" responses: "200": - content: - application/json: - schema: - items: - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid - type: string - type: array - description: The updated IDs of owners that are reviewers for this resource + description: The owner was successfully deleted. security: - BearerAuth: [] tags: - - resources - /resources/{resource_id}/reviewer-stages: + - owners + /owners/name/{owner_name}: get: - description: Gets the list reviewer stages for a resource. - operationId: get_resource_reviewer_stages + description: + Returns an `Owner` object. Does not support owners with `/` in + their name, use /owners?name=... instead. + operationId: getOwnerFromName parameters: - - description: The ID of the resource. + - description: The name of the owner. + example: MyOwner + explode: true + in: path + name: owner_name + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Owner" + description: The owner object associated with the passed-in name. + security: + - BearerAuth: [] + tags: + - owners + /owners/{owner_id}/users: + get: + description: + Gets the list of users for this owner, in escalation priority order + if applicable. + operationId: get_owner_users + parameters: + - description: The ID of the owner. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: resource_id + name: owner_id required: true schema: format: uuid @@ -3304,24 +3988,25 @@ paths: content: application/json: schema: - description: A list of reviewer stages. - items: - $ref: "#/components/schemas/ReviewerStage" - type: array - description: The reviewer stages for this resource. + $ref: "#/components/schemas/UserList" + description: The users for this owner. security: - BearerAuth: [] tags: - - resources + - owners put: - description: Sets the list of reviewer stages for a resource. - operationId: set_resource_reviewer_stages + description: + Sets the list of users for this owner. If escalation is enabled, + the order of this list is the escalation priority order of the users. If + the owner has a source group, adding or removing users from this list + won't be possible. + operationId: set_owner_users parameters: - - description: The ID of the resource. + - description: The ID of the owner. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: resource_id + name: owner_id required: true schema: format: uuid @@ -3332,796 +4017,836 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ReviewerStageList" + $ref: "#/components/schemas/UserIDList" responses: "200": content: application/json: schema: - description: A list of reviewer stages. - items: - $ref: "#/components/schemas/ReviewerStage" - type: array - description: The updated reviewer stages for this resource. + $ref: "#/components/schemas/UserList" + description: The updated users for the owner. security: - BearerAuth: [] tags: - - resources - /non-human-identities: + - owners + /request-templates: get: - description: Returns a list of non-human identities for your organization. - operationId: get_nhis - parameters: - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - - description: Number of results to return per page. Default is 200. - example: 200 - explode: true - in: query - name: page_size - required: false - schema: - type: integer - maximum: 1000 - style: form + description: Returns a list of `RequestTemplate` objects. + operationId: getRequestTemplates responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PaginatedResourcesList" - description: One page worth non-human identities in your organization. + $ref: "#/components/schemas/PaginatedRequestTemplateList" + description: One page worth of request templates for your organization. security: - BearerAuth: [] tags: - - non-human-identities - /resources/{resource_id}/non-human-identities: - get: - description: Gets the list of non-human identities with access to this resource. - operationId: get_resource_nhis - parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: resource_id - required: true - schema: - format: uuid - type: string - style: simple - - description: Limit the number of results returned. - example: 200 - explode: true - in: query - name: limit - required: false - schema: - type: integer - style: form + - request-templates + post: + description: Creates a request template. + operationId: createRequestTemplate + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateRequestTemplateInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/AccessList" - description: List of non-human identities with access to this resource. + $ref: "#/components/schemas/RequestTemplate" + description: The request template just created. security: - BearerAuth: [] tags: - - resources - /resources/{resource_id}/users: - get: - summary: Get resource users - description: Gets the list of users for this resource. - operationId: get_resource_users - parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: resource_id - required: true - schema: - format: uuid - type: string - style: simple - - description: Limit the number of results returned. - example: 200 - explode: true - in: query - name: limit - required: false - schema: - type: integer - style: form + - request-templates + put: + description: Updates a request template. + operationId: updateRequestTemplate + requestBody: + description: Request template to be updated + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateRequestTemplateInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/ResourceAccessUserList" - description: List of users with access to this resource. + $ref: "#/components/schemas/RequestTemplate" + description: The request template just updated. security: - BearerAuth: [] tags: - - resources - /resources/{resource_id}/non-human-identities/{non_human_identity_id}: - post: - description: Gives a non-human identity access to this resource. - operationId: add_resource_nhi + - request-templates + /request-templates/{request_template_id}: + get: + description: Returns a `RequestTemplate` object. + operationId: getRequestTemplate parameters: - - description: The ID of the resource. + - description: The ID of the request template. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: resource_id - required: true - schema: - format: uuid - type: string - style: simple - - description: The resource ID of the non-human identity to add. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 - explode: false - in: path - name: non_human_identity_id + name: request_template_id required: true schema: format: uuid type: string style: simple - requestBody: - required: false - content: - application/json: - schema: - example: - duration_minutes: 60 - access_level_remote_id: roles/cloudsql.instanceUser - properties: - duration_minutes: - description: - The duration for which the resource can be accessed (in minutes). - Use 0 to set to indefinite. - example: 60 - type: integer - maximum: 525960 # One year - access_level_remote_id: - description: - The remote ID of the access level to grant. If omitted, the default - access level remote ID value (empty string) is used. - example: roles/cloudsql.instanceUser - type: string - required: - - duration_minutes - type: object responses: "200": content: application/json: schema: - $ref: "#/components/schemas/ResourceNHI" - description: - Details about the access that the non-human identity was granted to - the resource. + $ref: "#/components/schemas/RequestTemplate" + description: The requested request template. security: - BearerAuth: [] tags: - - resources + - request-templates delete: - description: Removes a non-human identity's direct access from this resource. - operationId: delete_resource_nhi + description: Deletes a request template. + operationId: deleteRequestTemplate parameters: - - description: The ID of the resource. + - description: The ID of the request template. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: resource_id - required: true - schema: - format: uuid - type: string - style: simple - - description: - The resource ID of the non-human identity to remove from this - resource. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 - explode: false - in: path - name: non_human_identity_id + name: request_template_id required: true schema: format: uuid type: string style: simple - - description: - The remote ID of the access level for which this non-human identity - has direct access. If omitted, the default access level remote ID - value (empty string) is assumed. - example: roles/cloudsql.instanceUser - explode: true - in: query - name: access_level_remote_id - required: false - schema: - type: string - style: form responses: "200": - description: - This non-human identity's access was successfully removed from this - resource. + description: The request template was successfully deleted. security: - BearerAuth: [] tags: - - resources - /resources/{resource_id}/users/{user_id}: - post: - description: Adds a user to this resource. - operationId: add_resource_user + - request-templates + /requests: + get: + summary: Get requests + description: + Returns a list of requests for your organization that is visible by + the admin. + operationId: getRequests parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path + - description: A start date filter for the events. + examples: + withDate: + summary: Example with date + value: 2021-11-01 + withDatetime: + summary: Example with date and time in ISO 8601 datetime format. + value: 2025-01-01T00:00:00Z + explode: true + in: query + name: start_date_filter + required: false + schema: + type: string + style: form + - description: An end date filter for the events. + examples: + withDate: + summary: Example with date + value: 2021-11-12 + withDatetime: + summary: Example with date and time in ISO 8601 datetime format. + value: 2025-01-01T00:00:00Z + explode: true + in: query + name: end_date_filter + required: false + schema: + type: string + style: form + - description: Filter requests by their requester ID. + example: 37cb7e41-12ba-46da-92ff-030abe0450b1 + in: query + name: requester_id + required: false + schema: + format: uuid + type: string + style: form + - description: Filter requests by their target user ID. + example: 37cb7e41-12ba-46da-92ff-030abe0450b1 + in: query + name: target_user_id + required: false + schema: + format: uuid + type: string + style: form + - description: Filter requests by the resource ID that was requested. + example: 37cb7e41-12ba-46da-92ff-030abe0450b1 + in: query name: resource_id - required: true + required: false schema: format: uuid type: string - style: simple - - description: The ID of the user to add. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 - explode: false - in: path - name: user_id - required: true + style: form + - description: Filter requests by the group ID that was requested. + example: 37cb7e41-12ba-46da-92ff-030abe0450b1 + in: query + name: group_id + required: false schema: format: uuid type: string - style: simple - - description: - The duration for which the resource can be accessed (in minutes). - Use 0 to set to indefinite. - example: 60 + style: form + - description: >- + Filter requests by the ID of the app that a requested resource or + group belongs to. Returns an empty page if the app does not exist + or has no requests visible to the caller. + example: 37cb7e41-12ba-46da-92ff-030abe0450b1 + in: query + name: app_id + required: false + schema: + format: uuid + type: string + style: form + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true in: query - name: duration_minutes + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size required: false schema: type: integer - maximum: 525960 # One year + maximum: 1000 style: form - deprecated: true - - description: - The remote ID of the access level to grant to this user. If - omitted, the default access level remote ID value (empty string) is - used. - example: arn:aws:iam::590304332660:role/AdministratorAccess + - description: Boolean toggle for if it should only show pending requests. explode: true in: query - name: access_level_remote_id + name: show_pending_only required: false schema: - type: string + type: boolean style: form - deprecated: true - requestBody: - required: false - content: - application/json: - schema: - example: - duration_minutes: 60 - access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess - properties: - duration_minutes: - description: - The duration for which the resource can be accessed (in minutes). - Use 0 to set to indefinite. - example: 60 - type: integer - maximum: 525960 # One year - access_level_remote_id: - description: - The remote ID of the access level to grant to this user. If - omitted, the default access level remote ID value (empty - string) is used. - example: arn:aws:iam::590304332660:role/AdministratorAccess - type: string - required: - - duration_minutes - type: object responses: "200": content: application/json: schema: - $ref: "#/components/schemas/ResourceUser" - description: The ResourceUser that was created. + $ref: "#/components/schemas/RequestList" + description: The list of requests. security: - BearerAuth: [] tags: - - resources - put: - description: Updates a user's access level or duration on this resource. - operationId: update_resource_user - parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - in: path - name: resource_id - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the user whose access is being updated. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 - in: path - name: user_id - required: true - schema: - format: uuid - type: string - style: simple + - requests + post: + description: "Create an access request" + operationId: "createRequest" requestBody: + description: Resources to be updated required: true content: application/json: schema: - type: object - example: - duration_minutes: 60 - access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess - properties: - duration_minutes: - description: - The updated duration for which the resource can be accessed (in - minutes). Use 0 for indefinite. - type: integer - maximum: 525960 # One year - example: 120 - access_level_remote_id: - description: The updated remote ID of the access level granted to this user. - type: string - example: arn:aws:iam::590304332660:role/ReadOnlyAccess - required: - - duration_minutes + $ref: "#/components/schemas/CreateRequestInfo" responses: "200": - description: The ResourceUser was successfully updated. content: application/json: schema: - $ref: "#/components/schemas/ResourceUser" + properties: + id: + format: uuid + type: string + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + description: The resulting request. security: - BearerAuth: [] tags: - - resources - delete: - description: Removes a user's direct access from this resource. - operationId: delete_resource_user + - requests + /requests/relay: + get: + summary: Get requests via Relay + description: Returns a paginated list of requests using Relay-style cursor pagination. + operationId: getRequestsRelay + deprecated: true parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: resource_id - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of a user to remove from this resource. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 - explode: false - in: path - name: user_id - required: true + - description: Number of results to return after the cursor. Use either + first/after or last/before, not both. + example: 10 + in: query + name: first + required: false schema: - format: uuid - type: string - style: simple + type: integer + minimum: 1 + maximum: 100 - description: - The remote ID of the access level for which this user has direct - access. If omitted, the default access level remote ID value (empty - string) is assumed. - example: arn:aws:iam::590304332660:role/AdministratorAccess - explode: true + Cursor to fetch results after. Used with 'first' for forward + pagination. + example: + "Y3Vyc29yOnYyOpK5MjAyMS0wMS0wN1QwNzo0MToyNy4xMTlaFjYwZmM2YmJlZjk4YzE1N\ + 2ZhNjFhYjk4Nw==" in: query - name: access_level_remote_id + name: after required: false schema: type: string - style: form - responses: - "200": - description: This user's access was successfully removed from this resource. - security: - - BearerAuth: [] - tags: - - resources - get: - summary: Get resource user - description: Returns information about a specific user's access to a resource. - operationId: getResourceUser - parameters: - - description: The ID of the resource. - example: 32acc112-21ff-4669-91c2-21e27683eaa1 - in: path - name: resource_id - required: true + - description: Number of results to return before the cursor. Use either + first/after or last/before, not both. + example: 10 + in: query + name: last + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + - description: + Cursor to fetch results before. Used with 'last' for backward + pagination. + example: + "Y3Vyc29yOnYyOpK5MjAyMS0wMS0wN1QwNzo0MToyNy4xMTlaFjYwZmM2YmJlZjk4YzE1N\ + 2ZhNjFhYjk4Nw==" + in: query + name: before + required: false schema: - format: uuid type: string - style: simple - - description: The ID of the user. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac - in: path - name: user_id - required: true + - description: Filter requests by their status. + example: PENDING + in: query + name: status + required: false + schema: + $ref: "#/components/schemas/RequestStatusEnum" + - description: Filter requests assigned to a specific user ID. + example: 37cb7e41-12ba-46da-92ff-030abe0450b1 + in: query + name: to + required: false schema: format: uuid type: string - style: simple - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true + - description: Filter requests made by a specific user ID. + example: 37cb7e41-12ba-46da-92ff-030abe0450b1 in: query - name: cursor + name: from required: false schema: + format: uuid type: string - style: form responses: "200": content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/ResourceUser" - cursor: - type: string - description: Pagination cursor for the next page of results - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - total_count: - type: integer - description: Total number of results - example: 120 - required: - - data - description: List of ResourceUser records for the user's access to the resource. - "404": - description: Resource or user not found. + $ref: "#/components/schemas/RequestConnection" + description: A paginated list of requests using Relay-style cursor pagination. security: - BearerAuth: [] tags: - - resources - /resource-user-access-status/{resource_id}/{user_id}: + - requests + /requests/{id}: get: - deprecated: true - description: Get user's access status to a resource. - operationId: resource_user_access_status_retrieve + summary: Get request by ID + description: Returns a request by ID. + operationId: getRequest parameters: - - description: The ID of the resource. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - name: resource_id - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the user. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + - description: The ID of the request. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: user_id + name: id required: true schema: format: uuid type: string style: simple - - description: - The remote ID of the access level that you wish to query for the - resource. If omitted, the default access level remote ID value - (empty string) is used. - example: arn:aws:iam::590304332660:role/AdministratorAccess - explode: true - in: query - name: access_level_remote_id - required: false - schema: - type: string - style: form - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - - description: Number of results to return per page. Default is 200. - example: 200 - explode: true - in: query - name: page_size - required: false - schema: - type: integer - maximum: 1000 - style: form responses: "200": + description: The requested request object. content: application/json: schema: - $ref: "#/components/schemas/ResourceUserAccessStatus" - description: The access status reflecting the user's access to the resource. + $ref: "#/components/schemas/Request" security: - BearerAuth: [] tags: - - resources - /resources/{resource_id}/tags: - get: - description: Returns all tags applied to the resource. - operationId: get_resource_tags + - requests + /requests/{id}/approve: + post: + description: "Approve an access request" + operationId: "approveRequest" parameters: - - description: The ID of the resource whose tags to return. - name: resource_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false + - description: "The ID of the request to approve" in: path + name: id required: true schema: - format: uuid type: string - style: simple + format: uuid + requestBody: + description: Approval parameters + required: true + content: + application/json: + schema: + type: object + properties: + acting_user_id: + type: string + format: uuid + description: >- + Approve as this Opal user instead of the caller. Only for service users an admin has allowed to act for users, in organizations with the feature enabled. The user must be active in the identity provider and be a reviewer on the request's current stage and not the request's target; the decision counts as theirs. Requests that require MFA to approve, and ADMIN level, are rejected. + level: + $ref: "#/components/schemas/RequestApprovalEnum" + comment: + type: string + description: "Optional comment for the approval" + example: "Approved after security review" + required: + - level responses: "200": + description: "Request successfully approved" content: application/json: schema: - $ref: "#/components/schemas/TagsList" - description: The tags applied to the resource. + type: object + properties: + request: + $ref: "#/components/schemas/Request" security: - BearerAuth: [] tags: - - resources - /resources/{resource_id}/scoped-role-permissions: - get: - description: - Returns all the scoped role permissions that apply to the given - resource. Only OPAL_SCOPED_ROLE resource type supports this field. - operationId: get_resource_scoped_role_permissions + - requests + /requests/{id}/deny: + post: + description: "Deny an access request" + operationId: "denyRequest" parameters: - - description: The ID of the resource whose scoped role permissions belong to. - name: resource_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false + - description: "The ID of the request to deny" in: path + name: id required: true schema: - format: uuid type: string - style: simple + format: uuid + requestBody: + description: Denial parameters + required: true + content: + application/json: + schema: + type: object + properties: + acting_user_id: + type: string + format: uuid + description: >- + Deny as this Opal user instead of the caller. Only for service users an admin has allowed to act for users, in organizations with the feature enabled. The user must be active in the identity provider and be a reviewer on the request's current stage and not the request's target; the decision counts as theirs. ADMIN level is rejected. + comment: + type: string + description: "Comment for the denial" + example: "Denied due to insufficient justification" + level: + $ref: "#/components/schemas/RequestApprovalEnum" + required: + - comment responses: "200": + description: "Request successfully denied" content: application/json: schema: - $ref: "#/components/schemas/ScopedRolePermissionList" - description: The role permissions that this Opal Scoped Role has. + type: object + properties: + request: + $ref: "#/components/schemas/Request" security: - BearerAuth: [] tags: - - resources - put: - description: Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. - operationId: set_resource_scoped_role_permissions + - requests + /requests/{id}/cancel: + post: + summary: Cancel request + description: Cancels a pending access request. + operationId: cancelRequest parameters: - - description: - The ID of the resource whose scoped role permissions belong to. - Must be of OPAL_SCOPED_ROLE resource type. - name: resource_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false + - description: The ID of the request to cancel. in: path + name: id required: true schema: - format: uuid type: string - style: simple + format: uuid requestBody: - required: true + required: false content: application/json: schema: - $ref: "#/components/schemas/ScopedRolePermissionList" + type: object + properties: + acting_user_id: + type: string + format: uuid + description: >- + Cancel as this Opal user instead of the caller. Only for service users an admin has allowed to act for users, in organizations with the feature enabled. The user must be active in the identity provider and be an Opal admin or the request's requester, target or initiated_by user. Unknown body fields are ignored, so a misspelled field cancels as the caller. responses: "200": + description: The canceled request. content: application/json: schema: - $ref: "#/components/schemas/ScopedRolePermissionList" - description: The role permissions that this Opal Scoped Role has. + $ref: "#/components/schemas/Request" + "400": + description: The request body is invalid, or `acting_user_id` names a system or service user, or a user who is not active in the identity provider. + "403": + description: The authenticated user cannot cancel this request, or is not allowed to act for users. + "404": + description: The request, or the user named by `acting_user_id`, was not found. + "409": + description: The request has already been actioned. security: - BearerAuth: [] tags: - - resources - /resources/users/{user_id}: - get: - description: Gets the list of resources for this user. - operationId: get_user_resources + - requests + /requests/{id}/escalate: + post: + summary: Escalate request to skip-manager + description: | + Escalates a pending access request to the target user's skip-level manager. + Only the request's requester may call this endpoint. + operationId: escalateRequest parameters: - - description: The ID of the user. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The ID of the request to escalate. in: path - name: user_id + name: id required: true schema: - format: uuid type: string - style: simple - - description: Limit the number of results returned. - example: 200 - explode: true - in: query - name: limit - required: false - schema: - type: integer - style: form - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true - in: query - name: cursor - required: false + format: uuid + responses: + "200": + description: The request was escalated, or was already approved or denied. + content: + application/json: + schema: + type: object + properties: + success: + type: boolean + required: + - success + "400": + description: | + Unknown JSON fields in the request body, the request does not require + manager approval, or the target user has no manager / skip-manager set. + "403": + description: The authenticated user cannot escalate this request. + "404": + description: The request was not found. + "409": + description: | + The request has already been escalated, or the manager has already approved. + security: + - BearerAuth: [] + tags: + - requests + /requests/{id}/remind: + post: + summary: Send request reminder + description: Sends a reminder to all pending reviewers of the request. + operationId: remindRequest + parameters: + - description: The ID of the request whose reviewers should be reminded. + in: path + name: id + required: true schema: type: string - style: form - - description: Include user's access to unmanaged resources. - example: false - explode: true - in: query - name: include_unmanaged - required: false - schema: - type: boolean - style: form + format: uuid responses: "200": + description: The reminder was sent, or the request was already resolved. content: application/json: schema: - $ref: "#/components/schemas/ResourceAccessUserList" - description: List of resources user has access to. + type: object + properties: + success: + type: boolean + required: + - success + "400": + description: Unknown JSON fields in the request body. + "404": + description: The request was not found. + "429": + description: The reviewer reminder cooldown has not elapsed. security: - BearerAuth: [] tags: - - resources - /resources/{resource_id}/groups: - get: - description: Returns a list of groups that grant access to the resource - operationId: get_resource_groups + - requests + /requests/{id}/reviewers/{reviewer_id}/remind: + post: + summary: Send reminder to a reviewer + description: Sends a reminder to one pending reviewer of the request. + operationId: remindRequestReviewer parameters: - - description: The ID of the resource that the groups grant access to. - name: resource_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false + - description: The ID of the request whose reviewer should be reminded. in: path + name: id required: true schema: + type: string format: uuid + - description: The ID of the pending reviewer to remind. + in: path + name: reviewer_id + required: true + schema: type: string - style: simple + format: uuid responses: "200": + description: The reminder was sent, or the request was already resolved. content: application/json: schema: - $ref: "#/components/schemas/GroupResourceList" - description: The groups that grant access to the resource. + type: object + properties: + success: + type: boolean + required: + - success + "400": + description: Unknown JSON fields, or the user is not a pending reviewer of the request. + "404": + description: The request was not found. + "429": + description: The reviewer reminder cooldown has not elapsed. security: - BearerAuth: [] tags: - - resources - /sessions: + - requests + /requests/{id}/comments: get: - description: Returns a list of `Session` objects. - operationId: sessions + description: Returns a list of comments for a specific request. + operationId: getRequestComments parameters: - - description: The ID of the resource. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: true - in: query - name: resource_id + - description: "The ID of the request to get comments for" + in: path + name: id required: true schema: - format: uuid type: string - style: form - - description: The ID of the user you wish to query sessions for. - example: 32acc112-21ff-4669-91c2-21e27683eaa1 - explode: true - in: query - name: user_id - required: false + format: uuid + responses: + "200": + description: A list of comments associated with the specified request. + content: + application/json: + schema: + $ref: "#/components/schemas/RequestCommentList" + security: + - BearerAuth: [] + tags: + - requests + post: + description: "Comment on an access request" + operationId: "createRequestComment" + parameters: + - description: "The ID of the request to comment on" + in: path + name: id + required: true schema: type: string - style: form + format: uuid + requestBody: + description: Comment parameters + required: true + content: + application/json: + schema: + type: object + properties: + acting_user_id: + type: string + format: uuid + description: >- + Comment as this Opal user instead of the caller. Only for service users an admin has allowed to act for users, in organizations with the feature enabled. The user must be active in the identity provider and be the request's requester, target or initiated_by user, an admin, or a reviewer who can act on or has acted on the request. + comment: + type: string + description: "comment" + required: + - comment responses: "200": + description: "Request successfully commented" content: application/json: schema: - $ref: "#/components/schemas/SessionsList" - description: The sessions associated with a resource. + type: object + properties: + request: + $ref: "#/components/schemas/Request" security: - BearerAuth: [] tags: - - sessions - /user: + - requests + /role-assignments: + post: + summary: Add role assignments + description: | + Grants one or more principals (user, group, or resource) access to one or more + entities (resource or group). The request body is batched to match the GraphQL + `addRoleAssignments` mutation, which this endpoint thin-wraps. The caller must + hold the `EDIT_ASSIGNMENTS` role permission on every entity in the batch. + + Omit `access_level_remote_id` for entities that have a single default access + level. Omit `duration_minutes` (or send `0`) for an indefinite grant. + + **Atomicity:** the batch is applied as a single transaction. If any entry + fails input validation, authorization, lookup, or creation, **no entries + are created** and the response identifies the first failing entry's + `entity_id` and `principal_id` (and the request-array index for input + validation errors). Clients should retry with the offending entry + removed; partial-success is intentionally not supported, matching the + semantics of the GraphQL `addRoleAssignments` mutation that this + endpoint wraps. + + Prefer this endpoint for batch or programmatic use (e.g. Terraform). For a + single grant on a specific entity/principal pair, the per-pair endpoints — + `/resources/{id}/users/{id}`, `/groups/{id}/users/{id}`, + `/groups/{id}/resources/{id}`, `/groups/{id}/containing-groups`, + `/resources/{id}/non-human-identities/{id}` — are often simpler. + operationId: addRoleAssignments + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/AddRoleAssignmentsRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AddRoleAssignmentsResponse" + description: The requested role assignments were created. + "400": + description: | + Invalid request body: unknown field, missing required field, malformed JSON, + invalid enum (entity_type must be RESOURCE or GROUP; principal_type must be + RESOURCE, GROUP, or USER), negative duration_minutes, or role_assignments + batch size outside the allowed range. + "403": + description: Caller is not authorized to edit role assignments on one or more of the entities. + "404": + description: One or more referenced entities or principals does not exist in the organization. + "409": + description: | + One of the requested role assignments already exists. The error + message identifies the offending entity_id and principal_id so a + batch client can locate the colliding entry. Matches the convention + of the per-pair endpoints (`/resources/{id}/users/{id}`, + `/groups/{id}/users/{id}`), which also return 409 for the same + condition. + "422": + description: | + Request was syntactically valid but could not be fulfilled. Includes + group nesting cycles, self-grants, invalid durations, access-level + mismatches, assignments on computed groups or non-requestable + resources, and unsupported entity/principal type combinations. + security: + - BearerAuth: [] + tags: + - role-assignments get: - description: Returns a `User` object. - operationId: user + summary: List role assignments + description: | + Returns a paginated list of role assignments. This endpoint is + **admin-only**: the caller's bearer token must belong to a user with the + admin or read-only admin role. Non-admin callers receive 403. + + Mirrors the GraphQL `directRoleAssignments` query and shares the same + underlying code path, so pagination order, sort default + (`first_granted_at` DESC), and the set of grants returned are identical + across the two surfaces. + + The REST filter surface is intentionally narrower on first ship — sort, + risk-factor filters, text search, access-scope filters, the + agents/humans toggle, and access-level filtering are deferred to a + future revision. For a single entity/principal pair, the per-pair + endpoints — `/resources/{resource_id}/users`, + `/resources/{resource_id}/groups`, + `/resources/{resource_id}/non-human-identities`, + `/groups/{group_id}/users`, `/groups/{group_id}/containing-groups` — + are often simpler. + operationId: listRoleAssignments parameters: - - description: The user ID of the user. - example: 32acc112-21ff-4669-91c2-21e27683eaa1 + - description: Filter to grants on these entity (resource or group) IDs. Any-match. explode: true in: query - name: user_id + name: entity_ids required: false schema: - format: uuid - type: string + items: + format: uuid + type: string + type: array style: form - description: - The email of the user. If both user ID and email are provided, user - ID will take precedence. If neither are provided, an error will - occur. - example: johndoe@domain.org + Filter to grants with these principal (user, group, or resource) + IDs. Any-match. explode: true in: query - name: email + name: principal_ids required: false schema: - type: string + items: + format: uuid + type: string + type: array + style: form + - description: Filter by entity type. Omit to include both RESOURCE and GROUP entities. + explode: true + in: query + name: entity_type + required: false + schema: + $ref: "#/components/schemas/RoleAssignmentEntityTypeEnum" + style: form + - description: + Filter by principal type. Omit to include USER, GROUP, and RESOURCE + principals. + explode: true + in: query + name: principal_type + required: false + schema: + $ref: "#/components/schemas/EntityTypeEnum" style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/User" - description: The user object associated with the passed-in email or ID. - security: - - BearerAuth: [] - tags: - - users - /users: - get: - description: Returns a list of users for your organization. - operationId: getUsers - parameters: - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true @@ -4141,187 +4866,247 @@ paths: type: integer maximum: 1000 style: form - - description: - The IDs of the tags to filter by. Returns only users that have any - of these tags applied. - in: query - name: tag_ids - required: false - schema: - type: array - items: - format: uuid - type: string - style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PaginatedUsersList" - description: One page worth users in your organization. + $ref: "#/components/schemas/PaginatedRoleAssignmentsList" + description: Paginated list of role assignments. + "400": + description: | + Invalid query parameter: unknown entity_type / principal_type enum + value, malformed UUID, malformed cursor, or page_size outside the + allowed range. + "403": + description: Caller is not an admin or read-only admin. security: - BearerAuth: [] tags: - - users - /users/remote_users: - get: - description: Returns a list of remote users for your organization. - operationId: getRemoteUsers - parameters: - - description: Filter remote users by their third party provider. - example: [GIT_HUB] - in: query - name: third_party_provider - required: false + - role-assignments + delete: + summary: Remove role assignments + description: | + Revoke one or more role assignments. Each entry identifies a specific + stored grant by the 5-tuple `(entity_id, entity_type, principal_id, + principal_type, access_level_remote_id)` — see the field description + on `access_level_remote_id` for when it must be supplied and when it + must be omitted. The call is idempotent: an entry that does not match + any stored grant is silently skipped and absent from `entries` in the + response. Caller must have `EDIT_ASSIGNMENTS` on each entity. + operationId: removeRoleAssignments + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/RemoveRoleAssignmentsRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RemoveRoleAssignmentsResponse" + description: + The role assignments were revoked (or did not exist; see + idempotency note). + "400": + description: + The request body was malformed or failed schema validation. + "403": + description: Caller lacks `EDIT_ASSIGNMENTS` on one or more entities. + "422": + description: Business validation rejected the request. + security: + - BearerAuth: [] + tags: + - role-assignments + /resources: + get: + summary: Get resources + description: Returns a list of resources for your organization. + operationId: getResources + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false schema: - type: array - items: - $ref: "#/components/schemas/ThirdPartyProviderEnum" + type: string style: form - - description: Filter remote users by their user ID. - example: [32acc112-21ff-4669-91c2-21e27683eaa1] + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true in: query - name: user_id + name: page_size required: false schema: - type: array - items: - type: string - format: uuid + type: integer + maximum: 1000 style: form - - description: Filter remote users by their remote ID. - example: [1234567890] + - description: The resource type to filter by. Required when remote_id is provided. + example: AWS_IAM_ROLE + explode: true in: query - name: remote_id + name: resource_type_filter + required: false + schema: + $ref: "#/components/schemas/ResourceTypeEnum" + style: form + - description: The resource ids to filter by. + example: + - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + - 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: query + name: resource_ids required: false schema: - type: array items: + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid type: string + type: array style: form - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + - description: >- + Filter resources by name. Matches against `name`, `remote_name`, + parent-name combinations, and `remote_id`. Matching is + case-insensitive. Use `resource_name_match` to choose the match + type; when omitted, CONTAINS (substring) is used. + example: example-name explode: true in: query - name: cursor + name: resource_name required: false schema: type: string style: form - - description: Number of results to return per page. Default is 200. - example: 200 + - description: >- + How to apply `resource_name`. Requires `resource_name` to be set. + Defaults to CONTAINS when `resource_name` is provided without this + parameter. EQUALS, STARTS_WITH, and ENDS_WITH match only the + resource's own `name` and `remote_name`, not parent-name + combinations or `remote_id`. explode: true in: query - name: page_size + name: resource_name_match required: false schema: - type: integer - maximum: 1000 + $ref: "#/components/schemas/NameMatchType" style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/PaginatedRemoteUsersList" - description: One page worth users in your organization. - security: - - BearerAuth: [] - tags: - - users - /users/{user_id}/tags: - get: - description: Returns all tags applied to the user. - operationId: get_user_tags - parameters: - - description: The ID of the user whose tags to return. - name: user_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + - description: The parent resource id to filter by. + example: + - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false - in: path - required: true + in: query + name: parent_resource_id + required: false schema: format: uuid type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/TagsList" - description: The tags applied to the user. - security: - - BearerAuth: [] - tags: - - users - /access-rules: - get: - description: Returns a list of access rules for your organization. - operationId: get_access_rules - parameters: - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true + style: form + - description: + The ancestor resource id to filter by. Returns all resources that + are descendants of the specified resource. + example: + - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false in: query - name: cursor + name: ancestor_resource_id required: false schema: + format: uuid type: string style: form - - description: Number of results to return per page. Default is 200. - example: 200 - explode: true + - description: + Filter resources by their remote id. This will return all resources + that have a remote id that matches the provided remote id. Note that + this requires resource_type_filter to be provided. in: query - name: page_size + name: remote_id required: false schema: - type: integer + type: string + style: form + - description: + The IDs of the tags to filter by. Returns only resources that have + any of these tags applied. + in: query + name: tag_ids + required: false + schema: + type: array + items: + format: uuid + type: string style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PaginatedAccessRulesList" - description: One page of access rules for your organization. + $ref: "#/components/schemas/PaginatedResourcesList" + description: One page worth resources associated with your organization. security: - BearerAuth: [] tags: - - access-rules + - resources + put: + description: Bulk updates a list of resources. + operationId: updateResources + requestBody: + description: Resources to be updated + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateResourceInfoList" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateResourceInfoList" + description: The resulting updated resource infos. + security: + - BearerAuth: [] + tags: + - resources post: - description: Creates a new access rule config for the given group_id. - operationId: create_access_rule + description: Creates a resource. See + [here](https://docs.opal.dev/reference/end-system-objects) for details + about importing resources. + operationId: createResource requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/UpdateAccessRuleInfo" + $ref: "#/components/schemas/CreateResourceInfo" responses: - "201": + "200": content: application/json: schema: - $ref: "#/components/schemas/AccessRule" - description: The created access rule config for the group. + $ref: "#/components/schemas/Resource" + description: The resource just created. security: - BearerAuth: [] tags: - - access-rules - /access-rules/{access_rule_id}: + - resources + /resources/{resource_id}: get: - description: - Returns a list of access rule config given the group_id of the - access rule. - operationId: get_access_rule + summary: Get resource by ID + description: Retrieves a resource. + operationId: get_resource parameters: - - description: The access rule ID (group ID) of the access rule. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: access_rule_id + name: resource_id required: true schema: format: uuid @@ -4329,272 +5114,275 @@ paths: style: simple responses: "200": + description: The requested resource. content: application/json: schema: - $ref: "#/components/schemas/AccessRule" - description: The access rules for the group. + $ref: "#/components/schemas/Resource" security: - BearerAuth: [] tags: - - access-rules - put: - description: Updates the access rule config for the given group_id. - operationId: update_access_rule + - resources + delete: + description: Deletes a resource. + operationId: delete_resource parameters: - - description: The access rule ID (group ID) of the access rule. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: access_rule_id + name: resource_id required: true schema: format: uuid type: string style: simple - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateAccessRuleInfo" responses: "200": - content: - application/json: - schema: - $ref: "#/components/schemas/AccessRule" - description: The updated access rule config for the group. + description: The resource was successfully deleted. security: - BearerAuth: [] tags: - - access-rules - /tag/{tag_id}: + - resources + /resources/{resource_id}/configuration-template: get: - summary: Get tag by ID - description: UNSTABLE. May be removed at any time. Gets a tag with the given id. - operationId: get_tag_by_ID + summary: Get the ID of the configuration template linked to a resource + description: | + Returns the ID of the configuration template that the resource is + currently linked to. The response body is + `{"configuration_template_id": "" | null}`: + + * `` is the ID of the configuration template the resource is linked to. + * `null` means the resource is not linked to any configuration template + and uses its own private configuration. + + This endpoint only exposes the link between a resource and a + configuration template — it does not return the template's own fields + (name, description, request configurations, visibility, etc.). To read + those, call `GET /configuration-templates/{configuration_template_id}` + with the ID returned here. + operationId: get_resource_configuration_template parameters: - - description: The tag ID - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + - description: The ID of the resource whose configuration template link is being read. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: tag_id + name: resource_id required: true schema: - type: string format: uuid + type: string style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/Tag" - description: The tag requested. + $ref: "#/components/schemas/ResourceConfigurationTemplate" + description: The ID of the configuration template currently linked to the resource, or `null` if the resource uses its own private configuration. + "403": + description: The caller is not authorized to view this resource. + "404": + description: The resource was not found. security: - BearerAuth: [] tags: - - tags - delete: - description: UNSTABLE. May be removed at any time. Deletes a tag with the given id. - operationId: delete_tag_by_ID + - resources + put: + summary: Set the ID of the configuration template linked to a resource + description: | + Attaches, repoints, or detaches the configuration template linked to a + resource. This endpoint only manages the link (by ID) between a + resource and an existing configuration template — it does not create, + modify, or delete the template itself. To manage a template's own + fields (name, description, request configurations, visibility, etc.), + use the `/configuration-templates` endpoints. + + The request body is `{"configuration_template_id": "" | null}`: + + * A `` value links the resource to the configuration template + with that ID. If the resource was previously linked to a different + template, the resource is repointed in place. + * `null` detaches the resource from its current configuration + template. The template is deep-copied into a new private + configuration with the same settings so the resource's current + behaviour is preserved, and the resource is repointed at the fork. + + The `configuration_template_id` field is required. Sending `{}` or any + body in which the field is omitted is rejected with `400`. + + The call is idempotent: if the request body matches the resource's + current link, no changes are made and no audit events are emitted. + + This endpoint is the preferred, Terraform-friendly surface for linking + and unlinking configuration templates on resources. The equivalent + `configuration_template_id` field on `PUT /resources` remains available + but is deprecated for this purpose. + operationId: update_resource_configuration_template parameters: - - description: The tag ID - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + - description: The ID of the resource whose configuration template link is being set. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: tag_id + name: resource_id required: true schema: - type: string format: uuid + type: string style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceConfigurationTemplate" responses: "200": - description: Tag was deleted. + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceConfigurationTemplate" + description: The ID of the configuration template now linked to the resource, or `null` if the resource was detached. + "400": + description: The request body was malformed, the required `configuration_template_id` field was omitted, or the target `configuration_template_id` does not reference a configuration template. + "403": + description: The caller is not authorized to update this resource. + "404": + description: The resource was not found. security: - BearerAuth: [] tags: - - tags - /tag: + - resources + /resources/{resource_id}/message-channels: get: - description: Gets a tag with the given key and value. - operationId: get_tag + description: Gets the list of audit message channels attached to a resource. + operationId: get_resource_message_channels parameters: - - description: The key of the tag to get. - example: api-scope + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false - in: query - name: tag_key + in: path + name: resource_id required: true schema: + format: uuid type: string - style: form - - description: The value of the tag to get. - example: production - explode: false - in: query - name: tag_value - required: false - schema: - type: string - style: form + style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/Tag" - description: The tag requested. + $ref: "#/components/schemas/MessageChannelList" + description: The audit message channels attached to the resource. security: - BearerAuth: [] tags: - - tags - post: - description: Creates a tag with the given key and value. - operationId: create_tag + - resources + put: + description: Sets the list of audit message channels attached to a resource. + operationId: set_resource_message_channels parameters: - - description: The key of the tag to create. - example: api-scope - explode: false - in: query - name: tag_key - required: false - schema: - type: string - style: form - deprecated: true - - description: The value of the tag to create. - example: production - explode: false - in: query - name: tag_value - required: false - schema: - type: string - style: form - deprecated: true - - description: The ID of the owner that manages the tag. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false - in: query - name: admin_owner_id + in: path + name: resource_id + required: true schema: format: uuid type: string - style: form - deprecated: true + style: simple requestBody: - required: false + required: true content: application/json: schema: - $ref: "#/components/schemas/CreateTagInfo" + $ref: "#/components/schemas/MessageChannelIDList" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/Tag" - description: The tag that was created. + items: + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + type: array + description: The updated audit message channel IDs for the resource. security: - BearerAuth: [] tags: - - tags - /tags: + - resources + /resources/{resource_id}/visibility: get: - summary: Get tags - description: Returns a list of tags created by your organization. - operationId: getTags + description: Gets the visibility of this resource. + operationId: get_resource_visibility parameters: - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true - in: query - name: cursor - required: false + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: resource_id + required: true schema: + format: uuid type: string - style: form - - description: Number of results to return per page. Default is 200. - example: 200 - explode: true - in: query - name: page_size - required: false - schema: - type: integer - maximum: 1000 - style: form + style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PaginatedTagsList" - description: A list of tags created by your organization. + $ref: "#/components/schemas/VisibilityInfo" + description: The visibility info of this resource. + "403": + description: The caller is not authorized to view this resource's visibility. security: - BearerAuth: [] tags: - - tags - /tags/{tag_id}/users/{user_id}: - post: - description: Applies a tag to a user. - operationId: add_user_tag + - resources + put: + description: Sets the visibility of this resource. + operationId: set_resource_visibility parameters: - - description: The ID of the tag to apply. - name: tag_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the user to apply the tag to. - name: user_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path + name: resource_id required: true schema: format: uuid type: string style: simple requestBody: - required: false + required: true content: application/json: schema: - type: object + $ref: "#/components/schemas/VisibilityInfo" responses: "200": - description: Tag applied to user successfully. + content: + application/json: + schema: + $ref: "#/components/schemas/VisibilityInfo" + description: The visibility info of this resource. security: - BearerAuth: [] tags: - - tags - delete: - description: Removes a tag from a user. - operationId: remove_user_tag + - resources + /resources/{resource_id}/reviewers: + get: + description: Gets the list of owner IDs of the reviewers for a resource. + operationId: get_resource_reviewers parameters: - - description: The ID of the tag to remove. - name: tag_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the user to remove the tag from. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: user_id + name: resource_id required: true schema: format: uuid @@ -4602,185 +5390,64 @@ paths: style: simple responses: "200": - description: Tag removed from user successfully. + content: + application/json: + schema: + items: + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + type: array + description: The IDs of owners that are reviewers for this resource. security: - BearerAuth: [] tags: - - tags - /tags/{tag_id}/groups/{group_id}: - post: - description: Applies a tag to a group. - operationId: add_group_tag + - resources + put: + description: Sets the list of reviewers for a resource. + operationId: set_resource_reviewers parameters: - - description: The ID of the tag to apply. - name: tag_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path + name: resource_id required: true schema: format: uuid type: string style: simple - - description: The ID of the group to apply the tag to. - name: group_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true - schema: - format: uuid - type: string - style: simple - responses: - "200": - description: Tag applied to group successfully. - security: - - BearerAuth: [] - tags: - - tags - delete: - description: Removes a tag from a group. - operationId: remove_group_tag - parameters: - - description: The ID of the tag to remove. - name: tag_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the group to remove the tag from. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - name: group_id - required: true - schema: - format: uuid - type: string - style: simple - responses: - "200": - description: Tag removed from group successfully. - security: - - BearerAuth: [] - tags: - - tags - /tags/{tag_id}/resources/{resource_id}: - post: - description: Applies a tag to a resource. - operationId: add_resource_tag - parameters: - - description: The ID of the tag to apply. - name: tag_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the resource to apply the tag to. - name: resource_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true - schema: - format: uuid - type: string - style: simple - responses: - "200": - description: Tag applied to resource successfully. - security: - - BearerAuth: [] - tags: - - tags - delete: - description: Removes a tag from a resource. - operationId: remove_resource_tag - parameters: - - description: The ID of the tag to remove. - name: tag_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the resource to remove the tag from. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - name: resource_id - required: true - schema: - format: uuid - type: string - style: simple - responses: - "200": - description: Tag removed from resource successfully. - security: - - BearerAuth: [] - tags: - - tags - /message-channels: - get: - summary: Get message channels - description: Returns a list of `MessageChannel` objects. - operationId: get_message_channels - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/MessageChannelList" - description: A list of message channels for your organization. - security: - - BearerAuth: [] - tags: - - message-channels - post: - description: Creates a `MessageChannel` objects. - operationId: create_message_channel requestBody: - description: The `MessageChannel` object to be created. required: true content: application/json: schema: - $ref: "#/components/schemas/CreateMessageChannelInfo" + $ref: "#/components/schemas/ReviewerIDList" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/MessageChannel" - description: The message channel that was created. + items: + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + type: array + description: The updated IDs of owners that are reviewers for this resource security: - BearerAuth: [] tags: - - message-channels - /message-channels/{message_channel_id}: + - resources + /resources/{resource_id}/reviewer-stages: get: - summary: Get message channel by ID - description: Gets a `MessageChannel` object. - operationId: get_message_channel + description: Gets the list reviewer stages for a resource. + operationId: get_resource_reviewer_stages parameters: - - description: The ID of the message_channel. + - description: The ID of the resource. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: message_channel_id + name: resource_id required: true schema: format: uuid @@ -4791,108 +5458,53 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/MessageChannel" - description: The requested message channel. - security: - - BearerAuth: [] - tags: - - message-channels - /on-call-schedules: - get: - summary: Get on call schedules - description: Returns a list of `OnCallSchedule` objects. - operationId: get_on_call_schedules - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/OnCallScheduleList" - description: A list of on call schedules for your organization. - security: - - BearerAuth: [] - tags: - - on-call-schedules - post: - description: Creates a `OnCallSchedule` objects. - operationId: create_on_call_schedule - requestBody: - description: The `OnCallSchedule` object to be created. - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/CreateOnCallScheduleInfo" - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/OnCallSchedule" - description: The on call schedule that was created. + description: A list of reviewer stages. + items: + $ref: "#/components/schemas/ReviewerStage" + type: array + description: The reviewer stages for this resource. security: - BearerAuth: [] tags: - - on-call-schedules - /on-call-schedules/{on_call_schedule_id}: - get: - summary: Get on call schedule by ID - description: Gets a `OnCallSchedule` object. - operationId: get_on_call_schedule + - resources + put: + description: Sets the list of reviewer stages for a resource. + operationId: set_resource_reviewer_stages parameters: - - description: The ID of the on_call_schedule. - example: 9546209c-42c2-4801-96d7-9ec42df0f59c + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: on_call_schedule_id + name: resource_id required: true schema: format: uuid type: string style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/OnCallSchedule" - description: The requested on call schedule. - security: - - BearerAuth: [] - tags: - - on-call-schedules - /queries/run: - post: - summary: Run an ad-hoc OpalQuery - description: Runs an ad-hoc OpalQuery and returns the results. Currently - supports NODE queries (users, resources, groups). This endpoint is only - available to our OpalQuery beta group. Please contact Opal support if - you'd like to be added to the beta. - operationId: runOpalQuery requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/RunOpalQueryRequest" + $ref: "#/components/schemas/ReviewerStageList" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/OpalQueryResults" - description: The results of the OpalQuery. + description: A list of reviewer stages. + items: + $ref: "#/components/schemas/ReviewerStage" + type: array + description: The updated reviewer stages for this resource. security: - BearerAuth: [] tags: - - opal-queries - /tokens: + - resources + /non-human-identities: get: - summary: Get tokens - description: - Returns a list of first-party API tokens for your organization. - Requires admin access. - operationId: getTokens + description: Returns a list of non-human identities for your organization. + operationId: get_nhis parameters: - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -4913,784 +5525,5033 @@ paths: type: integer maximum: 1000 style: form - - description: Filter by token IDs. - explode: false - in: query - name: token_ids - required: false - schema: - items: - format: uuid - type: string - type: array - style: form - - description: Filter by user ID. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac - explode: true - in: query - name: user_id - required: false - schema: - format: uuid - type: string - style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PaginatedTokensList" - description: A list of API tokens for your organization. + $ref: "#/components/schemas/PaginatedResourcesList" + description: One page worth non-human identities in your organization. security: - BearerAuth: [] tags: - - tokens - /tokens/{token_id}: - delete: - summary: Delete token - description: Deletes a first-party API token. Admins can delete any token. - Non-admins can only delete their own tokens when the organization allows - all users to create API tokens. - operationId: deleteToken + - non-human-identities + /resources/{resource_id}/non-human-identities: + get: + description: Gets the list of non-human identities with access to this resource. + operationId: get_resource_nhis parameters: - - description: The ID of the token to delete. - example: f454d283-ca87-4a8a-bdbb-df212eca5353 + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: token_id + name: resource_id required: true schema: format: uuid type: string style: simple - responses: - "200": - description: The token was successfully deleted. - "403": - description: Not authorized to delete this token. - "404": - description: Token not found. - security: - - BearerAuth: [] - tags: - - tokens - /uars: - get: - description: Returns a list of `UAR` objects. - operationId: getUARs - parameters: - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - - description: Number of results to return per page. Default is 200. + - description: Limit the number of results returned. example: 200 explode: true in: query - name: page_size + name: limit required: false schema: type: integer - maximum: 1000 style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PaginatedUARsList" - description: A list of UARs for your organization. - security: - - BearerAuth: [] - tags: - - uars - /uar: - post: - description: Starts a User Access Review. - operationId: create_uar - requestBody: - description: The settings of the UAR. - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/CreateUARInfo" - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/UAR" - description: The UAR that was started. + $ref: "#/components/schemas/AccessList" + description: List of non-human identities with access to this resource. security: - BearerAuth: [] tags: - - uars - /uar/{uar_id}: + - resources + /resources/{resource_id}/users: get: - description: Retrieves a specific UAR. - operationId: get_uar + summary: Get resource users + description: Gets the list of users for this resource. + operationId: get_resource_users parameters: - - description: The ID of the UAR. + - description: The ID of the resource. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: uar_id + name: resource_id required: true schema: format: uuid type: string style: simple + - description: Limit the number of results returned. + example: 200 + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/UAR" - description: The UAR that was requested. + $ref: "#/components/schemas/ResourceAccessUserList" + description: List of users with access to this resource. security: - BearerAuth: [] tags: - - uars - /sync_errors: - get: - description: - Returns a list of recent sync errors that have occurred since the - last successful sync. - operationId: getSyncErrors + - resources + /resources/{resource_id}/non-human-identities/{non_human_identity_id}: + post: + description: Gives a non-human identity access to this resource. + operationId: add_resource_nhi parameters: - - description: The ID of the app to list sync errors for. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac - explode: false - in: query - name: app_id - required: false - schema: - format: uuid - type: string - style: form - - description: The ID of the resource to list sync errors for. + - description: The ID of the resource. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false - in: query + in: path name: resource_id - required: false + required: true schema: format: uuid type: string - style: form - - description: The ID of the group to list sync errors for. - example: 9546209c-42c2-4801-96d7-9ec42df0f59c + style: simple + - description: The resource ID of the non-human identity to add. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 explode: false - in: query - name: group_id - required: false + in: path + name: non_human_identity_id + required: true schema: format: uuid type: string - style: form + style: simple + requestBody: + required: false + content: + application/json: + schema: + example: + duration_minutes: 60 + access_level_remote_id: roles/cloudsql.instanceUser + properties: + duration_minutes: + description: + The duration for which the resource can be accessed (in minutes). + Use 0 to set to indefinite. + example: 60 + type: integer + maximum: 153722867 # Largest duration Opal can represent (~292 years) + access_level_remote_id: + description: + The remote ID of the access level to grant. If omitted, the default + access level remote ID value (empty string) is used. + example: roles/cloudsql.instanceUser + type: string + required: + - duration_minutes + type: object responses: "200": content: application/json: schema: - items: - $ref: "#/components/schemas/SyncErrorList" - type: array - description: A list of sync errors. + $ref: "#/components/schemas/ResourceNHI" + description: + Details about the access that the non-human identity was granted to + the resource. security: - BearerAuth: [] tags: - - apps - /delegations: - get: - summary: Get delegations - description: - Returns a list of request reviewer delegations configured for your - organization. - operationId: getDelegations + - resources + delete: + description: Removes a non-human identity's direct access from this resource. + operationId: delete_resource_nhi parameters: - - description: - The delegator user ID to filter delegations by the user delegating - their access review requests. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac - explode: true - in: query - name: delegator_user_id - required: false + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: resource_id + required: true schema: format: uuid type: string - style: form + style: simple - description: - The delegate user ID to filter delegations by the user being - delegated to. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac - explode: true - in: query - name: delegate_user_id - required: false + The resource ID of the non-human identity to remove from this + resource. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + explode: false + in: path + name: non_human_identity_id + required: true schema: format: uuid type: string - style: form - - description: A cursor to indicate where to start fetching results. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + style: simple + - description: + The remote ID of the access level for which this non-human identity + has direct access. If omitted, the default access level remote ID + value (empty string) is assumed. + example: roles/cloudsql.instanceUser explode: true in: query - name: cursor + name: access_level_remote_id required: false schema: type: string style: form - - description: The maximum number of results to return per page. The default is 200. - example: 200 - explode: true - in: query - name: page_size - required: false - schema: - type: integer - maximum: 1000 - style: form responses: "200": - content: - application/json: - schema: - $ref: "#/components/schemas/PaginatedDelegationsList" - description: A list of delegations for your organization. + description: + This non-human identity's access was successfully removed from this + resource. security: - BearerAuth: [] tags: - - delegations - post: - description: - Creates a new request reviewer delegation to delegate access review - requests from one user to another. - operationId: createDelegation + - resources + /resources/{resource_id}/users/{user_id}: + post: + description: Adds a user to this resource. + operationId: add_resource_user + parameters: + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the user to add. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + - description: + The duration for which the resource can be accessed (in minutes). + Use 0 to set to indefinite. + example: 60 + explode: true + in: query + name: duration_minutes + required: false + schema: + type: integer + maximum: 153722867 # Largest duration Opal can represent (~292 years) + style: form + deprecated: true + - description: + The remote ID of the access level to grant to this user. If + omitted, the default access level remote ID value (empty string) is + used. + example: arn:aws:iam::590304332660:role/AdministratorAccess + explode: true + in: query + name: access_level_remote_id + required: false + schema: + type: string + style: form + deprecated: true requestBody: - required: true + required: false content: application/json: schema: - $ref: "#/components/schemas/CreateDelegationRequest" + example: + duration_minutes: 60 + access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess + properties: + duration_minutes: + description: + The duration for which the resource can be accessed (in minutes). + Use 0 to set to indefinite. + example: 60 + type: integer + maximum: 153722867 # Largest duration Opal can represent (~292 years) + access_level_remote_id: + description: + The remote ID of the access level to grant to this user. If + omitted, the default access level remote ID value (empty + string) is used. + example: arn:aws:iam::590304332660:role/AdministratorAccess + type: string + required: + - duration_minutes + type: object responses: "200": content: application/json: schema: - $ref: "#/components/schemas/Delegation" - description: Delegation created successfully. + $ref: "#/components/schemas/ResourceUser" + description: The ResourceUser that was created. security: - BearerAuth: [] tags: - - delegations - /delegations/{delegation_id}: - get: - summary: Get delegation by ID - description: Returns a specific delegation by its ID. - operationId: getDelegation + - resources + put: + description: Updates a user's access level or duration on this resource. + operationId: update_resource_user parameters: - - description: The ID of the delegation to retrieve. - example: 32acc112-21ff-4669-91c2-21e27683eaa1 - explode: true + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 in: path - name: delegation_id + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the user whose access is being updated. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + in: path + name: user_id required: true schema: format: uuid type: string style: simple + requestBody: + required: true + content: + application/json: + schema: + type: object + example: + duration_minutes: 60 + access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess + properties: + duration_minutes: + description: + The updated duration for which the resource can be accessed (in + minutes). Use 0 for indefinite. + type: integer + maximum: 153722867 # Largest duration Opal can represent (~292 years) + example: 120 + access_level_remote_id: + description: The updated remote ID of the access level granted to this user. + type: string + example: arn:aws:iam::590304332660:role/ReadOnlyAccess + required: + - duration_minutes responses: "200": + description: The ResourceUser was successfully updated. content: application/json: schema: - $ref: "#/components/schemas/Delegation" - description: The requested delegation. + $ref: "#/components/schemas/ResourceUser" security: - BearerAuth: [] tags: - - delegations + - resources delete: - description: Deletes a delegation by its ID. - operationId: deleteDelegation + description: Removes a user's direct access from this resource. + operationId: delete_resource_user parameters: - - description: The ID of the delegation to remove. - example: 32acc112-21ff-4669-91c2-21e27683eaa1 - explode: true + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false in: path - name: delegation_id + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of a user to remove from this resource. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + explode: false + in: path + name: user_id required: true schema: format: uuid type: string style: simple + - description: + The remote ID of the access level for which this user has direct + access. If omitted, the default access level remote ID value (empty + string) is assumed. + example: arn:aws:iam::590304332660:role/AdministratorAccess + explode: true + in: query + name: access_level_remote_id + required: false + schema: + type: string + style: form responses: "200": - description: Delegation removed successfully + description: This user's access was successfully removed from this resource. security: - BearerAuth: [] tags: - - delegations - -components: - schemas: - AccessEntityFilters: - type: object - description: - Filters for matching entities by type, name, tag, IDs, connections, - or access levels. Supports recursive logical composition via - allOf/anyOf. - properties: - entityTypes: - type: array - description: Filter by entity type. Only RESOURCE, GROUP, and USER are - queryable via OpalQuery. - items: - type: string - enum: [RESOURCE, GROUP, USER] - entityItemTypes: - type: array - description: Filter by entity item types. - items: - $ref: "#/components/schemas/EntityItemTypeEnum" - entityName: - $ref: "#/components/schemas/EntityNameFilter" - entityTag: - $ref: "#/components/schemas/EntityTagFilter" - entityIDs: - type: array - description: Filter by specific entity UUIDs. - items: - type: string + - resources + get: + summary: Get resource user + description: Returns information about a specific user's access to a resource. + operationId: getResourceUser + parameters: + - description: The ID of the resource. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + in: path + name: resource_id + required: true + schema: format: uuid - importedFromApp: - type: array - description: Filter by app IDs from which returned nodes will be imported from. - items: type: string + style: simple + - description: The ID of the user. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + in: path + name: user_id + required: true + schema: format: uuid - roleRemoteIds: - type: array - description: Filter by role remote IDs. Can only be applied within a hasAccessTo clause. - items: type: string - roleNames: - type: array - description: Filter by role display names (e.g. "Admin", "Read"). Can only be applied within a hasAccessTo clause. - items: + style: simple + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: type: string - allOf: - type: array - description: > - A list of nested filters that must all match (logical AND). Each - item has the same shape as this object — scalar fields like - `entityTypes` or `entityTag`, and can further nest `allOf`, - `anyOf`, or `not`. - items: - $ref: "#/components/schemas/AccessEntityFilters" - anyOf: - type: array - description: > - A list of nested filters where at least one must match (logical + style: form + responses: + "200": + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ResourceUser" + cursor: + type: string + description: Pagination cursor for the next page of results + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + total_count: + type: integer + description: Total number of results + example: 120 + required: + - data + description: List of ResourceUser records for the user's access to the resource. + "404": + description: Resource or user not found. + security: + - BearerAuth: [] + tags: + - resources + /resource-user-access-status/{resource_id}/{user_id}: + get: + deprecated: true + description: Get user's access status to a resource. + operationId: resource_user_access_status_retrieve + parameters: + - description: The ID of the resource. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the user. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + - description: + The remote ID of the access level that you wish to query for the + resource. If omitted, the default access level remote ID value + (empty string) is used. + example: arn:aws:iam::590304332660:role/AdministratorAccess + explode: true + in: query + name: access_level_remote_id + required: false + schema: + type: string + style: form + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceUserAccessStatus" + description: The access status reflecting the user's access to the resource. + security: + - BearerAuth: [] + tags: + - resources + /resources/{resource_id}/tags: + get: + description: Returns all tags applied to the resource. + operationId: get_resource_tags + parameters: + - description: The ID of the resource whose tags to return. + name: resource_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TagsList" + description: The tags applied to the resource. + security: + - BearerAuth: [] + tags: + - resources + /resources/{resource_id}/scoped-role-permissions: + get: + description: + Returns all the scoped role permissions that apply to the given + resource. Only OPAL_SCOPED_ROLE resource type supports this field. + operationId: get_resource_scoped_role_permissions + parameters: + - description: The ID of the resource whose scoped role permissions belong to. + name: resource_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ScopedRolePermissionList" + description: The role permissions that this Opal Scoped Role has. + security: + - BearerAuth: [] + tags: + - resources + put: + description: Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. + operationId: set_resource_scoped_role_permissions + parameters: + - description: + The ID of the resource whose scoped role permissions belong to. + Must be of OPAL_SCOPED_ROLE resource type. + name: resource_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ScopedRolePermissionList" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ScopedRolePermissionList" + description: The role permissions that this Opal Scoped Role has. + security: + - BearerAuth: [] + tags: + - resources + /resources/{resource_id}/custom-access-levels: + get: + description: Returns all custom access levels for a resource. If the resource is a parent type (e.g. GitHubOrg), returns aggregated roles across child resources. + operationId: get_resource_custom_access_levels + parameters: + - description: The ID of the resource. + name: resource_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + in: path + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceCustomAccessLevelList" + description: The custom access levels for the resource. + "400": + description: Unsupported resource type. + "404": + description: Resource not found or access denied. + security: + - BearerAuth: [] + tags: + - resources + post: + description: Creates a custom access level on a resource. If the resource is a parent type, the role is created on all child resources. + operationId: create_resource_custom_access_level + parameters: + - description: The ID of the resource. + name: resource_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + in: path + required: true + schema: + format: uuid + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateResourceCustomAccessLevelInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceCustomAccessLevelResponse" + description: The created custom access level. + "400": + description: Unsupported resource type. + "404": + description: Resource not found or access denied. + "409": + description: A custom access level with this remote ID already exists. + security: + - BearerAuth: [] + tags: + - resources + /resources/{resource_id}/custom-access-levels/{access_level_remote_id}: + patch: + description: Updates a custom access level identified by its remote ID. If the resource is a parent type, the update fans out to all child resources. + operationId: update_resource_custom_access_level + parameters: + - description: The ID of the resource. + name: resource_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + in: path + required: true + schema: + format: uuid + type: string + - description: The remote ID of the access level. + name: access_level_remote_id + example: admin + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateResourceCustomAccessLevelInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceCustomAccessLevelResponse" + description: The updated custom access level. + "400": + description: Unsupported resource type. + "404": + description: Resource or access level not found, or access denied. + security: + - BearerAuth: [] + tags: + - resources + delete: + description: Deletes a custom access level identified by its remote ID. If the resource is a parent type, the deletion fans out to all child resources. + operationId: delete_resource_custom_access_level + parameters: + - description: The ID of the resource. + name: resource_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + in: path + required: true + schema: + format: uuid + type: string + - description: The remote ID of the access level. + name: access_level_remote_id + example: admin + in: path + required: true + schema: + type: string + responses: + "200": + description: Successfully deleted. + "400": + description: Unsupported resource type. + "404": + description: Resource or access level not found, or access denied. + security: + - BearerAuth: [] + tags: + - resources + /resources/users/{user_id}: + get: + description: Gets the list of resources for this user. + operationId: get_user_resources + parameters: + - description: The ID of the user. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + - description: Limit the number of results returned. + example: 200 + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Include user's access to unmanaged resources. + example: false + explode: true + in: query + name: include_unmanaged + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceAccessUserList" + description: List of resources user has access to. + security: + - BearerAuth: [] + tags: + - resources + /resources/{resource_id}/groups: + get: + description: Returns a list of groups that grant access to the resource + operationId: get_resource_groups + parameters: + - description: The ID of the resource that the groups grant access to. + name: resource_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GroupResourceList" + description: The groups that grant access to the resource. + security: + - BearerAuth: [] + tags: + - resources + /resources/{resource_id}/access_levels: + get: + summary: Get resource access levels + description: + Returns the list of access levels defined for the resource. Resources + that only offer default (unnamed) access return an empty list. + operationId: get_resource_access_levels + parameters: + - description: The ID of the resource whose access levels to return. + name: resource_id + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceAccessLevelList" + description: The access levels defined for the resource. + "404": + description: Resource not found. + security: + - BearerAuth: [] + tags: + - resources + /paladin: + post: + summary: Create Paladin + description: Creates a new `Paladin`. + operationId: createPaladin + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreatePaladinInfo" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Paladin" + description: The created Paladin. + security: + - BearerAuth: [] + tags: + - paladin + /paladin/{paladin_id}: + get: + summary: Get Paladin by ID + description: Returns a `Paladin` object. + operationId: getPaladin + parameters: + - description: The ID of the Paladin. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: paladin_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Paladin" + description: The Paladin associated with the passed-in ID. + security: + - BearerAuth: [] + tags: + - paladin + put: + summary: Update Paladin + description: Updates a `Paladin` object. + operationId: updatePaladin + parameters: + - description: The ID of the Paladin. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: paladin_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdatePaladinInfo" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Paladin" + description: The updated Paladin. + security: + - BearerAuth: [] + tags: + - paladin + delete: + summary: Delete Paladin + description: Deletes a Paladin, removing the underlying service user. + operationId: deletePaladin + parameters: + - description: The ID of the Paladin. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: paladin_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: The Paladin was deleted. + security: + - BearerAuth: [] + tags: + - paladin + /paladin/name/{paladin_name}: + get: + summary: Get Paladins by name + description: + Returns all Paladins whose name exactly matches the given name. Names + are not unique, so the result is a list and may be empty. + operationId: getPaladinFromName + parameters: + - description: The name of the Paladin. + example: paladin-agent-1 + explode: true + in: path + name: paladin_name + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaladinList" + description: The list of Paladins matching the passed-in name. + security: + - BearerAuth: [] + tags: + - paladin + /paladin/{paladin_id}/context-sources: + get: + summary: List Paladin context sources + description: + Returns the context sources (Slack channels and documents) configured + for a Paladin. + operationId: listPaladinContextSources + parameters: + - description: The ID of the Paladin. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: paladin_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaladinContextSourceList" + description: The context sources configured for the Paladin. + security: + - BearerAuth: [] + tags: + - paladin + post: + summary: Add a Paladin context source + description: + Configures a context source (a Slack channel or a document) for a + Paladin to read. Idempotent, so re-adding an existing source returns it. + operationId: createPaladinContextSource + parameters: + - description: The ID of the Paladin. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: paladin_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreatePaladinContextSourceInfo" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaladinContextSource" + description: The configured context source. + security: + - BearerAuth: [] + tags: + - paladin + /paladin/{paladin_id}/context-sources/{context_source_id}: + delete: + summary: Remove a Paladin context source + description: Removes a context source from a Paladin. + operationId: deletePaladinContextSource + parameters: + - description: The ID of the Paladin. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: paladin_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the context source. + example: 8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8 + explode: true + in: path + name: context_source_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: The context source was removed. + security: + - BearerAuth: [] + tags: + - paladin + /service-users: + post: + summary: Create service user + description: | + Creates a new service user (a non-human identity owned by a team). Mirrors + the GraphQL `createServiceUser` mutation; admin-only. + + The returned `User` object is the newly created service user and is a + regular `User` row — read it later via `GET /users/{user_id}`, delete it + with `DELETE /users/{user_id}`, and manage its tags via the usual + `/users/{user_id}/tags` endpoints. + + **Role grants are a separate concern.** To grant a service user access + to resources or groups, use `POST /role-assignments` (or the per-pair + endpoints such as `/resources/{id}/users/{id}`). Keeping role + assignments out of this request body means each grant stays + independently addressable — the shape Terraform and other declarative + clients prefer, with no field here that would silently drift when a + grant is added or revoked through a different code path. + + **Automations are not configurable here either.** The GraphQL mutation + accepts a wide typed-union of automation configuration; that surface is + intentionally omitted from this REST endpoint for the same reason. + Service users created through this endpoint start with no automations. + operationId: createServiceUser + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateServiceUserRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: The created service user. + "400": + description: | + Invalid request body: malformed JSON, unknown field, missing or + empty `name`, or missing / malformed `owner_id`. + "403": + description: Caller is not an admin. + "404": + description: The `owner_id` does not reference an owner in the organization. + security: + - BearerAuth: [] + tags: + - service-users + /sessions: + get: + description: Returns a list of `Session` objects. + operationId: sessions + parameters: + - description: The ID of the resource. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: true + in: query + name: resource_id + required: true + schema: + format: uuid + type: string + style: form + - description: The ID of the user you wish to query sessions for. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: query + name: user_id + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SessionsList" + description: The sessions associated with a resource. + security: + - BearerAuth: [] + tags: + - sessions + /user: + get: + description: Returns a `User` object. + operationId: user + parameters: + - description: The user ID of the user. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: query + name: user_id + required: false + schema: + format: uuid + type: string + style: form + - description: + The email of the user. If both user ID and email are provided, user + ID will take precedence. If neither are provided, an error will + occur. + example: johndoe@domain.org + explode: true + in: query + name: email + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: The user object associated with the passed-in email or ID. + security: + - BearerAuth: [] + tags: + - users + /users: + get: + description: + Returns a list of users for your organization. Includes agent-labeled + identities that appear on the Users page. Classic service accounts are + not included. + operationId: getUsers + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + - description: + The IDs of the tags to filter by. Returns only users that have any + of these tags applied. + in: query + name: tag_ids + required: false + schema: + type: array + items: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedUsersList" + description: One page worth users in your organization. + security: + - BearerAuth: [] + tags: + - users + post: + description: Invites a user to your organization. + operationId: inviteUser + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/InviteUserInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: The invited user. + "400": + description: The invite input is invalid. + "403": + description: The caller is not authorized to invite users. + "409": + description: The user already belongs to another organization. + security: + - BearerAuth: [] + tags: + - users + /users/{user_id}: + get: + summary: Get user by ID + description: Returns a `User` object. + operationId: getUserByID + parameters: + - description: The ID of the user. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: The requested `User`. + "404": + description: The user was not found. + security: + - BearerAuth: [] + tags: + - users + delete: + description: Deletes a user from your organization. + operationId: deleteUser + parameters: + - description: The ID of the user to delete. + in: path + name: user_id + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: The deleted user. + "403": + description: The caller is not authorized to delete the user. + "404": + description: The user was not found. + "409": + description: The user cannot be deleted in its current state. + security: + - BearerAuth: [] + tags: + - users + patch: + description: Updates a user's position or manager. + operationId: updateUser + parameters: + - description: The ID of the user to update. + in: path + name: user_id + required: true + schema: + format: uuid + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateUserInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: The updated user. + "400": + description: The update input is invalid. + "403": + description: The caller is not authorized to update the user. + "404": + description: The user was not found. + "409": + description: The user is managed by an identity provider or is immutable. + security: + - BearerAuth: [] + tags: + - users + /users/{user_id}/access: + get: + summary: Get a user's access + description: | + Returns all of the resources and groups the user has access to, in a single list. All + results are returned unless `page_size` is set, in which case the list is paginated. + Includes access the user has directly and access they have indirectly (for example, through + group membership or nested groups). Use `has_direct_access` and `num_access_paths` to tell + them apart. + + Each row is one (resource or group, access level) pair. Only assignments the caller is + allowed to read are returned, so the list can be empty or partial for a caller without + permission to read assignments on the user's resources and groups. Results are ordered by + entity ID; the order is stable across pages but has no other meaning. + operationId: get_user_access + parameters: + - description: The ID of the user whose access to return. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + name: user_id + in: path + required: true + schema: + format: uuid + type: string + style: simple + - description: The `next` cursor from a previous response. Resumes the list at that point. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: | + Number of results to return per page. Maximum is 1000. If omitted, all results are + returned in a single response and `next` is null. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + - description: Only return access to this type of entity. Omit to return both resources and groups. + explode: true + in: query + name: entity_type + required: false + schema: + $ref: "#/components/schemas/UserAccessEntityTypeEnum" + style: form + - description: Include the user's access to unmanaged resources. + example: false + explode: true + in: query + name: include_unmanaged + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/UserAccessList" + description: The resources and groups the user has access to. + "400": + description: The cursor, `entity_type`, or `user_id` is invalid. + "404": + description: The user was not found. + security: + - BearerAuth: [] + tags: + - users + /users/{user_id}/mfa/reset: + post: + summary: Reset a user's Opal MFA + description: | + Deletes the user's Auth0 (Opal) MFA enrollments so they are prompted to + re-enroll on their next sign-in. Only applies to orgs that use Opal/Auth0 + for MFA (not available on-prem, and a no-op success for users who have + never signed into Auth0). + operationId: resetUserMfa + parameters: + - description: The ID of the user whose MFA should be reset. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: | + The MFA enrollments were reset, or the user has no Auth0 enrollments + to reset (never signed into Auth0). + content: + application/json: + schema: + type: object + properties: + success: + type: boolean + required: + - success + "400": + description: | + The deployment does not support MFA reset (on-prem), the organization + does not use Opal/Auth0 MFA, or the request body contained unknown + JSON fields. + "403": + description: The caller is not authorized to reset MFA for this user. + "404": + description: The user was not found. + "409": + description: The Opal system user cannot be modified. + security: + - BearerAuth: [] + tags: + - users + /users/{user_id}/revoke-all: + post: + summary: Revoke all of a user's access + description: | + Immediately removes all of a user's access across connected systems, + regardless of the user's status in the identity provider. Intended for + incident response, e.g. a security tool reacting to a compromised account. + Ends the user's Opal sessions, deletes their Opal API tokens and + third-party tokens, revokes their MCP OAuth grants, removes their direct + group, access rule and resource access (pushing the removals to the + connected systems), and cancels their pending access requests. Recorded + as a USER_ACCESS_REVOKED event with the caller as the actor. + + This does not lock the user out, and the revocation does not last on its + own. The user and their accounts in connected systems are kept, and they + can sign in again through your identity provider. Access granted by Opal + access rules is granted again on the next access rule sync while the user + still matches the rule, and memberships that identity provider rules + control return on the next identity provider sync. To keep the user's + access revoked, also disable or deprovision them in your identity + provider. With the organization setting that revokes access for + deprovisioned users turned on, Opal then offboards them and stops granting + them access through access rules. + + Also not removed: membership in groups computed by a connected system + (e.g. dynamic groups), access to unmanaged groups and resources, and the + user's owner and reviewer roles. Removal from connected systems runs + asynchronously; a 200 response means the removals were started, not that + every connected system has finished. A removal that failed permanently + before is retried. A removal that is already in progress is left to + finish and is not started again, so check its propagation status if it + stays pending. + operationId: revokeAllUserAccess + parameters: + - description: The ID of the user whose access should be revoked. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: The user's access removal was started. + content: + application/json: + schema: + type: object + properties: + success: + type: boolean + required: + - success + "400": + description: The request body contained unknown JSON fields. + "403": + description: The caller is not authorized to delete this user. + "404": + description: The user was not found. + "409": + description: | + The Opal system user cannot be modified, or the user is the last direct + Opal admin. Their API tokens, third-party tokens and MCP OAuth grants are + still revoked and their pending requests still canceled in that case. + security: + - BearerAuth: [] + tags: + - users + /users/remote_users: + get: + description: Returns a list of remote users for your organization. + operationId: getRemoteUsers + parameters: + - description: Filter remote users by their third party provider. + example: [GIT_HUB] + in: query + name: third_party_provider + required: false + schema: + type: array + items: + $ref: "#/components/schemas/ThirdPartyProviderEnum" + style: form + - description: Filter remote users by their user ID. + example: [32acc112-21ff-4669-91c2-21e27683eaa1] + in: query + name: user_id + required: false + schema: + type: array + items: + type: string + format: uuid + style: form + - description: Filter remote users by their remote ID. + example: [1234567890] + in: query + name: remote_id + required: false + schema: + type: array + items: + type: string + style: form + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedRemoteUsersList" + description: One page worth users in your organization. + security: + - BearerAuth: [] + tags: + - users + /users/whoami: + get: + description: Returns the user that the provided API token authenticates as. + operationId: getUserWhoami + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: The user that the API token authenticates as. + security: + - BearerAuth: [] + tags: + - users + /users/{user_id}/tags: + get: + description: Returns all tags applied to the user. + operationId: get_user_tags + parameters: + - description: The ID of the user whose tags to return. + name: user_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TagsList" + description: The tags applied to the user. + security: + - BearerAuth: [] + tags: + - users + /access-rules: + get: + description: Returns a list of access rules for your organization. + operationId: get_access_rules + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedAccessRulesList" + description: One page of access rules for your organization. + security: + - BearerAuth: [] + tags: + - access-rules + post: + description: Creates a new access rule config for the given group_id. + operationId: create_access_rule + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateAccessRuleInfo" + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/AccessRule" + description: The created access rule config for the group. + security: + - BearerAuth: [] + tags: + - access-rules + /access-rules/{access_rule_id}: + get: + description: + Returns a list of access rule config given the group_id of the + access rule. + operationId: get_access_rule + parameters: + - description: The access rule ID (group ID) of the access rule. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: access_rule_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AccessRule" + description: The access rules for the group. + security: + - BearerAuth: [] + tags: + - access-rules + put: + description: Updates the access rule config for the given group_id. + operationId: update_access_rule + parameters: + - description: The access rule ID (group ID) of the access rule. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: access_rule_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateAccessRuleInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AccessRule" + description: The updated access rule config for the group. + security: + - BearerAuth: [] + tags: + - access-rules + /tag/{tag_id}: + get: + summary: Get tag by ID + description: UNSTABLE. May be removed at any time. Gets a tag with the given id. + operationId: get_tag_by_ID + parameters: + - description: The tag ID + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: tag_id + required: true + schema: + type: string + format: uuid + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Tag" + description: The tag requested. + security: + - BearerAuth: [] + tags: + - tags + delete: + description: UNSTABLE. May be removed at any time. Deletes a tag with the given id. + operationId: delete_tag_by_ID + parameters: + - description: The tag ID + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: tag_id + required: true + schema: + type: string + format: uuid + style: simple + responses: + "200": + description: Tag was deleted. + security: + - BearerAuth: [] + tags: + - tags + /tag: + get: + description: Gets a tag with the given key and value. + operationId: get_tag + parameters: + - description: The key of the tag to get. + example: api-scope + explode: false + in: query + name: tag_key + required: true + schema: + type: string + style: form + - description: The value of the tag to get. + example: production + explode: false + in: query + name: tag_value + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Tag" + description: The tag requested. + security: + - BearerAuth: [] + tags: + - tags + post: + description: Creates a tag with the given key and value. + operationId: create_tag + parameters: + - description: The key of the tag to create. + example: api-scope + explode: false + in: query + name: tag_key + required: false + schema: + type: string + style: form + deprecated: true + - description: The value of the tag to create. + example: production + explode: false + in: query + name: tag_value + required: false + schema: + type: string + style: form + deprecated: true + - description: The ID of the owner that manages the tag. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + explode: false + in: query + name: admin_owner_id + schema: + format: uuid + type: string + style: form + deprecated: true + requestBody: + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/CreateTagInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Tag" + description: The tag that was created. + security: + - BearerAuth: [] + tags: + - tags + /tags: + get: + summary: Get tags + description: Returns a list of tags created by your organization. + operationId: getTags + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedTagsList" + description: A list of tags created by your organization. + security: + - BearerAuth: [] + tags: + - tags + /tags/{tag_id}/users/{user_id}: + post: + description: Applies a tag to a user. + operationId: add_user_tag + parameters: + - description: The ID of the tag to apply. + name: tag_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the user to apply the tag to. + name: user_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + required: false + content: + application/json: + schema: + type: object + responses: + "200": + description: Tag applied to user successfully. + security: + - BearerAuth: [] + tags: + - tags + delete: + description: Removes a tag from a user. + operationId: remove_user_tag + parameters: + - description: The ID of the tag to remove. + name: tag_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the user to remove the tag from. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: Tag removed from user successfully. + security: + - BearerAuth: [] + tags: + - tags + /tags/{tag_id}/groups/{group_id}: + post: + description: Applies a tag to a group. + operationId: add_group_tag + parameters: + - description: The ID of the tag to apply. + name: tag_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the group to apply the tag to. + name: group_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: Tag applied to group successfully. + security: + - BearerAuth: [] + tags: + - tags + delete: + description: Removes a tag from a group. + operationId: remove_group_tag + parameters: + - description: The ID of the tag to remove. + name: tag_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the group to remove the tag from. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: group_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: Tag removed from group successfully. + security: + - BearerAuth: [] + tags: + - tags + /tags/{tag_id}/resources/{resource_id}: + post: + description: Applies a tag to a resource. + operationId: add_resource_tag + parameters: + - description: The ID of the tag to apply. + name: tag_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the resource to apply the tag to. + name: resource_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: Tag applied to resource successfully. + security: + - BearerAuth: [] + tags: + - tags + delete: + description: Removes a tag from a resource. + operationId: remove_resource_tag + parameters: + - description: The ID of the tag to remove. + name: tag_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the resource to remove the tag from. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: Tag removed from resource successfully. + security: + - BearerAuth: [] + tags: + - tags + /message-channels: + get: + summary: Get message channels + description: Returns a list of `MessageChannel` objects. + operationId: get_message_channels + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/MessageChannelList" + description: A list of message channels for your organization. + security: + - BearerAuth: [] + tags: + - message-channels + post: + description: Creates a `MessageChannel` objects. + operationId: create_message_channel + requestBody: + description: The `MessageChannel` object to be created. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateMessageChannelInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/MessageChannel" + description: The message channel that was created. + security: + - BearerAuth: [] + tags: + - message-channels + /message-channels/{message_channel_id}: + get: + summary: Get message channel by ID + description: Gets a `MessageChannel` object. + operationId: get_message_channel + parameters: + - description: The ID of the message_channel. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: message_channel_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/MessageChannel" + description: The requested message channel. + security: + - BearerAuth: [] + tags: + - message-channels + /on-call-schedules: + get: + summary: Get on call schedules + description: Returns a list of `OnCallSchedule` objects. + operationId: get_on_call_schedules + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OnCallScheduleList" + description: A list of on call schedules for your organization. + security: + - BearerAuth: [] + tags: + - on-call-schedules + post: + description: Creates a `OnCallSchedule` objects. + operationId: create_on_call_schedule + requestBody: + description: The `OnCallSchedule` object to be created. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateOnCallScheduleInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OnCallSchedule" + description: The on call schedule that was created. + security: + - BearerAuth: [] + tags: + - on-call-schedules + /on-call-schedules/{on_call_schedule_id}: + get: + summary: Get on call schedule by ID + description: Gets a `OnCallSchedule` object. + operationId: get_on_call_schedule + parameters: + - description: The ID of the on_call_schedule. + example: 9546209c-42c2-4801-96d7-9ec42df0f59c + explode: false + in: path + name: on_call_schedule_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OnCallSchedule" + description: The requested on call schedule. + security: + - BearerAuth: [] + tags: + - on-call-schedules + /queries/run: + post: + summary: Run an ad-hoc OpalQuery + description: > + Executes an ad-hoc OpalQuery and returns paginated results. Two query + types are supported: a **Node** query filters and returns entities + (users, resources, or groups); an **Access** query returns the access + grants between principals and their entitlements, one per + (principal, entitlement, access level). Set `type` to `NODE` or + `ACCESS` in the request body to select the query type. + + + This endpoint is available to OpalQuery beta participants. To request + access, contact Opal support. + operationId: runOpalQuery + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/RunOpalQueryRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OpalQueryResults" + description: The results of the OpalQuery. + security: + - BearerAuth: [] + tags: + - opal-queries + /tokens: + get: + summary: Get tokens + description: + Returns a list of first-party API tokens for your organization. + Requires admin access. + operationId: getTokens + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + - description: Filter by token IDs. + explode: false + in: query + name: token_ids + required: false + schema: + items: + format: uuid + type: string + type: array + style: form + - description: Filter by user ID. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: true + in: query + name: user_id + required: false + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedTokensList" + description: A list of API tokens for your organization. + security: + - BearerAuth: [] + tags: + - tokens + post: + summary: Create token + description: | + Creates a first-party API token. Omit `user_id` (or set it to the + caller's ID) to create a token for yourself. Set `user_id` to a service + user's ID to mint a token that authenticates as that service user. + Creating a token for another human user is not allowed. + + The `signed_token` value in the response is the secret credential and is + only returned once at creation time. + operationId: createToken + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateTokenInfo" + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/CreateTokenResponse" + description: The created API token. `signed_token` is only returned on creation. + "400": + description: Invalid request body. + "403": + description: Not authorized to create this token. + "409": + description: | + Conflict — the target service user already has the maximum number of + active API tokens (2). Delete an existing token before creating another. + security: + - BearerAuth: [] + tags: + - tokens + /tokens/{token_id}: + delete: + summary: Delete token + description: Deletes a first-party API token. Admins can delete any token. + Non-admins can only delete their own tokens when the organization allows + all users to create API tokens. + operationId: deleteToken + parameters: + - description: The ID of the token to delete. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + explode: false + in: path + name: token_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: The token was successfully deleted. + "403": + description: Not authorized to delete this token. + "404": + description: Token not found. + security: + - BearerAuth: [] + tags: + - tokens + /uars: + get: + deprecated: true + description: Returns a list of `UAR` objects. Deprecated in favor of `GET /campaigns`. + operationId: getUARs + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedUARsList" + description: A list of UARs for your organization. + security: + - BearerAuth: [] + tags: + - uars + /uar: + post: + deprecated: true + description: Starts a User Access Review. Deprecated in favor of `POST /campaigns`. + operationId: create_uar + requestBody: + description: The settings of the UAR. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateUARInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/UAR" + description: The UAR that was started. + security: + - BearerAuth: [] + tags: + - uars + /uar/{uar_id}: + get: + deprecated: true + description: Retrieves a specific UAR. Deprecated in favor of + `GET /campaigns/{campaign_id}`. + operationId: get_uar + parameters: + - description: The ID of the UAR. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: uar_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/UAR" + description: The UAR that was requested. + security: + - BearerAuth: [] + tags: + - uars + /sync_errors: + get: + description: + Returns a list of recent sync errors that have occurred since the + last successful sync. + operationId: getSyncErrors + parameters: + - description: The ID of the app to list sync errors for. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: false + in: query + name: app_id + required: false + schema: + format: uuid + type: string + style: form + - description: The ID of the resource to list sync errors for. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: query + name: resource_id + required: false + schema: + format: uuid + type: string + style: form + - description: The ID of the group to list sync errors for. + example: 9546209c-42c2-4801-96d7-9ec42df0f59c + explode: false + in: query + name: group_id + required: false + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/SyncErrorList" + type: array + description: A list of sync errors. + security: + - BearerAuth: [] + tags: + - apps + /delegations: + get: + summary: Get delegations + description: + Returns a list of request reviewer delegations configured for your + organization. + operationId: getDelegations + parameters: + - description: + The delegator user ID to filter delegations by the user delegating + their access review requests. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: true + in: query + name: delegator_user_id + required: false + schema: + format: uuid + type: string + style: form + - description: + The delegate user ID to filter delegations by the user being + delegated to. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: true + in: query + name: delegate_user_id + required: false + schema: + format: uuid + type: string + style: form + - description: A cursor to indicate where to start fetching results. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: The maximum number of results to return per page. The default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedDelegationsList" + description: A list of delegations for your organization. + security: + - BearerAuth: [] + tags: + - delegations + post: + description: + Creates a new request reviewer delegation to delegate access review + requests from one user to another. + operationId: createDelegation + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateDelegationRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Delegation" + description: Delegation created successfully. + security: + - BearerAuth: [] + tags: + - delegations + /delegations/{delegation_id}: + get: + summary: Get delegation by ID + description: Returns a specific delegation by its ID. + operationId: getDelegation + parameters: + - description: The ID of the delegation to retrieve. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: delegation_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Delegation" + description: The requested delegation. + security: + - BearerAuth: [] + tags: + - delegations + delete: + description: Deletes a delegation by its ID. + operationId: deleteDelegation + parameters: + - description: The ID of the delegation to remove. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: delegation_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: Delegation removed successfully + security: + - BearerAuth: [] + tags: + - delegations + +components: + schemas: + AgentActivityEvent: + description: |- + # AgentActivityEvent Object + ### Description + One activity event reported by an agent runtime: a Claude Code or Codex hook payload, + or a Cursor hook payload the Opal kit rewrote into the same shape, posted either by the + hook itself or by a relay that batches them. + + Only the fields below are read; everything else in the payload is parsed and + **discarded**, never persisted. That includes `transcript_path` / `scratchpad_dir` + (absolute paths on an employee's own laptop, which Opal cannot govern and should not + be accumulating). + + `prompt`, `tool_response` and `last_assistant_message` (the conversation content) are + stored only when the sender collects them (`opal_content` on the event, or the + `X-Opal-Content` header) and the organization stores content. Secrets in the shapes + Opal recognizes are masked and each text is cut to the organization's limit before + it is written. Otherwise they are discarded too. + + `tool_input` IS now read and stored. It was previously discarded pending a + data-handling decision; that decision has since been made, and without arguments + no policy can name what a call acted on - a rule about a file path, a command + family or a web domain refers to something that exists only inside `tool_input`. + properties: + hook_event_name: + description: + Which hook fired, e.g. `PostToolUse`, `PreToolUse`, `PermissionDenied`. Required; + an event with no name cannot be interpreted and is rejected. + type: string + tool_input: + description: |- + The call's arguments, as the runtime sent them. Server-defined for an MCP tool; + a fixed shape per built-in (`command` for Bash, `file_path` for Edit, `url` for + WebFetch). + + Stored as sent, and separately reduced to a normalized target the activity feed + and policy can match on. The stored copy is the record of fact; the derived + target is recomputed whenever the extractor improves. + + Capped before storage. A capped payload is no longer valid JSON, so the row + records that it was capped rather than leaving each reader to discover it by + failing to parse. + + A value that is not an object (Codex sends a string when a model's function + arguments are not valid JSON) is stored as `{"raw": }` rather than rejected. + type: object + additionalProperties: true + session_id: + description: The agent session this event belongs to. Opaque to Opal. + type: string + prompt_id: + description: + Groups every tool call made under one user instruction, so a run can be read + back as the instruction that caused it rather than as unrelated rows. + type: string + turn_id: + description: >- + Codex's id for one user turn. Codex sends no `prompt_id`, so for a Codex event this is + stored as the prompt id. Together with `model`, and with no `prompt_id`, it also marks an + event as coming from Codex when `opal_reported.client` is absent. + type: string + model: + description: >- + The model the runtime was using, as Codex reports it. Read only to tell Codex from + Claude Code; not stored. + type: string + cursor_version: + description: >- + The Cursor version, which Cursor adds to every hook input. Read only to mark an event as + coming from Cursor when `opal_reported.client` is absent; not stored. A Cursor tool-call + event named `preToolUse`, `postToolUse` or `postToolUseFailure` is stored under the + Claude Code name for the same event. + type: string + agent_id: + description: + Set only when the call came from an autonomous subagent rather than the session + a person is typing into. Stored as `subagent_id` - Opal's own `agent_id` already + means something else. + type: string + agent_type: + description: The subagent's type, e.g. `general-purpose`. Set alongside `agent_id`. + type: string + permission_mode: + description: + The session's permission mode, e.g. `default`, `acceptEdits`, + `bypassPermissions`. A session running `bypassPermissions` had no approval gate + in front of any tool call it made. + type: string + actor_email: + description: >- + The identity the sender reports for this specific event. **Unverified**, the same + as `X-Opal-Actor`, and used only when neither the API key nor that header + identified a developer. An `http` hook cannot populate this; a `command`-type + hook or a relay can (`$USER`, a hostname, `git config user.email`), which is why + it is per-event rather than per-request - a relay can batch several developers. + type: string + opal_reported: + $ref: "#/components/schemas/AgentActivityOpalReported" + duration_ms: + description: >- + How long the tool call took to run, in milliseconds, as Claude Code measured it. + Claude Code's documentation says it leaves out time spent in permission prompts and + in `PreToolUse` hooks. It is sent with `PostToolUse` and `PostToolUseFailure` only; it + is ignored on any other event. + **Unverified.** Stored only when it is a number from 0 to 86400000 (24 hours), rounded to + a whole millisecond; any other value is dropped and the event is stored without it. A + value of the wrong type never rejects the event or the batch it came in. + # Raw JSON, so a value of the wrong type is read by hand and never fails the parse. The + # generated file already imports encoding/json for the types that allow extra properties. + x-go-type: json.RawMessage + transcript_path: + description: >- + Read at ingest **only** to parse an operating-system username out of, as the + last-resort attribution step, and then discarded. The path itself is never + stored: it is an absolute path on an employee's laptop and Opal has no business + accumulating those. + type: string + tool_name: + description: |- + The tool invoked, for tool-scoped events. Empty for session-level events. + + An MCP tool is named `mcp____`. The whole string is stored as sent, + and the server and the tool are also stored in their own fields (see `mcp_server`). + type: string + mcp_server: + $ref: "#/components/schemas/AgentActivityMcpServer" + opal_mcp_server: + $ref: "#/components/schemas/AgentActivityOpalMcpServer" + tool_use_id: + description: + The tool invocation's id, used together with `hook_event_name` to deduplicate a + retried delivery. Absent on events that carry none, which are stored + at-least-once unless they are a prompt or the end of a turn with `session_id` and + `prompt_id`, or carry `opal_event_id`. + type: string + opal_event_id: + description: + An id Opal's hook kit gives each event it holds for sending, so that a retried + delivery of an event without a `tool_use_id` (a prompt, the end of a turn) is + stored once. Used only for an event that has no `tool_use_id` and is not a tool-call + event, and only when it is 8 to 64 letters, digits and dashes; otherwise ignored. + type: string + cwd: + description: The working directory the agent was operating in. + type: string + timestamp: + description: + When the client says the event occurred (RFC 3339). Clamped server-side to a + window around receipt, because a client-controlled sort key is otherwise a way + to pin rows to the top of every list. Defaults to receipt time when absent or + unparseable. + format: date-time + type: string + prompt: + description: |- + The text a person submitted (`UserPromptSubmit`), a string. Stored only as described + above. Read whatever its type, so that a change in its shape cannot make Opal refuse + the event. + tool_response: + description: |- + What the tool returned (`PostToolUse`), in the tool's own shape, or as text when the + sender already converted it. Stored only as described above, as text: every image + is replaced by a placeholder that names its type and size. + last_assistant_message: + description: |- + The text of the model's final message in the turn (`Stop`, `SubagentStop`), a string. + Stored only as described above, and only when `opal_content.assistant_text` is absent. + Read whatever its type, like `prompt`. + opal_content: + $ref: "#/components/schemas/AgentActivityContentReport" + required: + - hook_event_name + type: object + additionalProperties: true + AgentActivityContentReport: + description: |- + # AgentActivityContentReport Object + ### Description + What Opal's hook kit adds to an event when it collects conversation content. Its + presence means the sender collects content, like the `X-Opal-Content` header. The kit + has already masked secrets in the texts and cut them to its own limit. + properties: + assistant_text: + description: + Every text the model wrote in the turn, read from the session's transcript + (`Stop`, `SubagentStop`). Preferred over `last_assistant_message`, which holds only + the final message. + type: string + thinking: + description: + The model's thinking in the turn, when the transcript holds it as plain text. + type: string + images: + $ref: "#/components/schemas/AgentActivityImages" + truncated: + description: + The fields the kit cut (`prompt`, `tool_response`, `assistant_text`, + `last_assistant_message`, `thinking`), each with its size in bytes before the cut. A + prompt or a tool result keeps its start; a turn's text and thinking keep their end. + Sizes are stored up to 2147483647. + additionalProperties: + type: integer + type: object + type: object + AgentActivityImages: + description: |- + # AgentActivityImages Object + ### Description + The images attached to a prompt or returned by a tool. Only their number and size are + sent; the images themselves are not. + properties: + count: + type: integer + bytes: + format: int64 + type: integer + type: object + AgentActivityMcpServer: + description: |- + # AgentActivityMcpServer Object + ### Description + The MCP server behind a tool call, as Claude Code reports it. Claude Code v2.1.274 and + later adds this object to the hook input of an MCP tool call; an older client does not + send it, and it is never present for a built-in tool such as `Bash`. + + When `name` is present it is stored as the call's server. When this object is absent, + the server is read from `tool_name` instead: the part after the `mcp__` prefix and + before the next `__`. The tool is always read from `tool_name`. + + `name` is stored as the call's server. `source` says where the server's definition came + from (`plugin`, `sdk`, or a configuration scope such as `user` or `project`) and is + stored as sent, cut to 64 characters. Neither field is an identity: `name` is whatever + the user called the server in their own configuration, and `source` is what the machine + said. + properties: + name: + description: The server's name. + type: string + source: + description: + Where the server's definition came from, such as `plugin`, `sdk`, `user` or + `project`. Stored as sent, cut to 64 characters. + type: string + type: object + AgentActivityOpalReported: + description: |- + # AgentActivityOpalReported Object + ### Description + What the sending machine says about who and what it is, added by the Opal hook + script. Every field is optional and **unverified**: whoever controls the machine + controls them. They can disagree, and Opal keeps every one that is present, each cut + to a fixed length (254 characters for an email, 64 for `os_user`, 255 for + `hostname`) with control characters removed. + + The emails are also tried, in the order below and after the `X-Opal-Actor` header, + to find the agent, so a person without a git email can still match through their + Claude account. + properties: + configured_email: + description: An email set by an administrator, an MDM profile or the installer. + type: string + claude_account_email: + description: The email of the account Claude Code is signed in with. + type: string + codex_account_email: + description: The email of the ChatGPT account Codex is signed in with. + type: string + codex_auth_mode: + description: >- + How Codex is signed in, from `auth_mode` in its `auth.json`: `chatgpt` for a ChatGPT + sign-in, `apikey` for an API key. In an organization that has turned on person agents, + a Codex call from a person who owns no OpenAI agent creates "'s ChatGPT" for a + ChatGPT sign-in and "'s OpenAI" for an API key. Without it, no agent is created. + type: string + chatgpt_account_email: + description: The email of the ChatGPT account the sending runtime is signed in with. + type: string + cursor_account_email: + description: >- + The email of the account Cursor is signed in with, from the `user_email` of Cursor's + hook input. Tried before the other emails here. + type: string + client: + description: >- + Which agent runtime sent the event: `claude_code`, `codex`, `cursor`, + `openai_agents_python`, `openai_agents_js`, `chatgpt` or `chatgpt_workspace_agent`. Any + other value is stored as `unknown`. When absent, an event carrying `cursor_version` is + Cursor, one carrying `turn_id` and `model` and no `prompt_id` is Codex, and anything else + is Claude Code. + type: string + git_email: + description: The machine's global `git config user.email`. + type: string + os_user: + description: The operating-system username. Not used to find an agent. + type: string + hostname: + description: >- + The machine's name. The `X-Opal-Host` header wins when it names a different machine. + type: string + type: object + AgentActivityOpalMcpServer: + description: |- + # AgentActivityOpalMcpServer Object + ### Description + Where the MCP server behind a tool call connects, as the Opal hook kit read it from the + developer's own Claude Code configuration. Claude Code's hook payload names the server + but not where it connects, so the kit adds this for an `mcp____` call when + it finds the server in the configuration. + + Opal uses it to identify the server in the organization's MCP server registry: by its + URL, or by the hash of its command. The URL is stored without its query, fragment or + user name and password. + properties: + url: + description: The server's URL, for an `http` or `sse` server. + type: string + transport: + description: "`http`, `sse` or `stdio`." + type: string + command_hash: + description: + For a `stdio` server, a SHA-256 of its command's shape, in hex. Arguments that can + hold a secret are replaced before hashing, and the command itself is never sent. + type: string + scope: + description: + The configuration the server was found in, such as `user`, `project`, `local`, + `managed` or `plugin`. + type: string + type: object + McpConfigReport: + description: |- + # McpConfigReport Object + ### Description + The MCP servers configured in Claude Code on one machine, and what else its configuration + lets Claude Code reach: enabled plugins, skills, custom subagents and permission rules. Each of + those four lists is optional; a kit that does not send one leaves what Opal has of that kind as + it is, and an empty list says the machine has none. Each holds at most 200 entries. + properties: + servers: + items: + $ref: "#/components/schemas/McpConfigServer" + type: array + reporter: + $ref: "#/components/schemas/McpConfigReporter" + plugins: + items: + $ref: "#/components/schemas/McpConfigPlugin" + type: array + skills: + items: + $ref: "#/components/schemas/McpConfigSkill" + type: array + subagents: + items: + $ref: "#/components/schemas/McpConfigSubagent" + type: array + permissions: + items: + $ref: "#/components/schemas/McpConfigPermission" + type: array + required: + - servers + type: object + additionalProperties: true + McpConfigPlugin: + description: |- + # McpConfigPlugin Object + ### Description + A Claude Code plugin the machine's settings enable. + properties: + name: + type: string + marketplace: + type: string + version: + description: The installed version, when the kit could read it. + type: string + scope: + description: "The settings source that enables it: `managed`, `user`, `project` or `local`." + type: string + required: + - name + type: object + additionalProperties: true + McpConfigSkill: + description: |- + # McpConfigSkill Object + ### Description + A skill (or legacy command) Claude Code loads on the machine. A plugin's is named + `:`. Only its name is sent, never the file. + properties: + name: + type: string + source: + description: "`user`, `project`, `plugin` or `managed`." + type: string + required: + - name + type: object + additionalProperties: true + McpConfigSubagent: + description: |- + # McpConfigSubagent Object + ### Description + A custom subagent defined on the machine. A plugin's is named `:`. + properties: + name: + type: string + scope: + description: "`user`, `project`, `plugin` or `managed`." + type: string + tools: + description: + The tools its file lists. Absent when the file lists none, which lets the subagent + use every tool of the session, MCP tools included. + items: + type: string + type: array + required: + - name + type: object + additionalProperties: true + McpConfigPermission: + description: |- + # McpConfigPermission Object + ### Description + One permission rule or default mode of one settings source. The kit masks secrets in a + rule with the same redaction it uses for conversation content, and Opal masks it again. + properties: + source: + description: "`managed`, `user`, `project` or `local`." + type: string + kind: + description: "`allow`, `ask`, `deny` or `default_mode`." + type: string + value: + description: The rule, such as `Bash(npm run test *)`, or the mode, such as `acceptEdits`. + type: string + required: + - kind + - value + type: object + additionalProperties: true + McpConfigReporter: + description: |- + # McpConfigReporter Object + ### Description + Who the reporting machine says it belongs to. Unverified, like `X-Opal-Actor`. + properties: + configured_email: + type: string + claude_account_email: + type: string + git_email: + type: string + os_user: + type: string + type: object + additionalProperties: true + McpConfigServer: + description: |- + # McpConfigServer Object + ### Description + One MCP server in a machine's Claude Code configuration. Exactly what the hook kit + sends: no environment values, headers or command arguments. + properties: + name: + description: The server's name in the configuration. + type: string + scope: + description: "`user`, `project`, `local`, `managed` or `plugin`." + type: string + transport: + description: "`http`, `sse` or `stdio`." + type: string + url: + description: The server's URL, for an `http` or `sse` server. + type: string + command_hash: + description: For a `stdio` server, a SHA-256 of its command's shape, in hex. + type: string + required: + - name + type: object + additionalProperties: true + McpConfigReportResult: + description: |- + # McpConfigReportResult Object + ### Description + What one configuration report did. + properties: + received: + description: Servers in the report. + type: integer + recorded: + description: + Servers recorded in the registry. Lower than `received` when an entry had neither + a name Opal could use nor a URL or command hash. + type: integer + required: + - received + - recorded + type: object + AgentActivityIngestRequest: + description: |- + # AgentActivityIngestRequest Object + ### Description + A batch of agent activity events. + + Three body shapes are accepted: this envelope (`{"events": [...]}`), a bare JSON + array of `AgentActivityEvent`, and a single `AgentActivityEvent` object. The last + exists so a Claude Code hook can POST here directly, since a hook sends one bare + payload per event and cannot wrap it. + properties: + events: + items: + $ref: "#/components/schemas/AgentActivityEvent" + type: array + type: object + additionalProperties: true + AnthropicInferenceHookVerdict: + description: |- + # AnthropicInferenceHookVerdict Object + ### Description + An Anthropic Inference hooks verdict. `deny_reason` is shown to the end user on a deny. + properties: + action: + enum: + - allow + - deny + type: string + deny_reason: + maxLength: 500 + type: string + reference_id: + maxLength: 50 + type: string + required: + - action + type: object + AgentActivityIngestResult: + description: |- + # AgentActivityIngestResult Object + ### Description + What one ingest request actually did. + + `received` and `stored` differ when a delivery was retried and deduplicated. + `attributed` and `unattributed` sum to `received` rather than to `stored`, because + attribution happens before deduplication. Unattributed events are kept, not dropped: + activity Opal cannot tie to a governed agent is itself a governance finding. + properties: + received: + description: Events parsed out of the request body. + type: integer + stored: + description: + Rows actually written. Lower than `received` when a retried delivery was + deduplicated on `tool_use_id`. + type: integer + attributed: + description: Events that resolved to an agent in this organization. + type: integer + unattributed: + description: + Events that resolved to no agent, and are therefore visible only in the + unattributed activity list. A persistently high value means the reporting + clients are not sending an identity Opal can resolve. + type: integer + required: + - received + - stored + - attributed + - unattributed + type: object + AgentActivityClientSettings: + description: |- + # AgentActivityClientSettings Object + ### Description + How a client should send batched agent activity for this organization. + properties: + batch_wait_seconds: + description: + The minimum gap between two sends from one machine. Send at once when the last send + was at least this long ago; otherwise wait until this long after the last send, and + send what arrived meanwhile as one request. Between 0 and 300. + format: double + type: number + max_events_per_request: + description: The most events one request to `/agent-activity` may carry. + type: integer + max_bytes_per_request: + description: + The largest body, in bytes, `/agent-activity` accepts for a request with more than + one event. A request with one event may be up to 1 MiB. + format: int64 + type: integer + max_requests_per_second: + description: + The rate of batched requests one client should stay under. Can be below 1. + format: double + type: number + burst_requests: + description: + How many batched requests a client may send at once before the rate applies. At + least 1. + type: integer + cache_seconds: + description: How long these settings may be kept before asking again. + type: integer + clients: + additionalProperties: + $ref: '#/components/schemas/AgentActivityClientSetting' + description: + What the organization chose on the Setup tab for each client that runs the hook, + keyed by client (claude_code, codex, cursor). A client that is not listed keeps the + defaults. + type: object + required: + - batch_wait_seconds + - max_events_per_request + - max_bytes_per_request + - max_requests_per_second + - burst_requests + - cache_seconds + - clients + type: object + AgentActivityClientSetting: + description: |- + # AgentActivityClientSetting Object + ### Description + What the organization chose for one client that runs the hook. + properties: + reports_tool_calls: + description: + Whether the client reports tool calls. When false its hook sends nothing and lets + every tool call run, and Opal stores nothing the client still sends. + type: boolean + conversation_content: + description: + Who decides whether the client's conversation content (prompts, what each tool + returned, the model's replies) is sent and stored. `always` sends it from every + machine; `never` sends none, even from a machine installed with --content, and Opal + stores none; `person_decides` leaves it to whether the machine was installed with + --content. Absent for a client whose hook sends no conversation content (codex). + enum: + - always + - never + - person_decides + type: string + required: + - reports_tool_calls + type: object + AgentKillSwitch: + description: |- + # AgentKillSwitch Object + ### Description + The org-level agent kill switch, and the activation that is in force or last was. + + `active` is what matters; the rest is the record of how it got that way. An + activation is in force only while it has not been deactivated AND `expires_at` is + still in the future, and that is evaluated on every read - so `active` can be + `false` on a row that was never explicitly turned off. + + Everything below `active` describes the LATEST activation whether or not it is + still in force, so an admin reading an inactive switch can still see who last + turned it on and when it ended. + properties: + active: + description: + Whether agent tool calls are being denied right now. This is the field to read; + it already accounts for expiry. + type: boolean + activated_at: + description: When the latest activation was turned on. Absent if it never has been. + format: date-time + type: string + activated_by_user_id: + description: + The admin who turned it on. Absent when that user has since been hard-deleted - + the activation record outlives them deliberately. + format: uuid + type: string + expires_at: + description: + When the latest activation stops denying on its own. In the past for an + activation that already ran out. + format: date-time + type: string + deactivated_at: + description: + When the latest activation was turned off before its expiry, either by an admin + or by being superseded. Absent when it ended at `expires_at`, or has not ended. + format: date-time + type: string + reason: + description: + The admin's stated reason. Not an internal note - it is shown to the developer + whose tool call is denied, in their own terminal. + type: string + required: + - active + type: object + SetAgentKillSwitchRequest: + description: |- + # SetAgentKillSwitchRequest Object + ### Description + Turns the agent kill switch on or off. + + Setting `active` to `true` while it is already on supersedes the current activation + rather than extending it: the old row keeps its own reason and window as part of the + audit trail, and a new one starts. + properties: + active: + description: True denies agent tool calls for this organization; false lifts the denial. + type: boolean + duration_minutes: + description: + How long the denial lasts, from now. Ignored when `active` is false. Capped + server-side - a kill switch with no end is how an organization discovers months + later that its engineers have been quietly working around it. + type: integer + reason: + description: + Why. Shown verbatim to the developer whose tool call is denied, so write it for + them rather than for the audit log - it is the only explanation they get. + type: string + required: + - active + type: object + AccessEntityFilters: + type: object + description: + Filters for matching entities by type, name, tag, IDs, connections, + or access levels. Supports recursive logical composition via + allOf/anyOf. + properties: + entityTypes: + type: array + description: Filter by entity type. Only RESOURCE, GROUP, and USER are + queryable via OpalQuery. + items: + type: string + enum: [RESOURCE, GROUP, USER] + entityItemTypes: + type: array + description: Filter by entity item types. + items: + $ref: "#/components/schemas/EntityItemTypeEnum" + entityName: + $ref: "#/components/schemas/EntityNameFilter" + entityDescription: + $ref: "#/components/schemas/EntityDescriptionFilter" + entityTag: + $ref: "#/components/schemas/EntityTagFilter" + entityTagKey: + $ref: "#/components/schemas/EntityTagKeyFilter" + hrIdpStatus: + $ref: "#/components/schemas/IdpStatusFilter" + entityAdminOwner: + $ref: "#/components/schemas/EntityAdminFilter" + entityIDs: + type: array + description: Filter by specific entity UUIDs. + items: + type: string + format: uuid + importedFromApp: + type: array + description: Filter by app IDs from which returned nodes will be imported from. + items: + type: string + format: uuid + roleRemoteIds: + type: array + description: Filter by role remote IDs. Can only be applied within a hasAccessTo clause. + items: + type: string + roleNames: + type: array + description: Filter by role display names (e.g. "Admin", "Read"). Can only be applied within a hasAccessTo clause. + items: + type: string + allOf: + type: array + description: > + A list of nested filters that must all match (logical AND). Each + item has the same shape as this object — scalar fields like + `entityTypes` or `entityTag`, and can further nest `allOf`, + `anyOf`, or `not`. + items: + $ref: "#/components/schemas/AccessEntityFilters" + anyOf: + type: array + description: > + A list of nested filters where at least one must match (logical OR). Each item has the same shape as this object. items: - $ref: "#/components/schemas/AccessEntityFilters" + $ref: "#/components/schemas/AccessEntityFilters" + not: + description: > + Excludes entities matching the embedded filter (logical NOT). Pass + a filter object with the same shape as this one — typically a + single scalar field, like `{not: {entityTypes: ["RESOURCE"]}}` to + exclude resources. + type: object + x-go-type: AccessEntityFilters + + RunOpalQueryRequest: + description: > + Request body for an ad-hoc OpalQuery. Set `type` to `NODE` to query + entities, or `ACCESS` to query access grants. The fields available + in `query` differ by type — refer to each tab for the full schema. + oneOf: + - $ref: "#/components/schemas/OpalNodeQuery" + - $ref: "#/components/schemas/OpalAccessQuery" + discriminator: + propertyName: type + mapping: + NODE: "#/components/schemas/OpalNodeQuery" + ACCESS: "#/components/schemas/OpalAccessQuery" + # example: + # type: NODE + # query: + # nodeFilters: + # entityTypes: [RESOURCE] + # allOf: + # - entityTag: + # key: env + # value: prod + # - entityTag: + # key: team + # value: platform + # not: + # entityItemTypes: [AWS_IAM_ROLE] + # accessFilters: + # isAccessibleBy: + # entityTypes: [USER] + # entityTag: + # key: contractor + # first: 50 + + OpalNodeQuery: + title: Node + type: object + required: + - type + description: > + Use a Node query to retrieve entities — users, resources, or groups — + that match a set of filters. You can filter by entity type, tags, and + access relationships. Results are paginated and returned as a list of + entity edges. + example: + type: NODE + query: + nodeFilters: + entityTypes: [RESOURCE] + entityTag: + key: env + value: prod + accessFilters: + isAccessibleBy: + entityTypes: [USER] + entityTag: + key: contractor + first: 50 + properties: + type: + type: string + enum: + - NODE + query: + $ref: "#/components/schemas/OpalNodeQueryBody" + first: + type: integer + description: Maximum number of results to return. Defaults to 200. + example: 200 + after: + type: string + description: Cursor from a previous response to fetch the next page of results. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + + OpalNodeQueryBody: + type: object + description: The filter body for a NODE-type OpalQuery. + properties: + nodeFilters: + $ref: "#/components/schemas/AccessEntityFilters" + accessFilters: + $ref: "#/components/schemas/AccessRelationshipFilters" + + OpalQueryResultNode: + type: object + required: + - id + - name + - entityType + - entityItemType + description: A matched entity from an OpalQuery result. + properties: + id: + type: string + format: uuid + description: The entity's unique identifier. + name: + type: string + description: The display name of the entity. + entityType: + type: string + enum: + - USER + - GROUP + - RESOURCE + description: The top-level entity type. + entityItemType: + $ref: "#/components/schemas/EntityItemTypeEnum" + + OpalQueryResultEdge: + type: object + required: + - node + - cursor + description: + A single result edge from an OpalQuery, containing the matched + entity and its pagination cursor. + properties: + node: + $ref: "#/components/schemas/OpalQueryResultNode" + cursor: + type: string + description: Opaque cursor for this entity, used for pagination. + + OpalQueryResults: + description: + Paginated results of an OpalQuery. The `type` field discriminates + which result schema applies and mirrors the `type` field on the request. + oneOf: + - $ref: "#/components/schemas/OpalNodeQueryResults" + - $ref: "#/components/schemas/OpalAccessQueryResults" + discriminator: + propertyName: type + mapping: + NODE: "#/components/schemas/OpalNodeQueryResults" + ACCESS: "#/components/schemas/OpalAccessQueryResults" + + OpalNodeQueryResults: + type: object + required: + - type + - edges + - pageInfo + description: + Paginated results of a NODE-type OpalQuery — one edge per matched + entity (user, resource, or group). + properties: + type: + type: string + enum: + - NODE + edges: + type: array + description: List of matched entities. + items: + $ref: "#/components/schemas/OpalQueryResultEdge" + pageInfo: + $ref: "#/components/schemas/PageInfo" + + OpalAccessQuery: + title: Access + type: object + required: + - type + description: > + Use an Access query to retrieve access grants between principals (users or + groups) and their entitlements (resources or groups), with one result per + (principal, entitlement, access level). Every access path reaching that grant + is returned as metadata on the result. Uses the same filters as an Access Path + query; results are paginated. + example: + type: ACCESS + query: + principalFilter: + entityTypes: [USER] + entitlementFilter: + entityItemTypes: [AWS_IAM_ROLE] + first: 50 + properties: + type: + type: string + enum: + - ACCESS + query: + $ref: "#/components/schemas/OpalAccessPathQueryBody" + first: + type: integer + description: Maximum number of results to return. Defaults to 200. + example: 200 + after: + type: string + description: + Opaque cursor from a previous ACCESS response to fetch the next page + of results. + + OpalAccessPathQueryBody: + type: object + description: + Edge-query filters for an ACCESS OpalQuery. At least one of + principalFilter or entitlementFilter is required. + properties: + principalFilter: + $ref: "#/components/schemas/AccessEntityFilters" + entitlementFilter: + $ref: "#/components/schemas/AccessEntityFilters" + principalAccessFilters: + description: > + Advanced access filter on the principal side of each path. Restricts + results to principals that additionally satisfy these access-edge + constraints: `hasAccessTo` keeps only principals that also have + access to a matching entity; `isAccessibleBy` keeps only principals + that are also accessible by a matching entity. Only takes effect when + `principalFilter` is also supplied (it refines that filter); on its + own it has no effect. + $ref: "#/components/schemas/AccessRelationshipFilters" + entitlementAccessFilters: + description: > + Advanced access filter on the entitlement side of each path. + Restricts results to entitlements that additionally satisfy these + access-edge constraints: `hasAccessTo` keeps only entitlements that + also have access to a matching entity; `isAccessibleBy` keeps only + entitlements that are also accessible by a matching entity. Only + takes effect when `entitlementFilter` is also supplied (it refines + that filter); on its own it has no effect. + $ref: "#/components/schemas/AccessRelationshipFilters" + accessLevelRemoteIds: + type: array + description: Filter by access-level remote IDs on the terminal edge. + items: + type: string + accessLevelNames: + type: array + description: Filter by access-level display names on the terminal edge. + items: + type: string + edgeFilter: + $ref: "#/components/schemas/OpalAccessPathEdgeFilter" + + OpalAccessPathEdgeFilter: + type: object + description: Constraints on the access path edges themselves. + properties: + directOnly: + type: boolean + description: + When true, only return direct (depth-1) principal-to-entitlement + edges. + example: true + accessDurationType: + type: string + description: Constrain results by whether the terminal access expires. + enum: + - EXPIRING_ONLY + - PERMANENT_ONLY + example: EXPIRING_ONLY + + OpalAccessPathDetail: + type: object + required: + - path + description: A single access path within an ACCESS result. + properties: + path: + type: array + description: Entity IDs along the path from principal to entitlement. + items: + type: string + format: uuid + expiration: + type: string + format: date-time + nullable: true + description: This path's expiration, if any. + + OpalAccessResultNode: + type: object + required: + - principalId + - entitlementId + - isDirect + - paths + description: + A matched access grant from an ACCESS OpalQuery — one per + (principal, entitlement, access level), with every access path as metadata. + properties: + principalId: + type: string + format: uuid + description: The principal entity ID. + entitlementId: + type: string + format: uuid + description: The entitlement entity ID. + accessLevelRemoteId: + type: string + nullable: true + description: Remote ID of the access level. + accessLevelName: + type: string + nullable: true + description: Display name of the access level. + effectiveExpiration: + type: string + format: date-time + nullable: true + description: + The expiration in effect across all paths (the latest-expiring; a + permanent path wins). Null means access never expires. + isDirect: + type: boolean + description: True when any path is a direct grant. + paths: + type: array + description: Every access path reaching this grant. + items: + $ref: "#/components/schemas/OpalAccessPathDetail" + + OpalAccessResultEdge: + type: object + required: + - node + - cursor + description: + A single ACCESS result edge containing the matched access grant and its + pagination cursor. + properties: + node: + $ref: "#/components/schemas/OpalAccessResultNode" + cursor: + type: string + description: Opaque cursor for this grant, used for pagination. + + OpalAccessQueryResults: + type: object + required: + - type + - edges + - pageInfo + description: + Paginated results of an ACCESS-type OpalQuery — one edge per matched + (principal, entitlement, access level) grant. + properties: + type: + type: string + enum: + - ACCESS + edges: + type: array + description: List of matched access grants. + items: + $ref: "#/components/schemas/OpalAccessResultEdge" + pageInfo: + $ref: "#/components/schemas/PageInfo" + + AccessRelationshipFilters: + type: object + description: > + Filters the returned nodes by the access edges connected to them. + When `isAccessibleBy` and `hasAccessTo` are provided, the returned nodes + must satisfy both edge constraints simultaneously. + properties: + isAccessibleBy: + description: + Inbound-edge filter. The returned node must be accessible by at + least one entity matching this filter. + $ref: "#/components/schemas/AccessEntityFilters" + hasAccessTo: + description: + Outbound-edge filter. The returned node must have access to at + least one entity matching this filter. + $ref: "#/components/schemas/AccessEntityFilters" + + EntityNameFilter: + type: object + required: + - stringMatchType + - string + description: Filters entities by name using a string match strategy. + properties: + stringMatchType: + $ref: "#/components/schemas/StringMatchType" + string: + type: string + description: The string value to match against the entity name. + example: engineering + + EntityDescriptionFilter: + type: object + required: + - string + description: > + Filters GROUP and RESOURCE entities by a case-insensitive substring of + their description ("contains"). USER entities have no description and + never match, in either polarity. `not` inverts the match within the + resource/group domain ("does NOT contain"), so it still returns only + resources/groups rather than sweeping in users. + properties: + string: + type: string + description: The substring to match against the entity description. + example: production + not: + type: boolean + description: + Invert the match — return resources/groups whose description does + NOT contain the substring. + + EntityTagFilter: + type: object + required: + - key + description: + Filters entities by a tag key/value pair, optionally scoped to a + connection. + properties: + key: + type: string + description: The tag key to filter by. + example: team + value: + type: string + description: + The tag value to filter by. If omitted, matches only tags with no + value; use entityTagKey to match any value for a key. + example: platform + connectionId: + type: string + format: uuid + description: If specified, filters by tags associated with this connection. + + EntityTagKeyFilter: + type: object + required: + - keys + description: > + Filters entities that have a tag whose key is one of `keys`, whatever + its value (including no value). Keys match exactly and case-sensitively. + An empty list matches nothing. AGENT entities carry no tags, so they + never match; under `not`, every agent matches, as with entityTag. + properties: + keys: + type: array + description: The tag keys to match. + items: + type: string + example: ["Critical"] + + IdpStatusFilter: + type: object + description: > + Filters USER entities by their HR/IDP lifecycle status. Only applies to + USER entities; GROUP and RESOURCE entities never match, in either + polarity. `statuses` combine with OR. `not` inverts the match within the + user domain (e.g. "IDP status is NOT active"), so it still returns only + users rather than sweeping in groups/resources. + properties: + statuses: + type: array + description: Match users whose HR/IDP status is one of these values. + items: + $ref: "#/components/schemas/UserHrIdpStatusEnum" not: - description: > - Excludes entities matching the embedded filter (logical NOT). Pass - a filter object with the same shape as this one — typically a - single scalar field, like `{not: {entityTypes: ["RESOURCE"]}}` to - exclude resources. - type: object - x-go-type: AccessEntityFilters + type: boolean + description: + Invert the match within the user domain (e.g. "IDP status is NOT + active"). - RunOpalQueryRequest: - description: - Request body for running an ad-hoc OpalQuery. The `type` field - determines which query schema applies. - oneOf: - - $ref: "#/components/schemas/OpalNodeQuery" - discriminator: - propertyName: type - mapping: - NODE: "#/components/schemas/OpalNodeQuery" - # example: - # type: NODE - # query: - # nodeFilters: - # entityTypes: [RESOURCE] - # allOf: - # - entityTag: - # key: env - # value: prod - # - entityTag: - # key: team - # value: platform - # not: - # entityItemTypes: [AWS_IAM_ROLE] - # accessFilters: - # isAccessibleBy: - # entityTypes: [USER] - # entityTag: - # key: contractor - # first: 50 + EntityAdminFilter: + type: object + required: + - ownerIDs + description: > + Filters GROUP and RESOURCE entities by their admin owner. USER entities + never match, in either polarity. `not` inverts the match within the + resource/group domain (self-negating, like IdpStatusFilter): omit it (or + false) to include entities owned by the given owners, set it true to + exclude them. + properties: + ownerIDs: + type: array + description: The owner (group) UUIDs to match entities against. + items: + type: string + format: uuid + not: + type: boolean + description: + Invert the match — return resources/groups NOT owned by the given + owners. - OpalNodeQuery: + StringMatchType: + type: string + description: >- + How to match a string value against entity names. REGEX matches the + value as a case-insensitive regular expression. + enum: + - CONTAINS + - EQUALS + - STARTS_WITH + - ENDS_WITH + - REGEX + + NameMatchType: + type: string + description: >- + How to match a free-text name filter on list endpoints. All match types + are case-insensitive. When omitted, CONTAINS is used. REGEX is not + supported here — use POST /queries/run for regular-expression matching. + enum: + - CONTAINS + - EQUALS + - STARTS_WITH + - ENDS_WITH + + PaginatedAssignedRequestList: + type: object + required: + - requests + - cursor + properties: + requests: + type: array + items: + $ref: "#/components/schemas/Request" + cursor: + type: string + description: The cursor to continue pagination + PageInfo: + type: object + required: + - hasNextPage + - endCursor + - hasPreviousPage + - startCursor + properties: + hasNextPage: + type: boolean + description: Whether there are more items after the end cursor + endCursor: + type: string + description: The cursor to continue pagination forwards + hasPreviousPage: + type: boolean + description: Whether there are more items before the start cursor + startCursor: + type: string + description: The cursor to continue pagination backwards + + RequestEdge: + type: object + required: + - node + - cursor + properties: + node: + $ref: "#/components/schemas/Request" + cursor: + type: string + description: The cursor for this request edge + + RequestConnection: + type: object + required: + - edges + - pageInfo + - totalCount + properties: + edges: + type: array + items: + $ref: "#/components/schemas/RequestEdge" + pageInfo: + $ref: "#/components/schemas/PageInfo" + totalCount: + type: integer + description: The total number of items available + UARScope: + description: + If set, the access review will only contain resources and groups + that match at least one of the filters in scope. + example: + filter_operator: ANY + users: + - userd283-ca87-4a8a-bdbb-df212eca5353 + include_group_bindings: True + tags: + - key: uar_scope + value: high_priority + names: + - demo + - api + admins: + - f454d283-ca87-4a8a-bdbb-df212eca5353 + - 8763d283-ca87-4a8a-bdbb-df212ecab139 + resource_types: + - GCP_CLOUD_SQL_POSTGRES_INSTANCE + group_types: + - AWS_SSO_GROUP + apps: + - pas2d283-ca87-4a8a-bdbb-df212eca5353 + - apss2d283-ca87-4a8a-bdbb-df212eca5353 + entities: + - f454d283-as87-4a8a-bdbb-df212eca5353 + - f454d283-as87-4a8a-bdbb-df212eca5329 + properties: + group_visibility: + description: Specifies what users can see during an Access Review + type: string + enum: [STRICT, VIEW_VISIBLE_AND_ASSIGNED, VIEW_ALL] + users: + description: + The access review will only include the following users. If any + users are selected, any entity filters will be applied to only the + entities that the selected users have access to. + items: + example: userd283-ca87-4a8a-bdbb-df212eca5353 + type: string + format: uuid + type: array + filter_operator: + description: + Specifies whether entities must match all (AND) or any (OR) of the + filters. + type: string + enum: [ANY, ALL] + entities: + description: + This access review will include resources and groups with ids in + the given strings. + items: + example: f454d283-as87-4a8a-bdbb-df212eca5353 + type: string + format: uuid + type: array + apps: + description: This access review will include items in the specified applications + items: + example: pas2d283-ca87-4a8a-bdbb-df212eca5353 + type: string + format: uuid + type: array + admins: + description: + This access review will include resources and groups who are owned + by one of the owners corresponding to the given IDs. + items: + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + type: string + format: uuid + type: array + group_types: + description: This access review will include items of the specified group types + type: array + items: + $ref: "#/components/schemas/GroupTypeEnum" + resource_types: + description: This access review will include items of the specified resource types + type: array + items: + $ref: "#/components/schemas/ResourceTypeEnum" + include_group_bindings: + type: boolean + example: False + tags: + description: + This access review will include resources and groups who are tagged + with one of the given tags. + items: + $ref: "#/components/schemas/TagFilter" + type: array + names: + description: + This access review will include resources and groups whose name + contains one of the given strings. + items: + example: demo + type: string + type: array type: object - required: - - type - description: - Request body for a NODE-type OpalQuery. Returns entities (users, - resources, groups) matching the given filters. + CampaignStatusEnum: + description: The current status of a campaign. + enum: + - DRAFT + - ONGOING + - COMPLETED + - STOPPED + - ENDED + example: ONGOING + type: string + CampaignRevokeOnEnum: + description: When access decisions take effect during a campaign. + enum: + - ACTION + - END + - NONE + example: END + type: string + CampaignGroupAssetVisibilityPolicyEnum: + description: Controls what group assets reviewers can see during the campaign. + enum: + - STRICT + - VIEW_VISIBLE_AND_ASSIGNED + - VIEW_ALL + example: STRICT + type: string + CampaignConfiguration: + description: Configuration for an access review campaign. example: - type: NODE - query: - nodeFilters: - entityTypes: [RESOURCE] - entityTag: - key: env - value: prod - accessFilters: - isAccessibleBy: - entityTypes: [USER] - entityTag: - key: contractor - first: 50 + configuration_id: 39a4d283-ca87-4a8a-bdbb-df212eca5fdb + created_at: 2026-07-01T00:00:00Z + updated_at: 2026-07-01T00:00:00Z + query: null + reviewer_assignment_policy: MANUALLY + allow_self_review: false + send_reviewer_assignment_notification: true + allow_reviewer_reassignment: false + start_date: null + end_date: 2026-09-30T00:00:00Z + timezone: America/Los_Angeles + revoke_on: END + reminder_schedule: [7, 3, 1] + reminder_include_manager: true + require_reason_on_denial: false + auto_stop_when_complete: false + hide_ai_suggestions: false + custom_start_message: null + group_asset_visibility_policy: STRICT + is_template: false + cron_expression: null + next_scheduled_run: null + last_scheduled_run: null + recurring_duration_days: null properties: - type: + configuration_id: + description: The ID of the campaign configuration. + example: 39a4d283-ca87-4a8a-bdbb-df212eca5fdb + format: uuid + type: string + created_at: + description: The creation time of the configuration. + example: 2026-07-01T00:00:00Z + format: date-time + type: string + updated_at: + description: The last updated time of the configuration. + example: 2026-07-01T00:00:00Z + format: date-time type: string - enum: - - NODE query: - $ref: "#/components/schemas/OpalNodeQueryBody" - first: - type: integer - description: Maximum number of results to return. Defaults to 200. - example: 200 - after: + description: + Access-path query defining the scope of access to review. Uses the + same principalFilter / entitlementFilter shape as ACCESS + OpalQuery. + allOf: + - $ref: "#/components/schemas/OpalAccessPathQueryBody" + nullable: true + reviewer_assignment_policy: + $ref: "#/components/schemas/UARReviewerAssignmentPolicyEnum" + allow_self_review: + description: Whether reviewers can review their own access. + example: false + type: boolean + send_reviewer_assignment_notification: + description: Whether to notify reviewers upon assignment. + example: true + type: boolean + allow_reviewer_reassignment: + description: Whether reviewers may reassign their reviews to another user. + example: false + type: boolean + allow_reviewers_to_reduce_expiration: + description: + Whether reviewers can shorten an item's access expiration. They + cannot extend it. + example: false + type: boolean + start_date: + description: Scheduled start date of the campaign. + example: 2026-07-02T00:00:00Z + format: date-time + nullable: true type: string - description: Cursor from a previous response to fetch the next page of results. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac - - OpalNodeQueryBody: - type: object - description: The filter body for a NODE-type OpalQuery. - properties: - nodeFilters: - $ref: "#/components/schemas/AccessEntityFilters" - accessFilters: - $ref: "#/components/schemas/AccessRelationshipFilters" - - OpalQueryResultNode: - type: object - required: - - id - - name - - entityType - - entityItemType - description: A matched entity from an OpalQuery result. - properties: - id: + end_date: + description: Scheduled end date of the campaign. + example: 2026-09-30T00:00:00Z + format: date-time + nullable: true type: string - format: uuid - description: The entity's unique identifier. - name: + timezone: + description: IANA timezone used to interpret campaign deadlines (e.g. + America/Los_Angeles). + example: America/Los_Angeles type: string - description: The display name of the entity. - entityType: + revoke_on: + $ref: "#/components/schemas/CampaignRevokeOnEnum" + reminder_schedule: + description: Days before end date to send reminder notifications. + example: [7, 3, 1] + items: + type: integer + type: array + reminder_include_manager: + description: Whether to include the reviewer's manager in reminders. + example: true + type: boolean + require_reason_on_denial: + description: + Whether reviewers must provide a reason when denying (revoking) + access. + example: false + type: boolean + auto_stop_when_complete: + description: + Whether the campaign stops automatically once every review item is + complete. Stopping locks further reviews so admins can review the + decisions or end the campaign to generate the report. + example: false + type: boolean + hide_ai_suggestions: + description: Whether AI suggestions are hidden from reviewers. + example: false + type: boolean + custom_start_message: + description: + Optional custom message included when notifying reviewers that the + campaign started. + example: Please complete your reviews by Friday. + nullable: true type: string - enum: - - USER - - GROUP - - RESOURCE - description: The top-level entity type. - entityItemType: - $ref: "#/components/schemas/EntityItemTypeEnum" - - OpalQueryResultEdge: - type: object - required: - - node - - cursor - description: - A single result edge from an OpalQuery, containing the matched - entity and its pagination cursor. - properties: - node: - $ref: "#/components/schemas/OpalQueryResultNode" - cursor: + group_asset_visibility_policy: + $ref: "#/components/schemas/CampaignGroupAssetVisibilityPolicyEnum" + is_template: + description: Whether this configuration is a recurring schedule template. + example: false + type: boolean + cron_expression: + description: + Cron expression driving the recurring schedule. Null for one-off + campaigns. + example: 0 9 1 * * + nullable: true type: string - description: Opaque cursor for this entity, used for pagination. - - OpalQueryResults: - description: - Paginated results of an OpalQuery. The `type` field discriminates - which result schema applies and mirrors the `type` field on the request. - oneOf: - - $ref: "#/components/schemas/OpalNodeQueryResults" - discriminator: - propertyName: type - mapping: - NODE: "#/components/schemas/OpalNodeQueryResults" - - OpalNodeQueryResults: - type: object + next_scheduled_run: + description: Next time a draft will be generated from this template. + example: 2026-08-01T16:00:00Z + format: date-time + nullable: true + type: string + last_scheduled_run: + description: Most recent time a draft was generated from this template. + example: 2026-07-01T16:00:00Z + format: date-time + nullable: true + type: string + recurring_duration_days: + description: + Deadline window in days applied to each draft generated from this + template. + example: 14 + nullable: true + type: integer required: - - type - - edges - - pageInfo + - configuration_id + - created_at + - updated_at + - reviewer_assignment_policy + - allow_self_review + - send_reviewer_assignment_notification + - allow_reviewer_reassignment + - allow_reviewers_to_reduce_expiration + - timezone + - revoke_on + - reminder_include_manager + - require_reason_on_denial + - auto_stop_when_complete + - hide_ai_suggestions + - group_asset_visibility_policy + - is_template + type: object + CreateCampaignConfigurationInfo: description: - Paginated results of a NODE-type OpalQuery — one edge per matched - entity (user, resource, or group). + Configuration to apply when creating a campaign. `query` is required; + other omitted fields use defaults. + example: + query: + principalFilter: + entityTypes: [USER] + end_date: 2026-09-30T00:00:00Z + timezone: America/Los_Angeles + allow_self_review: false properties: - type: + query: + description: | + Access-path query defining the scope of access to review. Required. + Uses the same principalFilter / entitlementFilter shape as + ACCESS OpalQuery. Must include at least one of + principalFilter or entitlementFilter. + + Campaign scope only supports direct access edges: + `edgeFilter.directOnly` defaults to `true`, is always stored as + `true`, and passing `false` returns 400. + allOf: + - $ref: "#/components/schemas/OpalAccessPathQueryBody" + reviewer_assignment_policy: + $ref: "#/components/schemas/UARReviewerAssignmentPolicyEnum" + allow_self_review: + description: Whether reviewers can review their own access. + example: false + type: boolean + send_reviewer_assignment_notification: + description: Whether to notify reviewers upon assignment. + example: true + type: boolean + allow_reviewer_reassignment: + description: Whether reviewers may reassign their reviews to another user. + example: false + type: boolean + allow_reviewers_to_reduce_expiration: + description: + Whether reviewers can shorten an item's access expiration. They + cannot extend it. + example: false + type: boolean + start_date: + description: Scheduled start date of the campaign. + example: 2026-07-02T00:00:00Z + format: date-time + nullable: true type: string - enum: - - NODE - edges: - type: array - description: List of matched entities. + end_date: + description: Scheduled end date of the campaign. + example: 2026-09-30T00:00:00Z + format: date-time + nullable: true + type: string + timezone: + description: IANA timezone used to interpret campaign deadlines (e.g. + America/Los_Angeles). + example: America/Los_Angeles + type: string + revoke_on: + $ref: "#/components/schemas/CampaignRevokeOnEnum" + reminder_schedule: + description: Days before end date to send reminder notifications. + example: [7, 3, 1] items: - $ref: "#/components/schemas/OpalQueryResultEdge" - pageInfo: - $ref: "#/components/schemas/PageInfo" - - AccessRelationshipFilters: - type: object - description: > - Filters the returned nodes by the access edges connected to them. - When `isAccessibleBy` and `hasAccessTo` are provided, the returned nodes - must satisfy both edge constraints simultaneously. - properties: - isAccessibleBy: + type: integer + type: array + reminder_include_manager: + description: Whether to include the reviewer's manager in reminders. + example: true + type: boolean + require_reason_on_denial: description: - Inbound-edge filter. The returned node must be accessible by at - least one entity matching this filter. - $ref: "#/components/schemas/AccessEntityFilters" - hasAccessTo: + Whether reviewers must provide a reason when denying (revoking) + access. + example: false + type: boolean + auto_stop_when_complete: description: - Outbound-edge filter. The returned node must have access to at - least one entity matching this filter. - $ref: "#/components/schemas/AccessEntityFilters" - - EntityNameFilter: - type: object + Whether the campaign stops automatically once every review item is + complete. Stopping locks further reviews so admins can review the + decisions or end the campaign to generate the report. + example: false + type: boolean + hide_ai_suggestions: + description: Whether AI suggestions are hidden from reviewers. + example: false + type: boolean + custom_start_message: + description: + Optional custom message included when notifying reviewers that the + campaign started. + example: Please complete your reviews by Friday. + nullable: true + type: string + group_asset_visibility_policy: + $ref: "#/components/schemas/CampaignGroupAssetVisibilityPolicyEnum" + is_template: + description: Whether this configuration is a recurring schedule template. + example: false + type: boolean + cron_expression: + description: + Cron expression driving the recurring schedule. Null for one-off + campaigns. + example: 0 9 1 * * + nullable: true + type: string + recurring_duration_days: + description: + Deadline window in days applied to each draft generated from this + template. + example: 14 + nullable: true + type: integer + excluded_role_assignment_ids: + description: + Role assignment IDs to exclude from the campaign scope during + population. + items: + format: uuid + type: string + type: array required: - - stringMatchType - - string - description: Filters entities by name using a string match strategy. + - query + type: object + CreateCampaignInfo: + description: |- + # CreateCampaignInfo Object + ### Description + The `CreateCampaignInfo` object is used to create a campaign. + + ### Usage Example + Use in the `POST Campaigns` endpoint. + example: + name: Q3 Access Review + configuration: + query: + principalFilter: + entityTypes: [USER] + end_date: 2026-09-30T00:00:00Z + timezone: America/Los_Angeles properties: - stringMatchType: - $ref: "#/components/schemas/StringMatchType" - string: + name: + description: The name of the campaign. + example: Q3 Access Review type: string - description: The string value to match against the entity name. - example: engineering - - EntityTagFilter: - type: object + configuration: + description: + Configuration for the campaign. Required; must include a query. + Other omitted fields use defaults. + allOf: + - $ref: "#/components/schemas/CreateCampaignConfigurationInfo" required: - - key - description: - Filters entities by a tag key/value pair, optionally scoped to a - connection. + - name + - configuration + type: object + UpdateCampaignConfigurationInfo: + description: | + Configuration fields to update on a campaign. All fields are optional; + omitted fields are left unchanged. `query` and + `reviewer_assignment_policy` are set at create time and cannot be + updated here; including either field returns 400. + `cron_expression` and `recurring_duration_days` may only be set when + the campaign is a template; setting them on a one-off campaign returns + 400. `is_template` is immutable and not accepted on update. + example: + end_date: 2026-09-30T00:00:00Z + timezone: America/Los_Angeles + allow_self_review: false properties: - key: + allow_self_review: + description: Whether reviewers can review their own access. + example: false + type: boolean + send_reviewer_assignment_notification: + description: Whether to notify reviewers upon assignment. + example: true + type: boolean + allow_reviewer_reassignment: + description: Whether reviewers may reassign their reviews to another user. + example: false + type: boolean + allow_reviewers_to_reduce_expiration: + description: + Whether reviewers can shorten an item's access expiration. They + cannot extend it. + example: false + type: boolean + start_date: + description: | + Scheduled start date of the campaign. May only be updated while the + campaign has not started (started_at is null). When set, the date's + calendar day in the campaign timezone must be at least tomorrow. + example: 2026-07-02T00:00:00Z + format: date-time + nullable: true type: string - description: The tag key to filter by. - example: team - value: + end_date: + description: | + Scheduled end date of the campaign. When set, the date's calendar + day in the campaign timezone must be at least tomorrow. + example: 2026-09-30T00:00:00Z + format: date-time + nullable: true + type: string + timezone: + description: IANA timezone used to interpret campaign deadlines (e.g. + America/Los_Angeles). + example: America/Los_Angeles type: string + revoke_on: + $ref: "#/components/schemas/CampaignRevokeOnEnum" + reminder_schedule: + description: Days before end date to send reminder notifications. + example: [7, 3, 1] + items: + type: integer + type: array + reminder_include_manager: + description: Whether to include the reviewer's manager in reminders. + example: true + type: boolean + require_reason_on_denial: description: - The tag value to filter by. If omitted, matches any value for the - given key. - example: platform - connectionId: + Whether reviewers must provide a reason when denying (revoking) + access. + example: false + type: boolean + auto_stop_when_complete: + description: + Whether the campaign stops automatically once every review item is + complete. Stopping locks further reviews so admins can review the + decisions or end the campaign to generate the report. + example: false + type: boolean + hide_ai_suggestions: + description: Whether AI suggestions are hidden from reviewers. + example: false + type: boolean + custom_start_message: + description: + Optional custom message included when notifying reviewers that the + campaign started. + example: Please complete your reviews by Friday. + nullable: true type: string - format: uuid - description: If specified, filters by tags associated with this connection. - - StringMatchType: - type: string - description: How to match a string value against entity names. - enum: - - CONTAINS - - EQUALS - - STARTS_WITH - - ENDS_WITH - - PaginatedAssignedRequestList: + group_asset_visibility_policy: + $ref: "#/components/schemas/CampaignGroupAssetVisibilityPolicyEnum" + cron_expression: + description: + Cron expression driving the recurring schedule. Only valid on + template campaigns. Pass an empty string to clear the active months + (next_scheduled_run is cleared); the campaign remains a template. + example: 0 9 1 * * + nullable: true + type: string + recurring_duration_days: + description: + Deadline window in days applied to each draft generated from this + template. Only valid on template campaigns. + example: 14 + nullable: true + type: integer type: object - required: - - requests - - cursor + UpdateCampaignInfo: + description: |- + # UpdateCampaignInfo Object + ### Description + The `UpdateCampaignInfo` object is used to partially update a campaign. + Omitted fields are left unchanged. + + ### Usage Example + Use in the `PUT Campaign` endpoint. + example: + name: Q3 Access Review (Updated) + configuration: + end_date: 2026-09-30T00:00:00Z + timezone: America/Los_Angeles properties: - requests: - type: array - items: - $ref: "#/components/schemas/Request" - cursor: + name: + description: The name of the campaign. + example: Q3 Access Review (Updated) type: string - description: The cursor to continue pagination - PageInfo: + configuration: + description: Configuration fields to create or update. + allOf: + - $ref: "#/components/schemas/UpdateCampaignConfigurationInfo" type: object - required: - - hasNextPage - - endCursor - - hasPreviousPage - - startCursor + Campaign: + description: An access review campaign. + example: + campaign_id: f454d283-ca87-4a8a-bdbb-df212eca5353 + name: Q3 Access Review + status: DRAFT + is_template: false + created_at: 2026-07-01T00:00:00Z + updated_at: 2026-07-01T00:00:00Z + created_by_user_id: 32acc112-21ff-4669-91c2-21e27683eaa1 + configuration: null + started_at: null + started_by_user_id: null + stopped_at: null + stopped_by_user_id: null + ended_at: null + ended_by_user_id: null properties: - hasNextPage: - type: boolean - description: Whether there are more items after the end cursor - endCursor: + campaign_id: + description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + format: uuid type: string - description: The cursor to continue pagination forwards - hasPreviousPage: + name: + description: The name of the campaign. + example: Q3 Access Review + type: string + status: + $ref: "#/components/schemas/CampaignStatusEnum" + is_template: + description: + Whether this campaign is a recurring schedule template. Templates + spawn draft campaigns on schedule rather than being reviewed directly. + example: false type: boolean - description: Whether there are more items before the start cursor - startCursor: + created_at: + description: The creation time of the campaign. + example: 2026-07-01T00:00:00Z + format: date-time + type: string + updated_at: + description: The last updated time of the campaign. + example: 2026-07-01T00:00:00Z + format: date-time + type: string + created_by_user_id: + description: The ID of the user who created the campaign. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + format: uuid + type: string + configuration: + description: The campaign's configuration, if set. + allOf: + - $ref: "#/components/schemas/CampaignConfiguration" + nullable: true + started_at: + description: The time the campaign was started, if started. + example: 2026-07-02T00:00:00Z + format: date-time + nullable: true + type: string + started_by_user_id: + description: The ID of the user who started the campaign, if started. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + format: uuid + nullable: true + type: string + stopped_at: + description: The time the campaign was manually stopped, if stopped. + example: 2026-07-10T00:00:00Z + format: date-time + nullable: true + type: string + stopped_by_user_id: + description: The ID of the user who stopped the campaign, if stopped. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + format: uuid + nullable: true + type: string + ended_at: + description: The time the campaign reached its scheduled end, if ended. + example: 2026-07-14T00:00:00Z + format: date-time + nullable: true + type: string + ended_by_user_id: + description: The ID of the user who ended the campaign, if ended. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + format: uuid + nullable: true type: string - description: The cursor to continue pagination backwards - - RequestEdge: - type: object required: - - node - - cursor + - campaign_id + - name + - status + - is_template + - created_at + - updated_at + - created_by_user_id + type: object + PaginatedCampaignsList: + description: A list of campaigns. + example: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - campaign_id: f454d283-ca87-4a8a-bdbb-df212eca5353 + name: Q3 Access Review + status: DRAFT + is_template: false + created_at: 2026-07-01T00:00:00Z + updated_at: 2026-07-01T00:00:00Z + created_by_user_id: 32acc112-21ff-4669-91c2-21e27683eaa1 properties: - node: - $ref: "#/components/schemas/Request" - cursor: + next: + description: + The cursor with which to continue pagination if additional result + pages exist. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + nullable: true type: string - description: The cursor for this request edge - - RequestConnection: - type: object + previous: + description: The cursor used to obtain the current result page. + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/Campaign" + type: array required: - - edges - - pageInfo - - totalCount + - results + type: object + CampaignItemStatusEnum: + description: | + Derived aggregate status for a campaign item. Matches the admin Reviews + tab Status column labels (undecided items on a stopped campaign are + PENDING, not a separate stopped status). + enum: + - PENDING + - COMPLETED + - APPROVED + - REVOKED + - NO_ACTION + - CHANGED_ROLE + - EXPIRATION_REDUCED + - ADMIN_REVOKED + example: PENDING + type: string + CampaignItemReviewDecisionEnum: + description: Decision recorded on a campaign item review row. + enum: + - APPROVED + - REVOKED + - CHANGE_ROLE + - REDUCE_EXPIRATION + - ADMIN_REVOKED + - NO_ACTION + - REASSIGNED + - ADMIN_OVERRIDE_APPROVED + - ADMIN_OVERRIDE_REVOKED + example: APPROVED + type: string + CampaignItemReviewerAssignmentSourceEnum: + description: How a reviewer was assigned to a campaign item. + enum: + - MANUAL + - PRINCIPAL_MANAGER + - ASSET_ADMIN_OWNER + - PRINCIPAL_SELF + example: MANUAL + type: string + CampaignItemTargetTypeEnum: + description: Type of access edge the campaign item reviews. + enum: + - ROLE_ASSIGNMENT + example: ROLE_ASSIGNMENT + type: string + CampaignItemReview: + description: A single reviewer's assignment and decision for a campaign item. properties: - edges: - type: array - items: - $ref: "#/components/schemas/RequestEdge" - pageInfo: - $ref: "#/components/schemas/PageInfo" - totalCount: + campaign_item_review_id: + description: The ID of the campaign item review. + format: uuid + type: string + campaign_item_id: + description: The ID of the campaign item. + format: uuid + type: string + reviewer_user_id: + description: The ID of the assigned reviewer. + format: uuid + type: string + assignment_source: + $ref: "#/components/schemas/CampaignItemReviewerAssignmentSourceEnum" + decision: + description: | + The reviewer's decision. Null when the reviewer has not yet + submitted. + allOf: + - $ref: "#/components/schemas/CampaignItemReviewDecisionEnum" + nullable: true + note: + description: Optional note from the reviewer. + nullable: true + type: string + updated_access_level_remote_id: + description: Target access level remote ID when decision is CHANGE_ROLE. + nullable: true + type: string + updated_duration_in_minutes: + description: + Built-in duration in minutes when decision is REDUCE_EXPIRATION. + nullable: true type: integer - description: The total number of items available - UARScope: - description: - If set, the access review will only contain resources and groups - that match at least one of the filters in scope. - example: - filter_operator: ANY - users: - - userd283-ca87-4a8a-bdbb-df212eca5353 - include_group_bindings: True - tags: - - key: uar_scope - value: high_priority - names: - - demo - - api - admins: - - f454d283-ca87-4a8a-bdbb-df212eca5353 - - 8763d283-ca87-4a8a-bdbb-df212ecab139 - resource_types: - - GCP_CLOUD_SQL_POSTGRES_INSTANCE - group_types: - - AWS_SSO_GROUP - apps: - - pas2d283-ca87-4a8a-bdbb-df212eca5353 - - apss2d283-ca87-4a8a-bdbb-df212eca5353 - entities: - - f454d283-as87-4a8a-bdbb-df212eca5353 - - f454d283-as87-4a8a-bdbb-df212eca5329 + decided_at: + description: When the decision was finalized. + format: date-time + nullable: true + type: string + resolution_message: + description: | + Preset assignment summary when a manager/owner chain was resolved + or substituted. + nullable: true + type: string + required: + - campaign_item_review_id + - campaign_item_id + - reviewer_user_id + - assignment_source + type: object + CampaignItemAdminOverride: + description: | + Admin override applied to a campaign item. When set, it takes precedence + over reviewer decisions for status and end-campaign remediations. properties: - group_visibility: - description: Specifies what users can see during an Access Review + actor_user_id: + description: The admin who applied the override. + format: uuid type: string - enum: [STRICT, VIEW_VISIBLE_AND_ASSIGNED, VIEW_ALL] - users: - description: - The access review will only include the following users. If any - users are selected, any entity filters will be applied to only the - entities that the selected users have access to. - items: - example: userd283-ca87-4a8a-bdbb-df212eca5353 - type: string - format: uuid - type: array - filter_operator: - description: - Specifies whether entities must match all (AND) or any (OR) of the - filters. + decision: + $ref: "#/components/schemas/CampaignItemReviewDecisionEnum" + decided_at: + description: When the override was applied. + format: date-time type: string - enum: [ANY, ALL] - entities: - description: - This access review will include resources and groups with ids in - the given strings. - items: - example: f454d283-as87-4a8a-bdbb-df212eca5353 - type: string - format: uuid - type: array - apps: - description: This access review will include items in the specified applications - items: - example: pas2d283-ca87-4a8a-bdbb-df212eca5353 - type: string - format: uuid - type: array - admins: - description: - This access review will include resources and groups who are owned - by one of the owners corresponding to the given IDs. - items: - example: f454d283-ca87-4a8a-bdbb-df212eca5353 - type: string - format: uuid - type: array - group_types: - description: This access review will include items of the specified group types - type: array - items: - $ref: "#/components/schemas/GroupTypeEnum" - resource_types: - description: This access review will include items of the specified resource types - type: array - items: - $ref: "#/components/schemas/ResourceTypeEnum" - include_group_bindings: + required: + - actor_user_id + - decision + - decided_at + type: object + CampaignItem: + description: | + A campaign review item — one direct access edge under review, matching + a row on the admin Reviews tab. + properties: + campaign_item_id: + description: The ID of the campaign item. + format: uuid + type: string + campaign_id: + description: The ID of the parent campaign. + format: uuid + type: string + target_type: + $ref: "#/components/schemas/CampaignItemTargetTypeEnum" + role_assignment_id: + description: | + The role assignment ID this item reviews (`target_id` when + `target_type` is ROLE_ASSIGNMENT). + format: uuid + type: string + status: + $ref: "#/components/schemas/CampaignItemStatusEnum" + created_at: + description: When the item was created (snapshotted into the campaign). + format: date-time + type: string + is_target_deleted: + description: True when the underlying role assignment is soft-deleted. type: boolean - example: False - tags: - description: - This access review will include resources and groups who are tagged - with one of the given tags. + principal_id: + description: Principal ID from the role assignment. Null if the RA is missing. + format: uuid + nullable: true + type: string + principal_type: + description: Principal entity type. Null if the RA is missing. + allOf: + - $ref: "#/components/schemas/EntityTypeEnum" + nullable: true + entity_id: + description: Entitlement entity ID. Null if the RA is missing. + format: uuid + nullable: true + type: string + entity_type: + description: Entitlement entity type. Null if the RA is missing. + allOf: + - $ref: "#/components/schemas/EntityTypeEnum" + nullable: true + access_level: + description: Access level on the role assignment, if any. + allOf: + - $ref: "#/components/schemas/ResourceAccessLevel" + nullable: true + access_level_name: + description: Denormalized access level name stored on the campaign item. + nullable: true + type: string + reviews: + description: Reviewer assignments and decisions for this item. items: - $ref: "#/components/schemas/TagFilter" + $ref: "#/components/schemas/CampaignItemReview" type: array - names: + admin_override: + description: Admin override, if any. + allOf: + - $ref: "#/components/schemas/CampaignItemAdminOverride" + nullable: true + required: + - campaign_item_id + - campaign_id + - target_type + - role_assignment_id + - status + - created_at + - is_target_deleted + - reviews + type: object + PaginatedCampaignItemsList: + description: A paginated list of campaign items. + properties: + next: description: - This access review will include resources and groups whose name - contains one of the given strings. + The cursor with which to continue pagination if additional result + pages exist. + nullable: true + type: string + previous: + description: The cursor used to obtain the current result page. + nullable: true + type: string + results: items: - example: demo - type: string + $ref: "#/components/schemas/CampaignItem" type: array + total_count: + description: Total number of items matching the filter (across all pages). + type: integer + format: int64 + required: + - results + - total_count type: object PaginatedUARsList: description: A list of UARs. @@ -5907,6 +10768,7 @@ components: BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. + BY_SELF assigns each item to the reviewed principal themselves. enum: - MANUALLY - BY_OWNING_TEAM_ADMIN @@ -5914,6 +10776,7 @@ components: - BY_MANAGER - BY_APPROVERS - BY_APPROVERS_ALL + - BY_SELF example: MANUALLY type: string TagFilter: @@ -5954,53 +10817,329 @@ components: required: - apps type: object - App: + App: + description: |- + # App Object + ### Description + The `App` object is used to represent an app to an application. + + ### Usage Example + List from the `GET Apps` endpoint. + example: + app_id: f454d283-ca87-4a8a-bdbb-df212eca5353 + name: Okta Org + description: Okta directory for the engineering team. + admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8 + app_type: OKTA_DIRECTORY + properties: + app_id: + description: The ID of the app. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + format: uuid + type: string + name: + description: The name of the app. + example: Okta Org + type: string + description: + description: A description of the app. + example: Okta directory for the engineering team. + type: string + admin_owner_id: + description: The ID of the owner of the app. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid + type: string + app_type: + $ref: "#/components/schemas/AppTypeEnum" + visibility: + $ref: "#/components/schemas/VisibilityTypeEnum" + visibility_group_ids: + description: |- + The IDs of groups that can see this app when visibility is `LIMITED`. + Must be empty when visibility is `GLOBAL`. + items: + format: uuid + type: string + type: array + import_visibility: + description: |- + The visibility level of items imported from this app. + $ref: "#/components/schemas/VisibilityTypeEnum" + validations: + description: Validation checks of an apps' configuration and permissions. + items: + $ref: "#/components/schemas/AppValidation" + type: array + custom_connector: + $ref: "#/components/schemas/CustomConnectorAppConfig" + required: + - app_id + - name + - description + - admin_owner_id + - app_type + type: object + CustomConnectorAppConfig: + description: |- + Configuration for a Custom Connector app. Does not include the signing + secret; secrets are write-only and never returned by the API. + properties: + identifier: + description: The identifier of the Custom Connector. + example: my-connector + type: string + base_url: + description: The base URL of the Custom Connector. + example: https://my-connector.example.com + type: string + tls_mode: + description: Whether TLS verification is enabled for the Custom Connector. + type: boolean + tls_ca_cert_content: + description: Optional PEM-encoded CA certificate content for TLS. + type: string + nullable: true + supports_groups: + description: Whether the Custom Connector supports groups. + type: boolean + supports_nested_resources: + description: Whether the Custom Connector supports nested resources. + type: boolean + supports_nested_groups: + description: Whether the Custom Connector supports nested groups. + type: boolean + supports_event_ingestion: + description: Whether the Custom Connector supports event ingestion. + type: boolean + supports_idp: + description: Whether the Custom Connector can be connected as an upstream user directory. + type: boolean + idp_protocol: + $ref: "#/components/schemas/CustomConnectorIdpProtocolEnum" + required: + - identifier + - base_url + - tls_mode + - supports_groups + - supports_nested_resources + - supports_nested_groups + - supports_event_ingestion + - supports_idp + - idp_protocol + type: object + CreateAppInfo: + description: |- + Information needed to create an app. Currently supports only Push-only + apps (`CUSTOM`) and Custom Connector apps (`CUSTOM_CONNECTOR`). + properties: + name: + description: The name of the app. + example: My Push-only App + type: string + description: + description: A description of the app. + example: Bookkeeping app for internal tools. + type: string + admin_owner_id: + description: The ID of the owner of the app. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid + type: string + app_type: + description: |- + The type of the app. Must be `CUSTOM` (Push-only App) or + `CUSTOM_CONNECTOR`. + $ref: "#/components/schemas/AppTypeEnum" + visibility: + description: |- + The visibility of the app. Defaults to `GLOBAL` when omitted. + Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`: set + visibility after creation via the sub-endpoint instead of on + create. Still fully functional and validated on this surface. + deprecated: true + allOf: + - $ref: "#/components/schemas/VisibilityTypeEnum" + visibility_group_ids: + description: |- + The IDs of groups that can see this app when visibility is `LIMITED`. + Must be empty when visibility is `GLOBAL`; the server returns `400` + otherwise. + Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`. + deprecated: true + items: + format: uuid + type: string + type: array + import_visibility: + description: |- + The visibility of imported items. Defaults to `GLOBAL` when omitted. + Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`. + deprecated: true + allOf: + - $ref: "#/components/schemas/VisibilityTypeEnum" + custom_connector: + description: |- + Required when `app_type` is `CUSTOM_CONNECTOR`. Must not be set when + `app_type` is `CUSTOM`. + $ref: "#/components/schemas/CreateCustomConnectorInfo" + required: + - name + - description + - admin_owner_id + - app_type + type: object + CreateCustomConnectorInfo: + description: Information needed to create a Custom Connector app. + properties: + identifier: + description: The identifier of the Custom Connector. + example: my-connector + type: string + base_url: + description: The base URL of the Custom Connector. + example: https://my-connector.example.com + type: string + signing_secret: + description: |- + The signing secret used to authenticate requests to the Custom + Connector. Write-only; never returned by the API. + type: string + tls_mode: + description: |- + Whether TLS verification is enabled. Defaults to `true` when omitted. + type: boolean + tls_ca_cert_content: + description: Optional PEM-encoded CA certificate content for TLS. + type: string + nullable: true + supports_groups: + description: Whether the Custom Connector supports groups. Defaults to `false`. + type: boolean + supports_nested_resources: + description: |- + Whether the Custom Connector supports nested resources. Defaults to + `false`. + type: boolean + supports_nested_groups: + description: |- + Whether the Custom Connector supports nested groups. Defaults to + `false`. + type: boolean + supports_event_ingestion: + description: |- + Whether the Custom Connector supports event ingestion. Defaults to + `false`. + type: boolean + supports_idp: + description: |- + Whether the Custom Connector can be connected as an upstream user + directory. Defaults to `false`. + type: boolean + idp_protocol: + $ref: "#/components/schemas/CustomConnectorIdpProtocolEnum" + required: + - identifier + - base_url + - signing_secret + type: object + UpdateAppInfo: description: |- - # App Object - ### Description - The `App` object is used to represent an app to an application. - - ### Usage Example - List from the `GET Apps` endpoint. - example: - app_id: f454d283-ca87-4a8a-bdbb-df212eca5353 - name: Okta Org - description: Okta directory for the engineering team. - admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8 - app_type: OKTA_DIRECTORY + Information needed to update an app. Currently supports only Push-only + apps (`CUSTOM`) and Custom Connector apps (`CUSTOM_CONNECTOR`). properties: - app_id: - description: The ID of the app. - example: f454d283-ca87-4a8a-bdbb-df212eca5353 - format: uuid - type: string name: - description: The name of the app. - example: Okta Org + description: The updated name of the app. type: string description: - description: A description of the app. - example: Okta directory for the engineering team. + description: The updated description of the app. type: string admin_owner_id: - description: The ID of the owner of the app. - example: 7c86c85d-0651-43e2-a748-d69d658418e8 + description: The updated ID of the owner of the app. format: uuid type: string - app_type: - $ref: "#/components/schemas/AppTypeEnum" - validations: - description: Validation checks of an apps' configuration and permissions. + visibility: + description: |- + Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`: manage + an app's visibility through the sub-endpoint instead of inline on + update. Still fully functional and validated on this surface. + deprecated: true + allOf: + - $ref: "#/components/schemas/VisibilityTypeEnum" + visibility_group_ids: + description: |- + The IDs of groups that can see this app when visibility is `LIMITED`. + Must be empty when the effective visibility is `GLOBAL` (either sent + explicitly on this request or already stored on the app); the server + returns `400` otherwise. + Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`. + deprecated: true items: - $ref: "#/components/schemas/AppValidation" + format: uuid + type: string type: array - required: - - app_id - - name - - description - - admin_owner_id - - app_type + import_visibility: + description: |- + Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`. + deprecated: true + allOf: + - $ref: "#/components/schemas/VisibilityTypeEnum" + custom_connector: + description: |- + Updates Custom Connector configuration. Only valid for + `CUSTOM_CONNECTOR` apps. + $ref: "#/components/schemas/UpdateCustomConnectorInfo" + type: object + UpdateCustomConnectorInfo: + description: |- + Information needed to update a Custom Connector app. Omitted fields are + left unchanged. Provide `signing_secret` only when rotating the secret. + properties: + identifier: + description: The identifier of the Custom Connector. + type: string + base_url: + description: The base URL of the Custom Connector. + type: string + signing_secret: + description: |- + New signing secret. Write-only; never returned by the API. Omit to + leave the existing secret unchanged. + type: string + tls_mode: + description: Whether TLS verification is enabled for the Custom Connector. + type: boolean + tls_ca_cert_content: + description: Optional PEM-encoded CA certificate content for TLS. + type: string + nullable: true + supports_groups: + description: Whether the Custom Connector supports groups. + type: boolean + supports_nested_resources: + description: Whether the Custom Connector supports nested resources. + type: boolean + supports_nested_groups: + description: Whether the Custom Connector supports nested groups. + type: boolean + supports_event_ingestion: + description: Whether the Custom Connector supports event ingestion. + type: boolean + supports_idp: + description: Whether the Custom Connector can be connected as an upstream user directory. + type: boolean + idp_protocol: + $ref: "#/components/schemas/CustomConnectorIdpProtocolEnum" type: object + CustomConnectorIdpProtocolEnum: + description: |- + How Opal reads users from the Custom Connector when it is an upstream directory: `OPAL` for + Opal's custom connector API, or `SCIM` for a SCIM 2.0 server, authenticated with the signing + secret as a bearer token. Defaults to `OPAL`. + enum: + - OPAL + - SCIM + type: string AppTypeEnum: description: The type of an app. enum: @@ -6013,10 +11152,13 @@ components: - COUPA - CURSOR - CUSTOM + - CONFLUENCE - CUSTOM_CONNECTOR - DATABRICKS - DATASTAX_ASTRA + - ALICLOUD - DEVIN + - DOCUSIGN - DUO - GCP - GIT_HUB @@ -6027,7 +11169,9 @@ components: - HUBSPOT - ILEVEL - INCIDENTIO + - JIRA - LDAP + - LINEAR - MARIADB - MONGO - MONGO_ATLAS @@ -6045,12 +11189,29 @@ components: - SALESFORCE - SNOWFLAKE - SLACK + - TABLEAU - TAILSCALE - TELEPORT - TWINGATE - VAULT - WORKDAY - ZENDESK + - ZOOM + - RAMP + - WRIKE + - VERCEL + - AXIOM + # GENERATED:BEGIN connection-type-enum + - ACTIVECAMPAIGN + - AHA + - ASANA + - BITWARDEN + - CALENDLY + - ONELOGIN + - SQUARE + - TRAY + # GENERATED:END connection-type-enum + - RIPPLING example: OKTA_DIRECTORY type: string EntityTypeEnum: @@ -6061,6 +11222,332 @@ components: - USER example: GROUP type: string + AddRoleAssignmentInput: + description: A single role assignment to create in a batch add request. + type: object + required: + - entity_id + - entity_type + - principal_id + - principal_type + properties: + entity_id: + description: The ID of the entity (resource or group) being accessed. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + entity_type: + description: The type of the entity being accessed. Must be `RESOURCE` or `GROUP`. + allOf: + - $ref: "#/components/schemas/EntityTypeEnum" + principal_id: + description: The ID of the principal (user, group, or resource) being granted access. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + format: uuid + type: string + principal_type: + description: The type of the principal being granted access. Must be `RESOURCE`, `GROUP`, or `USER`. + allOf: + - $ref: "#/components/schemas/EntityTypeEnum" + access_level_remote_id: + description: + Remote ID of the access level to grant. Omit for entities that only have + a single default access level. + nullable: true + type: string + duration_minutes: + description: + Duration of the grant in minutes. Omit or send `0` for an indefinite grant. + minimum: 0 + nullable: true + type: integer + AddRoleAssignmentsRequest: + description: Request body for `POST /role-assignments`. + type: object + required: + - role_assignments + properties: + role_assignments: + description: The list of role assignments to add. + items: + $ref: "#/components/schemas/AddRoleAssignmentInput" + minItems: 1 + maxItems: 100 + type: array + RoleAssignment: + description: A role assignment representing access granted to a principal for an entity. + type: object + required: + - id + - entity_id + - entity_type + - principal_id + - principal_type + properties: + id: + description: Unique identifier for the role assignment. + format: uuid + type: string + entity_id: + description: The ID of the entity (resource or group) being accessed. + format: uuid + type: string + entity_type: + $ref: "#/components/schemas/EntityTypeEnum" + principal_id: + description: The ID of the principal being granted access. + format: uuid + type: string + principal_type: + $ref: "#/components/schemas/EntityTypeEnum" + access_level: + description: The level of access granted. Null when the entity does not define access levels. + allOf: + - $ref: "#/components/schemas/ResourceAccessLevel" + nullable: true + expiration: + description: When this access expires. Null when the grant is indefinite. + format: date-time + nullable: true + type: string + granted_at: + description: When this access was first granted. + format: date-time + nullable: true + type: string + AddRoleAssignmentsEntry: + description: A single entry in the result of `POST /role-assignments`. + type: object + required: + - role_assignment + properties: + role_assignment: + $ref: "#/components/schemas/RoleAssignment" + RoleAssignmentEntityTypeEnum: + description: + Entity type for a role assignment. Entities are the resources or groups + access is granted on. + enum: + - GROUP + - RESOURCE + example: RESOURCE + type: string + PaginatedRoleAssignmentsList: + description: A paginated page of role assignments. + example: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 29827fb8-f2dd-4e80-9576-28e31e9934ac + entity_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + entity_type: RESOURCE + principal_id: e8581682-04f7-473a-a419-472f0fb26d46 + principal_type: USER + granted_at: 2024-07-10T19:21:00Z + properties: + next: + description: + The cursor with which to continue pagination if additional result + pages exist. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + nullable: true + type: string + previous: + description: The cursor used to obtain the current result page. + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/RoleAssignment" + type: array + type: object + required: + - results + AddRoleAssignmentsResponse: + description: Response body for `POST /role-assignments`. + type: object + required: + - task_ids + - entries + properties: + task_ids: + description: + Opaque IDs of push tasks enqueued to propagate the new assignments to + end systems. Each ID is a base64-encoded, URL-safe string that mirrors + the identifier returned by the GraphQL `addRoleAssignments` mutation. + items: + type: string + type: array + entries: + description: One entry per role assignment created, in request order. + items: + $ref: "#/components/schemas/AddRoleAssignmentsEntry" + type: array + ViewerCampaignItemSortFieldEnum: + description: Sort field for viewer campaign items. + enum: + - PRINCIPAL_NAME + - ENTITY_NAME + - EXPIRATION + - LAST_USED + example: PRINCIPAL_NAME + type: string + SortDirectionEnum: + description: Sort direction for viewer campaign items. + enum: + - ASC + - DESC + example: ASC + type: string + ViewerCampaignItemStatusEnum: + description: Decision status for a viewer campaign item. + enum: + - APPROVED + - REVOKED + - CHANGE_ROLE + - REDUCE_EXPIRATION + - NO_ACTION + - PENDING + - REASSIGNED + example: PENDING + type: string + ViewerCampaignItemReviewDecisionEnum: + description: Decision recorded on a campaign item review row. + enum: + - APPROVED + - REVOKED + - CHANGE_ROLE + - REDUCE_EXPIRATION + - ADMIN_REVOKED + - NO_ACTION + - REASSIGNED + example: APPROVED + type: string + ViewerCampaignItem: + description: | + A campaign review item assigned to the current viewer, matching + GraphQL `ViewerCampaignItem`. + properties: + campaign_item_review_id: + description: The ID of the campaign item review. + format: uuid + type: string + decision: + description: The reviewer's decision. Null when undecided. + allOf: + - $ref: "#/components/schemas/ViewerCampaignItemReviewDecisionEnum" + nullable: true + note: + description: Optional note from the reviewer. + nullable: true + type: string + decided_at: + description: When the decision was finalized. + format: date-time + nullable: true + type: string + pending_decision: + description: Pending decision staged by the viewer, if any. + allOf: + - $ref: "#/components/schemas/ViewerCampaignItemReviewDecisionEnum" + nullable: true + pending_note: + description: Pending note attached to the reviewer's pending decision. + nullable: true + type: string + updated_access_level_remote_id: + description: Target access level remote ID when decision is CHANGE_ROLE. + nullable: true + type: string + pending_updated_access_level_remote_id: + description: Pending target access level remote ID when decision is CHANGE_ROLE. + nullable: true + type: string + updated_duration_in_minutes: + description: + Built-in duration in minutes when decision is REDUCE_EXPIRATION. + nullable: true + type: integer + pending_updated_duration_in_minutes: + description: + Staged built-in duration in minutes when the pending decision is + REDUCE_EXPIRATION. + nullable: true + type: integer + reassigned_to_reviewer_ids: + description: User IDs this review was reassigned to. + items: + format: uuid + type: string + type: array + principal_id: + description: Principal ID from the role assignment. + format: uuid + type: string + principal_type: + $ref: "#/components/schemas/EntityTypeEnum" + entity_id: + description: Entity ID from the role assignment. + format: uuid + type: string + entity_type: + $ref: "#/components/schemas/EntityTypeEnum" + access_level_name: + description: Denormalized access level name. + nullable: true + type: string + access_level_remote_id: + description: Access level remote ID from the role assignment. + nullable: true + type: string + granted_at: + description: When the access was originally granted. + format: date-time + type: string + expires_at: + description: When the access expires, if set. + format: date-time + nullable: true + type: string + role_assignment_id: + description: ID of the underlying role assignment. + format: uuid + type: string + required: + - campaign_item_review_id + - principal_id + - principal_type + - entity_id + - entity_type + - granted_at + - role_assignment_id + type: object + PaginatedViewerCampaignItemsList: + description: A paginated list of viewer campaign items. + properties: + next: + description: | + The cursor with which to continue pagination if additional result + pages exist. + nullable: true + type: string + previous: + description: The cursor used to obtain the current result page. + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/ViewerCampaignItem" + type: array + total_count: + description: Total number of items matching the filter (across all pages). + type: integer + format: int64 + required: + - results + - total_count + type: object Event: description: |- # Event Object @@ -6285,6 +11772,99 @@ components: $ref: "#/components/schemas/ResourceAccessUser" type: array type: object + ResourceCustomAccessLevelResponse: + description: A custom access level for a resource. + properties: + resource_custom_access_level_id: + description: The unique ID of the custom access level. + type: string + format: uuid + resource_id: + description: The resource this access level belongs to. + type: string + format: uuid + access_level: + $ref: "#/components/schemas/ResourceAccessLevel" + policy: + description: The policy document for this access level. + type: string + nullable: true + requestable_by_default: + description: Whether this role is requestable. + type: boolean + stackable_sensitivity_index: + description: The sensitivity index in the access hierarchy. Null if unranked. + type: integer + nullable: true + member_resource_ids: + description: When addressed via a parent resource, lists the child resource IDs that back this aggregated entry. + type: array + items: + type: string + format: uuid + nullable: true + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + required: + - resource_custom_access_level_id + - resource_id + - access_level + - requestable_by_default + type: object + ResourceCustomAccessLevelList: + description: A list of custom access levels. + properties: + custom_access_levels: + type: array + items: + $ref: "#/components/schemas/ResourceCustomAccessLevelResponse" + required: + - custom_access_levels + type: object + CreateResourceCustomAccessLevelInfo: + description: Info for creating a custom access level. + properties: + access_level: + $ref: "#/components/schemas/ResourceAccessLevel" + policy: + description: The policy document. + type: string + nullable: true + requestable_by_default: + description: Whether the role is requestable. Defaults to false. + type: boolean + stackable_sensitivity_index: + description: The sensitivity index. Null to leave unranked. + type: integer + nullable: true + required: + - access_level + type: object + UpdateResourceCustomAccessLevelInfo: + description: Info for updating a custom access level. + properties: + access_level_name: + description: The new human-readable name. + type: string + policy: + description: The new policy document. + type: string + nullable: true + requestable_by_default: + description: Whether the role is requestable. + type: boolean + stackable_sensitivity_index: + description: The new sensitivity index. + type: integer + nullable: true + clear_stackable_sensitivity_index: + description: Set to true to remove from the hierarchy. + type: boolean + type: object ResourceAccessLevel: description: |- # Access Level Object @@ -6310,6 +11890,20 @@ components: - access_level_name - access_level_remote_id type: object + ResourceAccessLevelList: + description: A list of access levels defined for a resource. + example: + results: + - access_level_name: AdminRole + access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess + - access_level_name: ReadOnly + access_level_remote_id: arn:aws:iam::590304332660:role/ReadOnlyAccess + properties: + results: + items: + $ref: "#/components/schemas/ResourceAccessLevel" + type: array + type: object ResourceUserAccessStatus: description: |- # AccessStatus Object @@ -6551,75 +12145,486 @@ components: format: int32 type: integer required: - - principal_id - - principal_type - - entity_id - - entity_type - - has_direct_access - - num_access_paths + - principal_id + - principal_type + - entity_id + - entity_type + - has_direct_access + - num_access_paths + type: object + ResourceNHI: + description: |- + # Resource Non-Human Identity Direct Access Object + ### Description + This object is used to represent a non-human identity with direct access to a resource. + example: + non_human_identity_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac + resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + expiration_date: 2022-01-23T04:56:07Z + properties: + resource_id: + description: The ID of the resource. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + non_human_identity_id: + description: The resource ID of the non-human identity. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + format: uuid + type: string + access_level: + $ref: "#/components/schemas/ResourceAccessLevel" + expiration_date: + description: The day and time the non-human identity's access will expire. + example: 2022-01-23T04:56:07Z + format: date-time + nullable: true + type: string + required: + - resource_id + - non_human_identity_id + type: object + SessionsList: + example: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - connection_id: h0z968412-2451-4bbd-42h4-057l715d917m + user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac + resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + expiration_date: 2022-01-23T04:56:07Z + - connection_id: 6e6b5597-bd36-4f4c-a629-01e3fa791932 + user_id: b031c922-b84f-4424-9f4f-c49c05871bfe + resource_id: 77eb1ab7-2c27-4fc4-afdb-137e1265cddd + expiration_date: 2022-03-12T07:22:18Z + properties: + next: + description: + The cursor with which to continue pagination if additional result + pages exist. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + nullable: true + type: string + previous: + description: The cursor used to obtain the current result page. + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/Session" + type: array + type: object + OpalScriptTypeEnum: + description: The kind of automation an OpalScript performs. + enum: + - REQUEST_REVIEW + - REQUEST_DELEGATION_CONDITION + - CONTEXT_PROVIDER + - REQUEST_CONFIGURATION_CONDITION + example: REQUEST_REVIEW + type: string + OpalScript: + description: |- + # OpalScript Object + ### Description + The `OpalScript` object represents an OpalScript: a Starlark script that + automates part of Opal's access lifecycle. + example: + opal_script_id: 32acc112-21ff-4669-91c2-21e27683eaa1 + name: MFA check + script_type: REQUEST_REVIEW + version: 3 + properties: + opal_script_id: + description: The ID of the OpalScript. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + format: uuid + type: string + name: + description: The name of the OpalScript. + example: MFA check + type: string + script_type: + $ref: "#/components/schemas/OpalScriptTypeEnum" + script: + description: The source of the OpalScript's latest version. + type: string + version: + description: The version number of the OpalScript's latest version. + example: 3 + type: integer + updated_at: + description: The date the OpalScript was last updated. + format: date-time + type: string + required: + - opal_script_id + - name + - script_type + - script + - version + type: object + CreateOpalScriptInfo: + description: Information for creating an OpalScript. + example: + name: MFA check + script_type: REQUEST_REVIEW + owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8 + properties: + name: + description: The name of the OpalScript. + example: MFA check + type: string + script_type: + $ref: "#/components/schemas/OpalScriptTypeEnum" + script: + description: The source of the OpalScript. + type: string + owner_id: + description: + The owner of the service user Opal provisions for a `REQUEST_REVIEW` + script. Required for that script type and ignored for the others, + which have no reviewer identity. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid + type: string + required: + - name + - script_type + - script + type: object + UpdateOpalScriptInfo: + description: + Information for updating an OpalScript. Omitted fields are left + unchanged. + example: + name: MFA check + properties: + name: + description: The name of the OpalScript. + example: MFA check + type: string + script: + description: + The source of the OpalScript. A new version is recorded only when + the source differs from the current one. + type: string + type: object + OpalScriptList: + description: |- + # OpalScriptList Object + ### Description + A list of `OpalScript` objects. + properties: + results: + items: + $ref: "#/components/schemas/OpalScript" + type: array + required: + - results + type: object + Paladin: + description: |- + # Paladin Object + ### Description + The `Paladin` object represents a Paladin, Opal's AI access-request + reviewer. + example: + paladin_id: 32acc112-21ff-4669-91c2-21e27683eaa1 + name: paladin-agent-1 + owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8 + monitor_mode: true + admin_view_only: false + enabled_connectors: + - SLACK + properties: + paladin_id: + description: + The ID of the Paladin. Use this value as a reviewer in a request + configuration's service_user_ids. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + format: uuid + type: string + name: + description: The name of the Paladin. + example: paladin-agent-1 + type: string + owner_id: + description: The ID of the owner of the Paladin. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid + type: string + monitor_mode: + description: + When true, the Paladin reasons about requests but takes no action. + Shown as "Monitor mode" in the UI. + type: boolean + admin_view_only: + description: + When true, the Paladin's recommendations are visible only to admins. + Only meaningful when monitor_mode is true. + type: boolean + enabled_connectors: + description: The connectors the Paladin is allowed to use. + type: array + items: + $ref: "#/components/schemas/PaladinConnector" + instructions: + description: The free-form instructions that guide the Paladin's decisions. + example: Approve read-only access; escalate anything that grants write access. + type: string + required: + - paladin_id + - name + - owner_id + - monitor_mode + - admin_view_only + - enabled_connectors + - instructions + type: object + PaladinList: + description: |- + # PaladinList Object + ### Description + A list of `Paladin` objects. + properties: + results: + items: + $ref: "#/components/schemas/Paladin" + type: array + required: + - results + type: object + PaladinConnector: + description: A connector a Paladin is allowed to use. + enum: + - NOTION + - JIRA + - LINEAR + - SERVICE_NOW + - NOTION_TICKETS + - FRESH_SERVICE + - SHORTCUT + - SLACK + - PAGER_DUTY + - CONFLUENCE + - FLEET_DM + - FRESH_SERVICE_KNOWLEDGE + type: string + # New connectors get added over time; generated clients should accept values they don't know. + x-speakeasy-unknown-values: allow + PaladinContextSourceKind: + description: + The kind of source a Paladin can read. A SLACK_CHANNEL is a Slack + channel; a DOCUMENT is a Notion or Confluence page or a Freshservice + knowledge base article. + enum: + - SLACK_CHANNEL + - DOCUMENT + type: string + PaladinContextSourceProvider: + description: The integration a Paladin context source comes from. + enum: + - SLACK + - NOTION + - CONFLUENCE + - FRESH_SERVICE + type: string + # New providers get added over time; generated clients should accept values they don't know. + x-speakeasy-unknown-values: allow + PaladinContextSource: + description: |- + # PaladinContextSource Object + ### Description + A context source (a Slack channel or a document) that a Paladin is + configured to read during access-request review. + example: + id: 8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8 + paladin_id: 32acc112-21ff-4669-91c2-21e27683eaa1 + source_kind: SLACK_CHANNEL + third_party_provider: SLACK + remote_id: C0123456789 + name: "#access-requests" + url: https://example.slack.com/archives/C0123456789 + properties: + id: + description: The ID of the context source. + format: uuid + type: string + paladin_id: + description: The ID of the Paladin this source belongs to. + format: uuid + type: string + source_kind: + $ref: "#/components/schemas/PaladinContextSourceKind" + third_party_provider: + $ref: "#/components/schemas/PaladinContextSourceProvider" + remote_id: + description: + The provider's identifier for the source. The Slack channel ID for + a channel, or the Notion/Confluence page ID or numeric Freshservice + article ID for a document. + type: string + name: + description: A human-readable name for the source. + type: string + url: + description: A link to the source. + type: string + required: + - id + - paladin_id + - source_kind + - third_party_provider + - remote_id + - name + - url type: object - ResourceNHI: + PaladinContextSourceList: description: |- - # Resource Non-Human Identity Direct Access Object + # PaladinContextSourceList Object ### Description - This object is used to represent a non-human identity with direct access to a resource. + A list of `PaladinContextSource` objects. + properties: + results: + items: + $ref: "#/components/schemas/PaladinContextSource" + type: array + required: + - results + type: object + CreatePaladinContextSourceInfo: + description: Information for adding a context source to a Paladin. example: - non_human_identity_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac - resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - expiration_date: 2022-01-23T04:56:07Z + source_kind: SLACK_CHANNEL + third_party_provider: SLACK + remote_id: C0123456789 + name: "#access-requests" properties: - resource_id: - description: The ID of the resource. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid + source_kind: + $ref: "#/components/schemas/PaladinContextSourceKind" + third_party_provider: + $ref: "#/components/schemas/PaladinContextSourceProvider" + remote_id: + description: + The provider's identifier for the source. The Slack channel ID for + a channel, or the Notion/Confluence page ID or numeric Freshservice + article ID for a document. type: string - non_human_identity_id: - description: The resource ID of the non-human identity. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac - format: uuid + name: + description: An optional human-readable name for the source. type: string - access_level: - $ref: "#/components/schemas/ResourceAccessLevel" - expiration_date: - description: The day and time the non-human identity's access will expire. - example: 2022-01-23T04:56:07Z - format: date-time - nullable: true + url: + description: An optional link to the source. type: string required: - - resource_id - - non_human_identity_id + - source_kind + - third_party_provider + - remote_id type: object - SessionsList: + CreateServiceUserRequest: + description: | + Request body for `POST /service-users`. Intentionally minimal: only the + two fields that uniquely identify a new service user. Role grants are + a separate resource managed through `/role-assignments`, which keeps + each grant independently addressable and avoids silent drift when + grants are added or revoked through another code path. example: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - connection_id: h0z968412-2451-4bbd-42h4-057l715d917m - user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac - resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - expiration_date: 2022-01-23T04:56:07Z - - connection_id: 6e6b5597-bd36-4f4c-a629-01e3fa791932 - user_id: b031c922-b84f-4424-9f4f-c49c05871bfe - resource_id: 77eb1ab7-2c27-4fc4-afdb-137e1265cddd - expiration_date: 2022-03-12T07:22:18Z + name: paladin-prod + owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8 properties: - next: + name: + description: The display name of the service user. + example: paladin-prod + minLength: 1 + type: string + owner_id: description: - The cursor with which to continue pagination if additional result - pages exist. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - nullable: true + The ID of the owner (team of record) that owns the service user. + Must reference an existing owner in the caller's organization. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid type: string - previous: - description: The cursor used to obtain the current result page. - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - nullable: true + required: + - name + - owner_id + type: object + CreatePaladinInfo: + description: Information for creating a Paladin. + example: + name: paladin-agent-1 + owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8 + properties: + name: + description: The name of the Paladin. + example: paladin-agent-1 type: string - results: + owner_id: + description: The ID of the owner of the Paladin. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid + type: string + monitor_mode: + description: + When true, the Paladin reasons about requests but takes no action. + Defaults to true. + type: boolean + default: true + admin_view_only: + description: + When true, recommendations are visible only to admins. Only + meaningful when monitor_mode is true. Defaults to false. + type: boolean + default: false + enabled_connectors: + description: The connectors the Paladin is allowed to use. + type: array items: - $ref: "#/components/schemas/Session" + $ref: "#/components/schemas/PaladinConnector" + instructions: + description: + The free-form instructions that guide the Paladin's decisions. + Optional; if omitted the Paladin is created without instructions. + type: string + required: + - name + - owner_id + type: object + UpdatePaladinInfo: + description: Information for updating a Paladin. + example: + name: paladin-agent-1 + properties: + name: + description: The name of the Paladin. + example: paladin-agent-1 + type: string + monitor_mode: + description: + When true, the Paladin reasons about requests but takes no action. + If omitted, the existing value is preserved. + type: boolean + admin_view_only: + description: + When true, recommendations are visible only to admins. Only + meaningful when monitor_mode is true. If omitted, the existing value + is preserved. + type: boolean + enabled_connectors: + description: + The connectors the Paladin is allowed to use. If omitted, the + existing connectors are preserved. type: array + items: + $ref: "#/components/schemas/PaladinConnector" + instructions: + description: + The free-form instructions that guide the Paladin's decisions. If + omitted, the existing instructions are preserved. + type: string + required: + - name type: object Session: description: |- @@ -6758,6 +12763,37 @@ components: - third_party_provider type: object + InviteUserInfo: + description: The information required to invite a user. + properties: + email: + format: email + type: string + first_name: + type: string + last_name: + type: string + role: + $ref: "#/components/schemas/UserProductRoleEnum" + required: + - email + - first_name + - last_name + - role + type: object + UpdateUserInfo: + description: The user fields to update. + minProperties: 1 + properties: + manager_id: + description: The user's manager ID. Set to null to remove the manager. + format: uuid + nullable: true + type: string + position: + description: The user's position. + type: string + type: object User: description: |- # User Object @@ -6799,6 +12835,12 @@ components: description: The user's position. example: Senior Engineer type: string + manager_id: + description: The ID of the user's manager. Null if the user has no manager. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + format: uuid + nullable: true + type: string hr_idp_status: $ref: "#/components/schemas/UserHrIdpStatusEnum" required: @@ -6844,6 +12886,12 @@ components: - NOT_FOUND example: ACTIVE type: string + UserProductRoleEnum: + description: The product role assigned to a user. + enum: + - MEMBER + - ADMIN + type: string ThirdPartyProviderEnum: description: The third party provider of the remote user. enum: @@ -6990,7 +13038,7 @@ components: The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite. type: integer - maximum: 525960 # One year + maximum: 153722867 # Largest duration Opal can represent (~292 years) example: 120 access_level_remote_id: description: The updated remote ID of the access level granted to this group. @@ -6999,6 +13047,22 @@ components: required: - containing_group_id type: object + GroupMemberGroup: + description: |- + # GroupMemberGroup Object + ### Description + The `GroupMemberGroup` object is used to represent a group that is nested directly in another group. + example: + member_group_id: f454d283-ca87-4a8a-bdbb-df212eca5353 + properties: + member_group_id: + description: The ID of the member group. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + format: uuid + type: string + required: + - member_group_id + type: object Group: description: |- # Group Object @@ -7111,6 +13175,12 @@ components: approve requests for this group. example: False type: boolean + requires_forfeit_reason: + description: + A bool representing whether or not a reason is required when + forfeiting access to this group. + example: False + type: boolean require_mfa_to_request: description: A bool representing whether or not to require MFA for requesting @@ -7141,9 +13211,10 @@ components: is_requestable: description: A bool representing whether or not to allow access requests to this - group. + group. Deprecated in favor of `request_configurations`. example: False type: boolean + deprecated: true request_configurations: description: A list of request configurations for this group. example: [] @@ -7179,6 +13250,11 @@ components: maxLength: 800 nullable: true example: "Check your email to register your account." + max_direct_users_allowed: + description: The maximum number of direct users allowed for this group at once. Set to null to remove the limit. + type: integer + nullable: true + example: 10 risk_sensitivity: description: The risk sensitivity level for the group. When an override is set, @@ -7189,6 +13265,21 @@ components: risk_sensitivity_override: allOf: - $ref: "#/components/schemas/RiskSensitivityEnum" + match_remote_name: + description: + A bool representing whether or not the group's name is synced from + the end system. When true, the name is overwritten with the remote + name on each sync. Defaults to false. + example: False + type: boolean + match_remote_description: + description: + A bool representing whether or not the group's description is + synced from the end system. When true, the description is + overwritten with the remote description on each sync. Defaults to + false. + example: False + type: boolean last_successful_sync: readOnly: true description: Information about the last successful sync of this group. @@ -7254,6 +13345,20 @@ components: - access_level_name - access_level_remote_id type: object + GroupAccessLevelList: + description: A list of access levels defined for a group. + example: + results: + - access_level_name: Developer + access_level_remote_id: "30" + - access_level_name: Maintainer + access_level_remote_id: "40" + properties: + results: + items: + $ref: "#/components/schemas/GroupAccessLevel" + type: array + type: object GroupUser: description: |- # Group Access User Object @@ -7304,15 +13409,130 @@ components: format: date-time nullable: true type: string - propagation_status: - $ref: "#/components/schemas/PropagationStatus" + propagation_status: + $ref: "#/components/schemas/PropagationStatus" + required: + - email + - full_name + - group_id + - user_id + - group_name + - description + type: object + UserAccessEntityTypeEnum: + description: The type of entity a user has access to. + enum: + - GROUP + - RESOURCE + example: RESOURCE + type: string + UserAccessLevel: + description: |- + The level of access the user has to a resource or group. The "default" access level is an object whose fields + are all empty strings. + example: + access_level_name: Developer + access_level_remote_id: "20" + properties: + access_level_name: + description: The human-readable name of the access level. + example: Developer + type: string + access_level_remote_id: + description: The machine-readable identifier of the access level. + example: "20" + type: string + required: + - access_level_name + - access_level_remote_id + type: object + UserAccess: + description: |- + # User Access Object + ### Description + The `UserAccess` object represents a user's access to a single resource or group at one access level, either + directly or indirectly (for example, through group membership). + + ### Usage Example + Fetch from the `GET /users/{user_id}/access` endpoint. + example: + entity_type: RESOURCE + entity_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + entity_name: AdministratorAccess + description: Full access to all resources and settings. + access_level: + access_level_name: AdminRole + access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess + expiration_date: 2022-01-23T04:56:07Z + has_direct_access: false + num_access_paths: 2 + properties: + entity_type: + $ref: "#/components/schemas/UserAccessEntityTypeEnum" + entity_id: + description: The ID of the resource or group. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + entity_name: + description: The name of the resource or group. + example: AdministratorAccess + type: string + description: + description: The description of the resource or group. + example: Full access to all resources and settings. + type: string + access_level: + $ref: "#/components/schemas/UserAccessLevel" + expiration_date: + description: + The day and time the user's access will expire. If the user has more than one way to access the + entity, this is the latest expiration. Null if the access does not expire. + example: 2022-01-23T04:56:07Z + format: date-time + nullable: true + type: string + has_direct_access: + description: The user has direct access to this entity (vs. indirectly, like through a group). + example: true + type: boolean + num_access_paths: + description: The number of ways in which the user has access to this entity (directly and indirectly). + example: 2 + format: int32 + type: integer + propagation_status: + $ref: "#/components/schemas/PropagationStatus" + required: + - entity_type + - entity_id + - entity_name + - description + - access_level + - has_direct_access + - num_access_paths + type: object + UserAccessList: + description: A user's access to resources and groups, or one page of it if `page_size` was set. + properties: + results: + items: + $ref: "#/components/schemas/UserAccess" + type: array + next: + description: + The cursor with which to continue pagination if additional result + pages exist. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + nullable: true + type: string + previous: + description: The cursor used to obtain the current result page. + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + nullable: true + type: string required: - - email - - full_name - - group_id - - user_id - - group_name - - description + - results type: object PropagationStatus: description: @@ -7349,6 +13569,8 @@ components: - ERR_DRY_RUN_MODE_ENABLED - ERR_HR_IDP_PROVIDER_NOT_LINKED - ERR_REMOTE_UNRECOVERABLE_ERROR + - ERR_REMOTE_TICKET_NOT_FOUND + - ERR_CONNECTION_VALIDATION_FAILED example: - SUCCESS type: string @@ -7467,6 +13689,12 @@ components: approve requests for this group. example: False type: boolean + requires_forfeit_reason: + description: + A bool representing whether or not a reason is required when + forfeiting access to this group. + example: False + type: boolean require_mfa_to_request: description: A bool representing whether or not to require MFA for requesting @@ -7484,10 +13712,25 @@ components: type: boolean deprecated: true configuration_template_id: - description: The ID of the associated configuration template. + description: + |- + Deprecated. Use `PUT /groups/{group_id}/configuration-template` + instead; that endpoint exposes attach, re-point, and detach as a + single idempotent REST sub-resource and is the Terraform-friendly + surface for managing this linkage. This field remains honored on + the main PUT for now: set to a UUID to attach or re-point, set to + `null` to unlink (forks the template into a private configuration + that preserves the current settings), omit to leave linkage + unchanged. Scheduled for removal in a future major version. example: 06851574-e50d-40ca-8c78-f72ae6ab4304 format: uuid + nullable: true type: string + deprecated: true + # Keep omitempty so Go clients/tests that leave the pointer nil omit + # the field (no change) instead of marshaling JSON null (unlink). + x-oapi-codegen-extra-tags: + json: configuration_template_id,omitempty request_template_id: description: The ID of the associated request template. Deprecated in favor of @@ -7574,9 +13817,33 @@ components: maxLength: 800 nullable: true example: "Check your email to register your account." + max_direct_users_allowed: + description: The maximum number of direct users allowed for this group at once. Set to null to remove the limit. + type: integer + nullable: true + example: 10 risk_sensitivity_override: allOf: - $ref: "#/components/schemas/RiskSensitivityEnum" + match_remote_name: + description: + A bool representing whether or not the group's name should be + synced from the end system. When true, the name is overwritten + with the remote name on each sync, so a `name` provided together + with this field set to true will be replaced at the next sync. If + not provided, the current value is left unchanged. + example: False + type: boolean + match_remote_description: + description: + A bool representing whether or not the group's description should + be synced from the end system. When true, the description is + overwritten with the remote description on each sync, so a + `description` provided together with this field set to true will + be replaced at the next sync. If not provided, the current value + is left unchanged. + example: False + type: boolean required: - group_id type: object @@ -7605,16 +13872,42 @@ components: - PAGERDUTY_ON_CALL_SCHEDULE - INCIDENTIO_ON_CALL_SCHEDULE - ROOTLY_ON_CALL_SCHEDULE + - DATADOG_ON_CALL_SCHEDULE - DEVIN_GROUP - GIT_HUB_ENTERPRISE_TEAM - GRAFANA_TEAM - CLICKHOUSE_ROLE - SLACK_USER_GROUP + - CURSOR_GROUP - TWINGATE_GROUP - TWINGATE_GROUP_SYNCED - ZENDESK_GROUP - ZENDESK_ORGANIZATION - HUBSPOT_TEAM + - TABLEAU_GROUP + - CONFLUENCE_GROUP + - JIRA_GROUP + - DOCUSIGN_GROUP + - ZOOM_GROUP + - LINEAR_TEAM + - RAMP_DEPARTMENT + - RAMP_LOCATION + - WRIKE_GROUP + - AXIOM_GROUP + - BOX_GROUP + # GENERATED:BEGIN group-type-enum + - ACTIVECAMPAIGN_GROUP + - AHA_TEAM + - ASANA_TEAM + - BITWARDEN_GROUP + - CALENDLY_GROUP + - ONELOGIN_ROLE + - ONELOGIN_GROUP + - SQUARE_LOCATION + - SQUARE_JOB + # GENERATED:END group-type-enum + - RIPPLING_TEAM + - RIPPLING_SUPERGROUP example: OPAL_GROUP type: string ResourceTypeEnum: @@ -7630,6 +13923,11 @@ components: - AWS_ACCOUNT - AWS_SSO_PERMISSION_SET - AWS_ORGANIZATIONAL_UNIT + - AWS_AGENTCORE_GATEWAY + - AWS_AGENTCORE_GATEWAY_TARGET + - AWS_AGENTCORE_GATEWAY_TOOL + - MCP_SERVER + - MCP_TOOL - AZURE_MANAGEMENT_GROUP - AZURE_RESOURCE_GROUP - AZURE_SUBSCRIPTION @@ -7657,6 +13955,7 @@ components: - GCP_BIG_QUERY_DATASET - GCP_BIG_QUERY_TABLE - GCP_SERVICE_ACCOUNT + - GCP_BILLING_ACCOUNT - GIT_HUB_REPO - GIT_HUB_ORG_ROLE - GIT_LAB_PROJECT @@ -7686,6 +13985,7 @@ components: - DATASTAX_ASTRA_ROLE - COUPA_ROLE - CURSOR_ORGANIZATION + - CURSOR_ORIGIN_REPOSITORY - OPENAI_PLATFORM_PROJECT - OPENAI_PLATFORM_SERVICE_ACCOUNT - ANTHROPIC_WORKSPACE @@ -7703,9 +14003,46 @@ components: - GRAFANA_ROLE - CLICKHOUSE_DATABASE - CLICKHOUSE_TABLE + - CLICKHOUSE_CONSOLE_ROLE - TWINGATE_RESOURCE - ZENDESK_ROLE - HUBSPOT_ROLE + - ALICLOUD_RAM_ROLE + - ALICLOUD_ECS_INSTANCE + - DOCUSIGN_PERMISSION_PROFILE + - ZOOM_ROLE + - ZOOM_LICENSE + - LINEAR_ORGANIZATION + - LINEAR_PROJECT + - RAMP_FUND + - RAMP_ROLE + - WRIKE_USER_TYPE + - DATABRICKS_CATALOG + - DATABRICKS_SCHEMA + - DATABRICKS_VOLUME + - DATABRICKS_FUNCTION + - DATABRICKS_MODEL + - DATABRICKS_SERVICE + - DATABRICKS_MCP_SERVER + - VERCEL_ROLE + - VERCEL_PROJECT + - AXIOM_ROLE + - AXIOM_CUSTOM_ROLE + - RIPPLING_DEPARTMENT + - BOX_ENTERPRISE + - BOX_FOLDER + - SLACK_WORKSPACE + - SLACK_ORGANIZATION + # GENERATED:BEGIN resource-type-enum + - ASANA_WORKSPACE + - ASANA_WORKSPACE_GUEST + - BITWARDEN_ORGANIZATION + - CALENDLY_ROLE + - CALENDLY_EVENT_TYPE + - ONELOGIN_APP + - TRAY_WORKSPACE + - TRAY_ORGANIZATION + # GENERATED:END resource-type-enum example: AWS_IAM_ROLE type: string EntityItemTypeEnum: @@ -7743,6 +14080,9 @@ components: - AWS_RDS_MYSQL_CLUSTER - AWS_ACCOUNT - AWS_SSO_PERMISSION_SET + - AWS_AGENTCORE_GATEWAY + - AWS_AGENTCORE_GATEWAY_TARGET + - AWS_AGENTCORE_GATEWAY_TOOL - AZURE_MANAGEMENT_GROUP - AZURE_RESOURCE_GROUP - AZURE_SUBSCRIPTION @@ -7769,6 +14109,7 @@ components: - GCP_CLOUD_SQL_POSTGRES_INSTANCE - GCP_CLOUD_SQL_MYSQL_INSTANCE - GCP_SERVICE_ACCOUNT + - GCP_BILLING_ACCOUNT - GIT_HUB_REPO - GIT_HUB_ORG_ROLE - GIT_LAB_PROJECT @@ -7795,6 +14136,13 @@ components: - TELEPORT_ROLE - DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL - ILEVEL_ADVANCED_ROLE + - DATABRICKS_CATALOG + - DATABRICKS_SCHEMA + - DATABRICKS_VOLUME + - DATABRICKS_FUNCTION + - DATABRICKS_MODEL + - DATABRICKS_SERVICE + - DATABRICKS_MCP_SERVER example: OPAL_ROLE type: string VisibilityTypeEnum: @@ -7838,6 +14186,7 @@ components: - USER - ACCESS_REVIEW - OWNER + - EVENT example: RESOURCE type: string UpdateGroupResourcesInfo: @@ -7970,6 +14319,19 @@ components: type: object required: - containing_groups + GroupMemberGroupList: + example: + member_groups: + - member_group_id: 7870617d-e72a-47f5-a84c-693817ab4567 + - member_group_id: 50333e67-73ce-47ab-b049-d8abcd45f7a1 + properties: + member_groups: + items: + $ref: "#/components/schemas/GroupMemberGroup" + type: array + type: object + required: + - member_groups MessageChannelList: example: channels: @@ -8010,6 +14372,56 @@ components: type: object required: - on_call_schedules + GroupConfigurationTemplate: + description: |- + A reference, by ID only, to the configuration template a group is + linked to. This schema does not include any of the template's own + fields (name, description, request configurations, visibility, etc.) — + to read or modify those, use the `/configuration-templates` endpoints + with the ID carried here. A `null` `configuration_template_id` + indicates that the group is not linked to a configuration template + and uses its own private configuration. + example: + configuration_template_id: 06851574-e50d-40ca-8c78-f72ae6ab4304 + properties: + configuration_template_id: + description: |- + The ID of the configuration template that the group is linked to, + or `null` if the group is not linked to a configuration template. + Only the ID is exposed here; the template's own fields are managed + through the `/configuration-templates` endpoints. + example: 06851574-e50d-40ca-8c78-f72ae6ab4304 + format: uuid + nullable: true + type: string + type: object + required: + - configuration_template_id + ResourceConfigurationTemplate: + description: |- + A reference, by ID only, to the configuration template a resource is + linked to. This schema does not include any of the template's own + fields (name, description, request configurations, visibility, etc.) — + to read or modify those, use the `/configuration-templates` endpoints + with the ID carried here. A `null` `configuration_template_id` + indicates that the resource is not linked to a configuration template + and uses its own private configuration. + example: + configuration_template_id: 06851574-e50d-40ca-8c78-f72ae6ab4304 + properties: + configuration_template_id: + description: |- + The ID of the configuration template that the resource is linked + to, or `null` if the resource is not linked to a configuration + template. Only the ID is exposed here; the template's own fields + are managed through the `/configuration-templates` endpoints. + example: 06851574-e50d-40ca-8c78-f72ae6ab4304 + format: uuid + nullable: true + type: string + type: object + required: + - configuration_template_id VisibilityInfo: description: Visibility infomation of an entity. example: @@ -8028,6 +14440,36 @@ components: type: object required: - visibility + AppVisibilityInfo: + description: |- + Visibility information for an app. Mirrors `VisibilityInfo` but adds + the App-specific `import_visibility`, which governs the default + visibility of items imported from the app. + example: + visibility: LIMITED + visibility_group_ids: + - 7870617d-e72a-47f5-a84c-693817ab4567 + - 1520617d-e72a-47f5-a84c-693817ab48ad + import_visibility: LIMITED + properties: + visibility: + $ref: "#/components/schemas/VisibilityTypeEnum" + visibility_group_ids: + description: |- + The IDs of groups that can see this app when visibility is `LIMITED`. + Must be empty when visibility is `GLOBAL`. + items: + type: string + format: uuid + type: array + import_visibility: + description: |- + The visibility of items imported from this app. Defaults to + `GLOBAL` when omitted on a write. + $ref: "#/components/schemas/VisibilityTypeEnum" + type: object + required: + - visibility MessageChannelIDList: description: A list of message channel IDs. example: @@ -8105,7 +14547,10 @@ components: operator: description: The operator of the reviewer stage. Admin and manager approval are - also treated as reviewers. + also treated as reviewers. A stage that sets `escalation` must use + `OR`; `AND` is rejected there, because the escalation timer joins + the stage as an additional reviewer and would otherwise become a + required approver that stalls every request until the timeout. enum: - AND - OR @@ -8123,12 +14568,70 @@ components: type: string format: uuid type: array + escalation: + $ref: "#/components/schemas/ReviewerStageEscalation" + opal_script_ids: + description: + The IDs of OpalScripts assigned as reviewers for this stage. Only + `REQUEST_REVIEW` scripts can review; any other script type is + rejected. + items: + type: string + format: uuid + type: array type: object required: - operator - require_manager_approval - owner_ids - - stage + ReviewerStageEscalation: + description: |- + Escalation for a reviewer stage. When set, the request advances to the + reviewers named here if nobody responds within delay_minutes. Timely + approval by any of the stage's own reviewers resolves the stage without + escalating. + + owner_ids and user_ids name only who to escalate to; the stage's own + reviewers are added automatically and must not be repeated here. A + stage with owner_ids [X] escalating to Y sets escalation.owner_ids to + [Y], and reviewing after escalation is then open to both X and Y. + + Because the stage's reviewers are unioned in rather than copied, + removing someone from the stage also removes them from the escalation. + At least one owner or user named here must not already be a reviewer + of the stage. + example: + delay_minutes: 60 + owner_ids: + - 7870617d-e72a-47f5-a84c-693817ab4569 + properties: + delay_minutes: + description: + How long to wait for a response before escalating, in minutes. + Between 1 and 1440 (24 hours). + example: 60 + minimum: 1 + maximum: 1440 + type: integer + owner_ids: + description: + The owners to escalate to. The stage's own owner_ids are added + automatically and must not be repeated here. + items: + type: string + format: uuid + type: array + user_ids: + description: + The users to escalate to. The stage's own service_user_ids are + added automatically and must not be repeated here. + items: + type: string + format: uuid + type: array + type: object + required: + - delay_minutes MessageChannel: description: |- # MessageChannel Object @@ -8288,6 +14791,16 @@ components: type: object required: - group_id + cursor_group: + description: Remote info for a Cursor group. + properties: + group_id: + description: The id of the Cursor group, or team:members / team:admins for the owning team's built-in groups. + example: grp_01k2ja2000e0080000000000n2 + type: string + type: object + required: + - group_id twingate_group: description: Remote info for Twingate group. properties: @@ -8496,6 +15009,16 @@ components: type: object required: - schedule_id + datadog_on_call_schedule: + description: Remote info for Datadog on-call schedule group. + properties: + schedule_id: + description: The id of the Datadog on-call schedule. + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + type: string + type: object + required: + - schedule_id devin_group: description: Remote info for Devin group. properties: @@ -8536,36 +15059,261 @@ components: type: object required: - group_id - slack_user_group: - description: Remote info for Slack user group. + slack_user_group: + description: Remote info for Slack user group. + properties: + group_id: + description: The id of the Slack user group. + example: S0614TZR7 + type: string + type: object + required: + - group_id + zendesk_organization: + description: Remote info for Zendesk organization. + properties: + organization_id: + description: The ID of the Zendesk organization. + example: "67890" + type: string + type: object + required: + - organization_id + hubspot_team: + description: Remote info for HubSpot team. + properties: + team_id: + description: The ID of the HubSpot team. + example: "12345" + type: string + type: object + required: + - team_id + tableau_group: + description: Remote info for Tableau group. + properties: + group_id: + description: The ID of the Tableau group. + example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" + type: string + type: object + required: + - group_id + confluence_group: + description: Remote info for Confluence group. + properties: + group_id: + description: The ID of the Confluence group. + example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" + type: string + type: object + required: + - group_id + jira_group: + description: Remote info for Jira group. + properties: + group_id: + description: The ID of the Jira group. + example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" + type: string + type: object + required: + - group_id + docusign_group: + description: Remote info for Docusign group. + properties: + group_id: + description: The ID of the Docusign group. + example: "12345" + type: string + type: object + required: + - group_id + zoom_group: + description: Remote info for Zoom group. + properties: + group_id: + description: The ID of the Zoom group. + example: "SoBVexyrQjqCkcxjpBWi6w" + type: string + type: object + required: + - group_id + ramp_department: + description: Remote info for Ramp department. + properties: + department_id: + description: The ID of the Ramp department. + example: "2d68eb67-f6eb-4284-8683-7d530c77a5a6" + type: string + type: object + required: + - department_id + ramp_location: + description: Remote info for Ramp location. + properties: + location_id: + description: The ID of the Ramp location. + example: "f4efe11c-221f-4b49-a1e4-33eaf96a49ee" + type: string + type: object + required: + - location_id + wrike_group: + description: Remote info for Wrike group. + properties: + group_id: + description: The ID of the Wrike group. + example: "KX7ZHLVG" + type: string + type: object + required: + - group_id + axiom_group: + description: Remote info for Axiom RBAC group. + properties: + group_id: + description: The ID of the Axiom group. + example: "grp_0123456789abcdef" + type: string + type: object + required: + - group_id + docusign_signing_group: + description: Remote info for Docusign signing group. + properties: + signing_group_id: + description: The ID of the Docusign signing group. + example: "12345" + type: string + type: object + required: + - signing_group_id + linear_team: + description: Remote info for Linear team. + properties: + team_id: + description: The ID of the Linear team. + example: 8caed98e-1234-5678-9abc-def012345678 + type: string + type: object + required: + - team_id + box_group: + description: Remote info for Box Group. + properties: + group_id: + description: The group id of the Box Group. + type: string + type: object + required: + - group_id + # GENERATED:BEGIN group-remote-info-properties + activecampaign_group: + description: Remote info for ActiveCampaign Group. + properties: + group_id: + description: The group id of the ActiveCampaign Group. + type: string + type: object + required: + - group_id + aha_team: + description: Remote info for Aha Team. + properties: + group_id: + description: The group id of the Aha Team. + type: string + type: object + required: + - group_id + asana_team: + description: Remote info for Asana Team. + properties: + team_gid: + description: The team gid of the Asana Team. + type: string + workspace_gid: + description: The workspace gid of the Asana Team. + type: string + type: object + required: + - team_gid + bitwarden_group: + description: Remote info for Bitwarden Group. + properties: + group_id: + description: The group id of the Bitwarden Group. + type: string + type: object + required: + - group_id + calendly_group: + description: Remote info for Calendly Group. + properties: + group_id: + description: The group id of the Calendly Group. + type: string + type: object + required: + - group_id + onelogin_role: + description: Remote info for OneLogin Role. + properties: + group_id: + description: The group id of the OneLogin Role. + type: string + type: object + required: + - group_id + onelogin_group: + description: Remote info for OneLogin Group. + properties: + group_id: + description: The group id of the OneLogin Group. + type: string + type: object + required: + - group_id + square_location: + description: Remote info for Square Location. properties: group_id: - description: The id of the Slack user group. - example: S0614TZR7 + description: The group id of the Square Location. type: string type: object required: - group_id - zendesk_organization: - description: Remote info for Zendesk organization. + square_job: + description: Remote info for Square Job. properties: - organization_id: - description: The ID of the Zendesk organization. - example: "67890" + group_id: + description: The group id of the Square Job. type: string type: object required: - - organization_id - hubspot_team: - description: Remote info for HubSpot team. + - group_id + # GENERATED:END group-remote-info-properties + rippling_team: + description: Remote info for Rippling team. properties: team_id: - description: The ID of the HubSpot team. - example: "12345" + description: The ID of the Rippling team. + example: 8caed98e-1234-5678-9abc-def012345678 type: string type: object required: - team_id + rippling_supergroup: + description: Remote info for Rippling supergroup. + properties: + supergroup_id: + description: The ID of the Rippling supergroup. + example: 8caed98e-1234-5678-9abc-def012345678 + type: string + type: object + required: + - supergroup_id type: object ResourceRemoteInfo: description: @@ -9010,6 +15758,16 @@ components: required: - instance_id - project_id + gcp_billing_account: + description: Remote info for a GCP billing account. + properties: + billing_account_id: + description: The resource name of the billing account. + example: billingAccounts/012345-567890-ABCDEF + type: string + type: object + required: + - billing_account_id gcp_service_account: description: Remote info for a GCP service account. properties: @@ -9252,6 +16010,16 @@ components: required: - profile_id - user_license_id + docusign_permission_profile: + description: Remote info for Docusign permission profile. + properties: + permission_profile_id: + description: The ID of the Docusign permission profile. + example: "12345" + type: string + type: object + required: + - permission_profile_id salesforce_role: description: Remote info for Salesforce role. properties: @@ -9302,6 +16070,16 @@ components: type: object required: - org_id + cursor_origin_repository: + description: Remote info for a Cursor Origin repository. + properties: + repository_name: + description: The repository's owner slug and name. + example: acme/rocket + type: string + type: object + required: + - repository_name openai_platform_project: description: Remote info for OpenAI Platform project. properties: @@ -9315,153 +16093,496 @@ components: openai_platform_service_account: description: Remote info for OpenAI Platform service account. properties: - project_id: - description: The id of the project for the service account. - example: proj_abc + project_id: + description: The id of the project for the service account. + example: proj_abc + type: string + service_account_id: + description: The id of the service account. + example: svc_acct_abc + type: string + type: object + required: + - project_id + - service_account_id + anthropic_workspace: + description: Remote info for Anthropic workspace. + properties: + workspace_id: + description: The id of the workspace. + example: ws-123456 + type: string + type: object + required: + - workspace_id + slack_organization: + description: Remote info for Slack Enterprise Grid organization. + properties: + organization_id: + description: The ID of the Slack Enterprise Grid organization (enterprise ID). + example: E01234567 + type: string + type: object + required: + - organization_id + oracle_fusion_role: + description: Remote info for Oracle Fusion role. + properties: + role_id: + description: The id of the role. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + type: object + required: + - role_id + devin_organization: + description: Remote info for Devin organization. + properties: + org_id: + description: The id of the organization. + example: devin-org-01 + type: string + type: object + required: + - org_id + devin_role: + description: Remote info for Devin role. + properties: + role_id: + description: The id of the role. + example: devin-role-01 + type: string + type: object + required: + - role_id + netsuite_role: + description: Remote info for NetSuite role. + properties: + role_id: + description: The id of the role. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + type: object + required: + - role_id + datadog_role: + description: Remote info for Datadog role. + properties: + role_id: + description: The id of the role. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + type: object + required: + - role_id + clickhouse_database: + description: Remote info for ClickHouse database. + properties: + database_name: + description: The name of the ClickHouse database. + example: my_database + type: string + type: object + required: + - database_name + clickhouse_console_role: + description: Remote info for ClickHouse Cloud console role. + properties: + role_id: + description: The UUID of the ClickHouse Cloud console role. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + type: object + required: + - role_id + clickhouse_table: + description: Remote info for ClickHouse table. + properties: + database_name: + description: The name of the ClickHouse database containing the table. + example: my_database + type: string + table_name: + description: The name of the ClickHouse table. + example: my_table + type: string + type: object + required: + - database_name + - table_name + grafana_folder: + description: Remote info for Grafana folder. + properties: + folder_uid: + description: The UID of the Grafana folder. + example: fffRTXX + type: string + type: object + required: + - folder_uid + grafana_dashboard: + description: Remote info for Grafana dashboard. + properties: + dashboard_uid: + description: The UID of the Grafana dashboard. + example: dddRTXX + type: string + type: object + required: + - dashboard_uid + grafana_role: + description: Remote info for Grafana role(fixed or custom). + properties: + role_uid: + description: The UID of the Grafana role. + example: rrfRTXX + type: string + type: object + required: + - role_uid + zendesk_role: + description: Remote info for Zendesk custom role. + properties: + role_id: + description: The ID of the Zendesk custom role. + example: "12345" + type: string + type: object + required: + - role_id + hubspot_role: + description: Remote info for HubSpot role. + properties: + role_id: + description: The ID of the HubSpot role. + example: "12345" + type: string + type: object + required: + - role_id + alicloud_ram_role: + description: Remote info for AliCloud RAM role. + properties: + role_arn: + description: The ARN of the AliCloud RAM role. + example: "acs:ram::1234567890:role/MyRole" + type: string + type: object + required: + - role_arn + alicloud_ecs_instance: + description: Remote info for AliCloud ECS instance. + properties: + instance_id: + description: The ID of the ECS instance. + example: "i-bp1a1234567890abcd" + type: string + type: object + required: + - instance_id + zoom_role: + description: Remote info for Zoom role. + properties: + role_id: + description: The ID of the Zoom role. + example: "0" + type: string + type: object + required: + - role_id + zoom_license: + description: Remote info for Zoom license (user type). + properties: + license_type: + description: The Zoom user type representing the license (e.g. "2" for Licensed). + example: "2" + type: string + type: object + required: + - license_type + linear_organization: + description: Remote info for Linear organization. + properties: + org_id: + description: The ID of the Linear organization. + example: df85baa9-0af5-4f28-a5b5-64e4b2ddeedc + type: string + type: object + required: + - org_id + linear_project: + description: Remote info for Linear project. + properties: + project_id: + description: The ID of the Linear project. + example: 58ed91a7-1234-5678-9abc-def012345678 + type: string + type: object + required: + - project_id + ramp_fund: + description: Remote info for Ramp fund. + properties: + fund_id: + description: The ID of the Ramp fund. + example: "9abffcf0-dd7d-42f0-b806-ce0502ab6496" + type: string + type: object + required: + - fund_id + ramp_role: + description: Remote info for Ramp built-in role. + properties: + role: + description: The Ramp built-in role enum (e.g. BUSINESS_USER). + example: BUSINESS_USER + type: string + type: object + required: + - role + wrike_user_type: + description: Remote info for Wrike user type (license type). + properties: + user_type_id: + description: The Wrike user type ID (16-char UID from GET /user_types). + example: "KX7ZHLVGABCDEFGH" + type: string + type: object + required: + - user_type_id + databricks_catalog: + description: Remote info for Databricks Unity Catalog catalog. + properties: + metastore_id: + description: The ID of the Unity Catalog metastore the catalog belongs to. + example: 12345678-1234-1234-1234-123456789012 + type: string + full_name: + description: The dot-qualified full name of the catalog (e.g. "catalog"). + example: my_catalog + type: string + type: object + required: + - metastore_id + - full_name + databricks_schema: + description: Remote info for Databricks Unity Catalog schema. + properties: + metastore_id: + description: The ID of the Unity Catalog metastore the schema belongs to. + example: 12345678-1234-1234-1234-123456789012 + type: string + full_name: + description: The dot-qualified full name of the schema (e.g. "catalog.schema"). + example: my_catalog.my_schema + type: string + type: object + required: + - metastore_id + - full_name + databricks_volume: + description: Remote info for Databricks Unity Catalog volume. + properties: + metastore_id: + description: The ID of the Unity Catalog metastore the volume belongs to. + example: 12345678-1234-1234-1234-123456789012 + type: string + full_name: + description: The dot-qualified full name of the volume (e.g. "catalog.schema.volume"). + example: my_catalog.my_schema.my_volume + type: string + type: object + required: + - metastore_id + - full_name + databricks_function: + description: Remote info for Databricks Unity Catalog function. + properties: + metastore_id: + description: The ID of the Unity Catalog metastore the function belongs to. + example: 12345678-1234-1234-1234-123456789012 + type: string + full_name: + description: The dot-qualified full name of the function (e.g. "catalog.schema.function"). + example: my_catalog.my_schema.my_function + type: string + type: object + required: + - metastore_id + - full_name + databricks_model: + description: Remote info for Databricks Unity Catalog registered model. + properties: + metastore_id: + description: The ID of the Unity Catalog metastore the model belongs to. + example: 12345678-1234-1234-1234-123456789012 type: string - service_account_id: - description: The id of the service account. - example: svc_acct_abc + full_name: + description: The dot-qualified full name of the model (e.g. "catalog.schema.model"). + example: my_catalog.my_schema.my_model type: string type: object required: - - project_id - - service_account_id - anthropic_workspace: - description: Remote info for Anthropic workspace. + - metastore_id + - full_name + databricks_service: + description: Remote info for Databricks AI Gateway service. properties: - workspace_id: - description: The id of the workspace. - example: ws-123456 + metastore_id: + description: The ID of the Unity Catalog metastore the service belongs to. + example: 12345678-1234-1234-1234-123456789012 + type: string + full_name: + description: The dot-qualified full name of the service (e.g. "catalog.schema.service"). + example: my_catalog.my_schema.my_service type: string type: object required: - - workspace_id - oracle_fusion_role: - description: Remote info for Oracle Fusion role. + - metastore_id + - full_name + vercel_role: + description: Remote info for Vercel team role. properties: role_id: - description: The id of the role. - example: 123e4567-e89b-12d3-a456-426614174000 + description: The Vercel team role identifier (e.g. OWNER, MEMBER, CONTRIBUTOR). + example: CONTRIBUTOR type: string type: object required: - role_id - devin_organization: - description: Remote info for Devin organization. + vercel_project: + description: Remote info for Vercel project. properties: - org_id: - description: The id of the organization. - example: devin-org-01 + project_id: + description: The Vercel project id. + example: prj_xxxxxxxx type: string type: object required: - - org_id - devin_role: - description: Remote info for Devin role. + - project_id + axiom_role: + description: Remote info for Axiom base role. properties: role_id: - description: The id of the role. - example: devin-role-01 + description: The ID of the Axiom base role. + example: "role_member" type: string type: object required: - role_id - netsuite_role: - description: Remote info for NetSuite role. + axiom_custom_role: + description: Remote info for Axiom custom RBAC role. properties: role_id: - description: The id of the role. - example: 123e4567-e89b-12d3-a456-426614174000 + description: The ID of the Axiom custom role. + example: "role_0123456789abcdef" type: string type: object required: - role_id - datadog_role: - description: Remote info for Datadog role. + box_enterprise: + description: Remote info for Box Enterprise. properties: - role_id: - description: The id of the role. - example: 123e4567-e89b-12d3-a456-426614174000 + resource_id: + description: The resource id of the Box Enterprise. type: string type: object required: - - role_id - clickhouse_database: - description: Remote info for ClickHouse database. + - resource_id + box_folder: + description: Remote info for Box Folder. properties: - database_name: - description: The name of the ClickHouse database. - example: my_database + resource_id: + description: The resource id of the Box Folder. type: string type: object required: - - database_name - clickhouse_table: - description: Remote info for ClickHouse table. + - resource_id + # GENERATED:BEGIN resource-remote-info-properties + asana_workspace: + description: Remote info for Asana Workspace. properties: - database_name: - description: The name of the ClickHouse database containing the table. - example: my_database + workspace_gid: + description: The workspace gid of the Asana Workspace. type: string - table_name: - description: The name of the ClickHouse table. - example: my_table + type: object + required: + - workspace_gid + bitwarden_organization: + description: Remote info for Bitwarden Organization. + properties: + organization_id: + description: The organization id of the Bitwarden Organization. type: string type: object required: - - database_name - - table_name - grafana_folder: - description: Remote info for Grafana folder. + - organization_id + calendly_role: + description: Remote info for Calendly Role. properties: - folder_uid: - description: The UID of the Grafana folder. - example: fffRTXX + resource_id: + description: The resource id of the Calendly Role. type: string type: object required: - - folder_uid - grafana_dashboard: - description: Remote info for Grafana dashboard. + - resource_id + calendly_event_type: + description: Remote info for Calendly Event Type. properties: - dashboard_uid: - description: The UID of the Grafana dashboard. - example: dddRTXX + resource_id: + description: The resource id of the Calendly Event Type. type: string type: object required: - - dashboard_uid - grafana_role: - description: Remote info for Grafana role(fixed or custom). + - resource_id + onelogin_app: + description: Remote info for OneLogin App. properties: - role_uid: - description: The UID of the Grafana role. - example: rrfRTXX + resource_id: + description: The resource id of the OneLogin App. type: string type: object required: - - role_uid - zendesk_role: - description: Remote info for Zendesk custom role. + - resource_id + tray_workspace: + description: Remote info for Tray Workspace. properties: - role_id: - description: The ID of the Zendesk custom role. - example: "12345" + workspace_id: + description: The workspace id of the Tray Workspace. type: string type: object required: - - role_id - hubspot_role: - description: Remote info for HubSpot role. + - workspace_id + tray_organization: + description: Remote info for Tray Organization. properties: - role_id: - description: The ID of the HubSpot role. - example: "12345" + organization_id: + description: The organization id of the Tray Organization. type: string type: object required: - - role_id + - organization_id + # GENERATED:END resource-remote-info-properties + rippling_department: + description: Remote info for Rippling department. + properties: + department_id: + description: The ID of the Rippling department. + example: 8caed98e-1234-5678-9abc-def012345678 + type: string + type: object + required: + - department_id + slack_workspace: + description: Remote info for Slack workspace. + properties: + workspace_id: + description: The ID of the Slack workspace (team ID). + example: T01234567 + type: string + type: object + required: + - workspace_id type: object RiskSensitivityEnum: type: string @@ -9757,9 +16878,38 @@ components: maxLength: 800 nullable: true example: "Check your email to register your account." + max_direct_users_allowed: + description: The maximum number of direct users allowed for this resource at once. Set to null to remove the limit. + type: integer + nullable: true + example: 10 risk_sensitivity_override: allOf: - $ref: "#/components/schemas/RiskSensitivityEnum" + match_remote_name: + description: + A bool representing whether or not the resource's name should be + synced from the end system. When true, the name is overwritten + with the remote name on each sync, so a `name` provided together + with this field set to true will be replaced at the next sync. + Defaults to false. + example: False + type: boolean + match_remote_description: + description: + A bool representing whether or not the resource's description + should be synced from the end system. When true, the description + is overwritten with the remote description on each sync, so a + `description` provided together with this field set to true will + be replaced at the next sync. Defaults to false. + example: False + type: boolean + requires_forfeit_reason: + description: + A bool representing whether or not a reason is required when + forfeiting access to this resource. + example: False + type: boolean required: - name - resource_type @@ -9936,9 +17086,58 @@ components: maxLength: 800 nullable: true example: "Check your email to register your account." + max_direct_users_allowed: + description: The maximum number of direct users allowed for this group at once. Set to null to remove the limit. + type: integer + nullable: true + example: 10 risk_sensitivity_override: allOf: - $ref: "#/components/schemas/RiskSensitivityEnum" + match_remote_name: + description: + A bool representing whether or not the group's name should be + synced from the end system. When true, the name is overwritten + with the remote name on each sync, so a `name` provided together + with this field set to true will be replaced at the next sync. + Defaults to false. + example: False + type: boolean + match_remote_description: + description: + A bool representing whether or not the group's description should + be synced from the end system. When true, the description is + overwritten with the remote description on each sync, so a + `description` provided together with this field set to true will + be replaced at the next sync. Defaults to false. + example: False + type: boolean + requires_forfeit_reason: + description: + A bool representing whether or not a reason is required when + forfeiting access to this group. + example: False + type: boolean + handle: + description: + Slack user group mention name, without the @. Optional; Slack + assigns one if omitted. + type: string + example: eng-oncall + team_id: + description: + Slack workspace ID. Required when the Slack connection spans + multiple workspaces. + type: string + example: T01234567 + initial_user_ids: + description: + Opal user IDs to add as the group's initial members. Required when + creating a Slack user group. + type: array + items: + format: uuid + type: string required: - name - group_type @@ -10060,6 +17259,13 @@ components: example: 7c86c85d-0651-43e2-a748-d69d658418e8 format: uuid type: string + initiated_by_user_id: + description: + The unique identifier of the user the caller asserted asked for this access. Unverified + - Opal records the claim as given. Absent unless the caller supplied it. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid + type: string target_user_id: description: The unique identifier of the user who is the target of the request. example: 7c86c85d-0651-43e2-a748-d69d658418e8 @@ -10074,6 +17280,20 @@ components: description: The status of the request. example: pending $ref: "#/components/schemas/RequestStatusEnum" + source: + description: |- + The channel that created the request. Omitted when the source was not recorded. + MCP counts only OAuth sessions. An agent using an API token or a person's + credentials is counted as API, CLI, or WEB. + enum: + - WEB + - SLACK + - MICROSOFT_TEAMS + - CLI + - API + - MCP + - ACCESS_REVIEW + type: string reason: description: The reason for the request. example: I need access to the AWS account. @@ -10308,36 +17528,220 @@ components: description: The name of the target on the remote system. example: SupportUser type: string - example: - resource_id: null - group_id: f454d283-ca87-4a8a-bdbb-df212eca5353 - access_level_name: admin - access_level_remote_id: arn:aws:iam::490306337630:role/SupportUser - name: Engineering Team - RequestCustomFieldResponse: + example: + resource_id: null + group_id: f454d283-ca87-4a8a-bdbb-df212eca5353 + access_level_name: admin + access_level_remote_id: arn:aws:iam::490306337630:role/SupportUser + name: Engineering Team + RequestCustomFieldResponse: + properties: + field_name: + type: string + field_type: + example: SHORT_TEXT + $ref: "#/components/schemas/RequestTemplateCustomFieldTypeEnum" + field_value: + oneOf: + - type: string + example: "This is a response to a long text or short text or multi choice" + - type: boolean + example: true + required: + - field_name + - field_type + - field_value + RequestTemplateCustomFieldCalloutMetadata: + description: + The message shown to a requester by a `CALLOUT` field, and how prominently to + show it. + type: object + properties: + severity: + description: How prominently the message is shown. + enum: + - INFO + - WARNING + - ERROR + type: string + example: WARNING + text: + description: The message shown to the requester. + type: string + example: This role grants access to production customer data. + required: + - severity + - text + RequestTemplateCustomFieldMultiChoiceMetadata: + description: The options a requester can pick from in a `MULTI_CHOICE` or `MULTI_SELECT` field. + type: object + properties: + options: + items: + type: string + type: array + example: + - Incident response + - Scheduled maintenance + required: + - options + RequestTemplateCustomFieldInput: + description: + A field to put on a request template. Separate from `RequestTemplateCustomField` + because a callout's name may be omitted on write, while a field read back always + has one. + type: object + properties: + name: + description: + The label shown to the requester. Required for every type except `CALLOUT`, + which is display-only -- its name is an internal identifier, never displayed, + and is generated if omitted. + type: string + example: Why do you need this access? + description: + description: Helper text shown beneath the field. + type: string + nullable: true + type: + $ref: "#/components/schemas/RequestTemplateCustomFieldTypeEnum" + required: + description: + Whether the requester must answer. Ignored for `CALLOUT` fields, which + collect no answer. + type: boolean + example: true + metadata: + $ref: "#/components/schemas/RequestTemplateCustomFieldMetadata" + required: + - type + RequestTemplateCustomFieldMetadata: + description: + Extra configuration for field types that need it. Exactly one member is set, and + which one is determined by the field's `type`. + type: object + properties: + callout_data: + $ref: "#/components/schemas/RequestTemplateCustomFieldCalloutMetadata" + multi_choice_data: + $ref: "#/components/schemas/RequestTemplateCustomFieldMultiChoiceMetadata" + RequestTemplateCustomField: + description: A field on a request template. + type: object + properties: + name: + description: + The label shown to the requester. `CALLOUT` fields are display-only, so + their name is an internal identifier and is never displayed. + type: string + example: Why do you need this access? + description: + description: Helper text shown beneath the field. + type: string + nullable: true + type: + $ref: "#/components/schemas/RequestTemplateCustomFieldTypeEnum" + required: + description: + Whether the requester must answer. Always false for `CALLOUT` fields, which + collect no answer. + type: boolean + example: true + metadata: + $ref: "#/components/schemas/RequestTemplateCustomFieldMetadata" + required: + - name + - type + RequestTemplate: + description: A template describing what a requester is asked when requesting access. + type: object + properties: + request_template_id: + description: The ID of the request template. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid + type: string + name: + description: The name of the request template. + example: Production access questions + type: string + custom_fields: + description: The fields on this template, in the order they are shown. + items: + $ref: "#/components/schemas/RequestTemplateCustomField" + type: array + required: + - request_template_id + - name + PaginatedRequestTemplateList: + type: object + properties: + next: + description: The cursor with which to continue pagination if additional result pages exist. + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzAyMTMlMkIwMCUzQTAw + previous: + description: The cursor used to obtain the current result page. + type: string + nullable: true + example: cj0xJnA9MjAyMS0wMS0wNSswMyUzQTI0JTNBNTMuNDMwMjEz + results: + items: + $ref: "#/components/schemas/RequestTemplate" + type: array + CreateRequestTemplateInfo: + description: Information for creating a request template. + type: object + properties: + name: + description: The name of the request template. + example: Production access questions + type: string + custom_fields: + description: The fields to put on the template, in the order they are shown. + items: + $ref: "#/components/schemas/RequestTemplateCustomFieldInput" + type: array + required: + - name + UpdateRequestTemplateInfo: + description: + Information for updating a request template. Omitted properties are left + unchanged, but `custom_fields` replaces the template's fields wholesale when + provided. + type: object properties: - field_name: + request_template_id: + description: The ID of the request template to update. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid type: string - field_type: - example: SHORT_TEXT - $ref: "#/components/schemas/RequestTemplateCustomFieldTypeEnum" - field_value: - oneOf: - - type: string - example: "This is a response to a long text or short text or multi choice" - - type: boolean - example: true + name: + description: The new name of the request template. + type: string + custom_fields: + description: + The complete set of fields for the template. Any field not included is + removed. + items: + $ref: "#/components/schemas/RequestTemplateCustomFieldInput" + type: array required: - - field_name - - field_type - - field_value + - request_template_id RequestTemplateCustomFieldTypeEnum: - description: The type of the custom request field. + description: + The type of the custom request field. `CALLOUT` fields are display-only -- + they + show a message to the requester and collect no answer, so they never appear in a + request's `custom_fields`. enum: - SHORT_TEXT - LONG_TEXT - BOOLEAN - MULTI_CHOICE + - MULTI_SELECT + - CALLOUT type: string RequestList: description: |- @@ -10474,6 +17878,12 @@ components: approve requests for this resource. example: False type: boolean + requires_forfeit_reason: + description: + A bool representing whether or not a reason is required when + forfeiting access to this resource. + example: False + type: boolean require_mfa_to_request: description: A bool representing whether or not to require MFA for requesting @@ -10500,9 +17910,10 @@ components: is_requestable: description: A bool representing whether or not to allow access requests to this - resource. + resource. Deprecated in favor of `request_configurations`. example: False type: boolean + deprecated: true parent_resource_id: description: The ID of the parent resource. example: 06851574-e50d-40ca-8c78-f72ae6ab4305 @@ -10533,6 +17944,11 @@ components: type: string maxLength: 800 nullable: true + max_direct_users_allowed: + description: The maximum number of direct users allowed for this resource at once. Set to null to remove the limit. + type: integer + nullable: true + example: 10 risk_sensitivity: description: The risk sensitivity level for the resource. When an override is @@ -10579,6 +17995,21 @@ components: example: - f454d283-ca67-4a8a-bdbb-df212eca5347 - f454d283-ca67-4a8a-bdbb-df212eca5348 + match_remote_name: + description: + A bool representing whether or not the resource's name is synced + from the end system. When true, the name is overwritten with the + remote name on each sync. Defaults to false. + example: False + type: boolean + match_remote_description: + description: + A bool representing whether or not the resource's description is + synced from the end system. When true, the description is + overwritten with the remote description on each sync. Defaults to + false. + example: False + type: boolean last_successful_sync: readOnly: true description: Information about the last successful sync of this resource. @@ -10710,6 +18141,12 @@ components: approve requests for this resource. example: False type: boolean + requires_forfeit_reason: + description: + A bool representing whether or not a reason is required when + forfeiting access to this resource. + example: False + type: boolean require_mfa_to_request: description: A bool representing whether or not to require MFA for requesting @@ -10740,14 +18177,53 @@ components: maxLength: 800 nullable: true example: "Check your email to register your account." + max_direct_users_allowed: + description: The maximum number of direct users allowed for this resource at once. Set to null to remove the limit. + type: integer + nullable: true + example: 10 risk_sensitivity_override: allOf: - $ref: "#/components/schemas/RiskSensitivityEnum" + match_remote_name: + description: + A bool representing whether or not the resource's name should be + synced from the end system. When true, the name is overwritten + with the remote name on each sync, so a `name` provided together + with this field set to true will be replaced at the next sync. If + not provided, the current value is left unchanged. + example: False + type: boolean + match_remote_description: + description: + A bool representing whether or not the resource's description + should be synced from the end system. When true, the description + is overwritten with the remote description on each sync, so a + `description` provided together with this field set to true will + be replaced at the next sync. If not provided, the current value + is left unchanged. + example: False + type: boolean configuration_template_id: - description: The ID of the associated configuration template. + description: + |- + Deprecated. Use `PUT /resources/{resource_id}/configuration-template` + instead; that endpoint exposes attach, re-point, and detach as a + single idempotent REST sub-resource and is the Terraform-friendly + surface for managing this linkage. This field remains honored on + the main PUT for now: set to a UUID to attach or re-point, set to + `null` to unlink (forks the template into a private configuration + that preserves the current settings), omit to leave linkage + unchanged. Scheduled for removal in a future major version. example: 06851574-e50d-40ca-8c78-f72ae6ab4304 format: uuid + nullable: true type: string + deprecated: true + # Keep omitempty so Go clients/tests that leave the pointer nil omit + # the field (no change) instead of marshaling JSON null (unlink). + x-oapi-codegen-extra-tags: + json: configuration_template_id,omitempty request_template_id: description: The ID of the associated request template. Deprecated in favor of @@ -11258,6 +18734,10 @@ components: example: ACTIVE ruleClauses: $ref: "#/components/schemas/RuleClauses" + uses_opal_query: + description: True when the access rule uses an Opal Query, which the API can't describe yet. Its `ruleClauses` are then empty; view the rule in Opal. + example: false + type: boolean required: - status - ruleClauses @@ -11276,8 +18756,8 @@ components: RuleConjunction: properties: clauses: + description: Empty only when the access rule has `uses_opal_query` set. type: array - minItems: 1 items: $ref: "#/components/schemas/RuleDisjunction" required: @@ -11314,6 +18794,10 @@ components: enum: - HR_IDP_STATUS values: + description: >- + Values to match; a user matches if their attribute equals any of them. For + HR_IDP_STATUS, use HrIdpStatus values, or UNSET for users with no IDP status + (shown as "Inactive"). UNSET must be the last value. type: array items: type: string @@ -11541,6 +19025,11 @@ components: type: array items: type: string + opal_script_id: + description: The ID of a `REQUEST_CONFIGURATION_CONDITION` OpalScript that decides whether this request configuration applies. Cannot be combined with `group_ids` or `role_remote_ids`. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + type: string + format: uuid RequestConfiguration: description: |- # Request Configuration Object @@ -11562,6 +19051,7 @@ components: max_duration_minutes: 120 recommended_duration_minutes: 120 require_support_ticket: False + reason_optional: False reviewer_stages: - reviewer_stage_id: 7c86c85d-0651-43e2-a748-d69d658418e8 owner_ids: @@ -11595,7 +19085,8 @@ components: max_duration_minutes: description: The maximum duration for which the resource can be requested (in - minutes). + minutes). Capped at 1 year (525600) unless a longer maximum has been + enabled for your organization. Use -1 for an indefinite duration. type: integer example: 120 recommended_duration_minutes: @@ -11610,6 +19101,13 @@ components: require an access ticket. example: False type: boolean + reason_optional: + description: + A bool representing whether the reason field is optional for + requests. + example: False + type: boolean + nullable: true extensions_duration_in_minutes: description: The duration for which access can be extended (in minutes). Set to @@ -11787,6 +19285,13 @@ components: resources associated with this configuration template. example: False type: boolean + requires_forfeit_reason: + description: + A bool representing whether or not a reason is required when + forfeiting access to resources or groups using this configuration + template. + example: False + type: boolean name: description: The name of the configuration template. example: Prod AWS Template @@ -11946,6 +19451,13 @@ components: resources associated with this configuration template. example: False type: boolean + requires_forfeit_reason: + description: + A bool representing whether or not a reason is required when + forfeiting access to resources or groups using this configuration + template. + example: False + type: boolean ticket_propagation: $ref: "#/components/schemas/TicketPropagationConfiguration" custom_request_notification: @@ -12110,6 +19622,13 @@ components: resources associated with this configuration template. example: False type: boolean + requires_forfeit_reason: + description: + A bool representing whether or not a reason is required when + forfeiting access to resources or groups using this configuration + template. + example: False + type: boolean ticket_propagation: $ref: "#/components/schemas/TicketPropagationConfiguration" custom_request_notification: @@ -12213,6 +19732,18 @@ components: example: userd283-ca87-4a8a-bdbb-df212eca5353 format: uuid type: string + initiated_by_user_id: + description: + The ID of the user who asked for this access, for callers filing a request on + someone else's behalf. Opal records this claim as given and does not verify it, so it + never affects authorization, reviewer routing, or who may cancel the request; the + authenticated caller remains the requester. Must be a user of your organization. + Only accepted from a service user for which an Opal admin has enabled "Let this + service user record who asked for access" under Settings on the service user's page; + any other caller receives a 403 when this field is set. + example: userd283-ca87-4a8a-bdbb-df212eca5353 + format: uuid + type: string reason: type: string support_ticket: @@ -12704,10 +20235,13 @@ components: - end_time - reason ApiAccessLevelEnum: - description: The access level of an API token. + description: The access level of an API token. AGENT_HOOKS tokens are made only by + the Claude Code hook kit's browser sign-in and can only report agent activity; they cannot be + created through this API. enum: - READ_ONLY - FULL_ACCESS + - AGENT_HOOKS type: string EventStreamConnectionTypeEnum: description: The type of event stream connection. @@ -12921,6 +20455,49 @@ components: - user_id - access_level type: object + CreateTokenInfo: + description: Information needed to create a first-party API token. + type: object + required: + - token_label + - access_level + properties: + token_label: + description: A human-readable label for the token. + example: My API Token + type: string + access_level: + $ref: "#/components/schemas/ApiAccessLevelEnum" + user_id: + description: | + The ID of the user the token should authenticate as. Omit or set to + the caller's ID to create a personal token. Set to a service user's + ID to mint a token for that service user. + example: d4a7d928-783e-4599-8ec6-088d635a5bcc + format: uuid + type: string + expires_at: + description: Optional expiration time for the token. + example: 2023-01-23T04:56:07Z + format: date-time + type: string + CreateTokenResponse: + description: | + The created API token. `signed_token` is the secret credential and is + only returned once at creation time. + type: object + required: + - token + - signed_token + properties: + token: + $ref: "#/components/schemas/Token" + signed_token: + description: | + The secret token string. Store this securely; it is only returned + once at creation time. + type: string + example: opal_pat_abc123... PaginatedTokensList: example: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -12952,7 +20529,303 @@ components: required: - results type: object + StopCampaignRequest: + properties: + revoke_unreviewed: + default: false + description: Revoke all unreviewed access grants. Access grants with no reviewer decision will be immediately revoked. + type: boolean + type: object + CampaignItemReviewerAssignment: + description: Pair of campaign item and reviewer to assign or unassign. + properties: + campaign_item_id: + description: The ID of the campaign item. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + format: uuid + type: string + reviewer_id: + description: | + The ID of the reviewer. Required when `assignment_source` is `MANUAL` + (or omitted), and required for every unassign entry. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + format: uuid + nullable: true + type: string + assignment_source: + description: | + Defaults to `MANUAL`. When `PRINCIPAL_MANAGER` or `ASSET_ADMIN_OWNER`, + the backend resolves reviewer ID(s) and `reviewer_id` may be omitted. + allOf: + - $ref: "#/components/schemas/CampaignItemReviewerAssignmentSourceEnum" + required: + - campaign_item_id + type: object + CampaignItemReviewerSourceRemoval: + description: | + Remove all pending reviewer rows for a given assignment source on a + campaign item. Completed reviews are preserved. + properties: + campaign_item_id: + description: The ID of the campaign item. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + format: uuid + type: string + assignment_source: + $ref: "#/components/schemas/CampaignItemReviewerAssignmentSourceEnum" + required: + - campaign_item_id + - assignment_source + type: object + UpdateCampaignItemReviewersInfo: + description: Input for updating campaign item reviewers. + properties: + to_assign: + description: Pairs to assign. Existing pairs are ignored. + items: + $ref: "#/components/schemas/CampaignItemReviewerAssignment" + type: array + to_unassign: + description: | + Pairs to unassign. Only pending `MANUAL` pairs are removed; missing + pairs are skipped. `reviewer_id` is required on each entry. + items: + $ref: "#/components/schemas/CampaignItemReviewerAssignment" + type: array + to_remove_sources: + description: Remove all pending rows for the given assignment sources. + items: + $ref: "#/components/schemas/CampaignItemReviewerSourceRemoval" + type: array + type: object + CampaignItemUnassignedPresetMessage: + description: Preset assignment feedback when no review row was created. + properties: + campaign_item_id: + description: The ID of the campaign item. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + format: uuid + type: string + assignment_source: + $ref: "#/components/schemas/CampaignItemReviewerAssignmentSourceEnum" + message: + description: Human-readable explanation of why no reviewer was assigned. + type: string + required: + - campaign_item_id + - assignment_source + - message + type: object + UpdateCampaignItemReviewersResult: + description: Result of updating campaign item reviewers. + properties: + reviews: + description: Full review set for every referenced item after the update. + items: + $ref: "#/components/schemas/CampaignItemReview" + type: array + unassigned_preset_messages: + description: Preset assignment messages for items that did not produce a review row. + items: + $ref: "#/components/schemas/CampaignItemUnassignedPresetMessage" + type: array + required: + - reviews + - unassigned_preset_messages + type: object + ReviewCampaignItemDecisionInfo: + description: | + A single reviewer decision to submit for a campaign item review. + Mirrors GraphQL `CampaignItemReviewDecisionInput`. + type: object + required: + - campaign_item_review_id + - decision + properties: + campaign_item_review_id: + description: The ID of the campaign item review to update. + example: 4b8f2c1a-9d3e-4f6a-8b1c-2e5d7a9f0c3b + format: uuid + type: string + decision: + $ref: "#/components/schemas/CampaignItemReviewDecisionEnum" + note: + description: Optional note from the reviewer for this decision. + example: Access is still required for on-call. + nullable: true + type: string + access_level_remote_id: + description: | + Required when `decision` is `CHANGE_ROLE`. The remote ID of the + access level to change to. Ignored for other decisions. + example: arn:aws:iam::123456789012:role/ReadOnly + nullable: true + type: string + new_reviewer_user_ids: + description: | + When `decision` is `REASSIGNED` and `assignment_source` is `MANUAL` + or omitted, the user IDs to reassign this review to. + items: + format: uuid + type: string + nullable: true + type: array + assignment_source: + allOf: + - $ref: "#/components/schemas/CampaignItemReviewerAssignmentSourceEnum" + nullable: true + ReviewCampaignItemsInfo: + description: | + Input for submitting review decisions on one or more campaign item reviews. + type: object + required: + - decisions + properties: + decisions: + description: The decisions to record. Each targets a single campaign item review. + items: + $ref: "#/components/schemas/ReviewCampaignItemDecisionInfo" + type: array + CampaignItemReviewResult: + description: | + A campaign item review after a successful submit. Flat fields only — + does not expand principal/entity relationships. + type: object + required: + - campaign_item_review_id + properties: + campaign_item_review_id: + description: The ID of the campaign item review. + example: 4b8f2c1a-9d3e-4f6a-8b1c-2e5d7a9f0c3b + format: uuid + type: string + decision: + allOf: + - $ref: "#/components/schemas/CampaignItemReviewDecisionEnum" + nullable: true + note: + description: Note recorded with the decision, if any. + nullable: true + type: string + decided_at: + description: When the decision was submitted. + format: date-time + nullable: true + type: string + updated_access_level_remote_id: + description: | + When `decision` is `CHANGE_ROLE`, the remote ID of the access level + the reviewer selected. + nullable: true + type: string + reassigned_to_reviewer_ids: + description: | + When `decision` is `REASSIGNED`, the user IDs the review was + reassigned to. + items: + format: uuid + type: string + type: array + ReviewCampaignItemsResponse: + description: Result of submitting campaign item review decisions. + type: object + required: + - reviews + properties: + reviews: + description: Updated reviews in the same order as the request decisions. + items: + $ref: "#/components/schemas/CampaignItemReviewResult" + type: array + RemoveRoleAssignmentInput: + description: A single role assignment to revoke. + type: object + required: + - entity_id + - entity_type + - principal_id + - principal_type + properties: + entity_id: + description: The ID of the entity (resource or group) to revoke access from. + format: uuid + type: string + entity_type: + $ref: "#/components/schemas/EntityTypeEnum" + principal_id: + description: The ID of the principal (user, group, or resource) losing access. + format: uuid + type: string + principal_type: + $ref: "#/components/schemas/EntityTypeEnum" + access_level_remote_id: + type: string + nullable: true + description: | + Remote ID of the specific access-level grant to revoke. The lookup + is exact-match on this value against stored grants. + + Required when the entity has access levels defined (the server + returns 422 if omitted or sent as `null`/empty for such an entity). + Must be omitted or `null` for entities with no access-level catalog + (group memberships and resources that have no defined access + levels); supplying a value in that case also returns 422. These + rules mirror those of `POST /v1/role-assignments`. + + A specified value that does not match any stored grant for this + `(entity_id, principal_id)` pair is a successful idempotent no-op: + HTTP 200 is returned and the entry is absent from `entries`. + RemoveRoleAssignmentsRequest: + description: Request body for `DELETE /role-assignments`. + type: object + required: + - role_assignments + properties: + role_assignments: + type: array + minItems: 1 + maxItems: 100 + items: + $ref: "#/components/schemas/RemoveRoleAssignmentInput" + RemoveRoleAssignmentsEntry: + description: A single revoked role assignment in a `RemoveRoleAssignmentsResponse`. + type: object + required: + - role_assignment + properties: + role_assignment: + $ref: "#/components/schemas/RoleAssignment" + RemoveRoleAssignmentsResponse: + description: Response body for `DELETE /role-assignments`. + type: object + required: + - task_ids + - entries + properties: + task_ids: + type: array + items: + type: string + description: + Opaque identifiers for the push tasks enqueued to propagate the + revocation to the end system. Encoded identically to the + `PushTaskId` scalar in the GraphQL API (base64 of the underlying + protobuf). One ID per deferred revocation (today, resource/user + grants are always deferred); empty when every revocation + completed inline (resource/group, group/user, group/group). + entries: + type: array + items: + $ref: "#/components/schemas/RemoveRoleAssignmentsEntry" + description: + One entry per role assignment that was removed inline. Shorter than + the request when some assignments did not exist (idempotent), and + empty when every revocation in the batch was deferred to an async + propagation task — in that case `task_ids` carries one ID per + deferred revocation and `entries` is empty. Resource/user grants + are currently always deferred; the other `(entity, principal)` + combinations complete inline and populate `entries`. securitySchemes: BearerAuth: scheme: bearer - type: http \ No newline at end of file + type: http diff --git a/docs/AccessEntityFilters.md b/docs/AccessEntityFilters.md index 73e34e2..eab8a63 100644 --- a/docs/AccessEntityFilters.md +++ b/docs/AccessEntityFilters.md @@ -9,7 +9,11 @@ Name | Type | Description | Notes **entity_types** | **List[str]** | Filter by entity type. Only RESOURCE, GROUP, and USER are queryable via OpalQuery. | [optional] **entity_item_types** | [**List[EntityItemTypeEnum]**](EntityItemTypeEnum.md) | Filter by entity item types. | [optional] **entity_name** | [**EntityNameFilter**](EntityNameFilter.md) | | [optional] +**entity_description** | [**EntityDescriptionFilter**](EntityDescriptionFilter.md) | | [optional] **entity_tag** | [**EntityTagFilter**](EntityTagFilter.md) | | [optional] +**entity_tag_key** | [**EntityTagKeyFilter**](EntityTagKeyFilter.md) | | [optional] +**hr_idp_status** | [**IdpStatusFilter**](IdpStatusFilter.md) | | [optional] +**entity_admin_owner** | [**EntityAdminFilter**](EntityAdminFilter.md) | | [optional] **entity_ids** | **List[UUID]** | Filter by specific entity UUIDs. | [optional] **imported_from_app** | **List[UUID]** | Filter by app IDs from which returned nodes will be imported from. | [optional] **role_remote_ids** | **List[str]** | Filter by role remote IDs. Can only be applied within a hasAccessTo clause. | [optional] diff --git a/docs/AccessRule.md b/docs/AccessRule.md index ed45494..96d0d7b 100644 --- a/docs/AccessRule.md +++ b/docs/AccessRule.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **admin_owner_id** | **UUID** | The ID of the owner of the group. | **status** | **str** | The status of the access rule. | **rule_clauses** | [**RuleClauses**](RuleClauses.md) | | +**uses_opal_query** | **bool** | True when the access rule uses an Opal Query, which the API can't describe yet. Its `ruleClauses` are then empty; view the rule in Opal. | [optional] ## Example diff --git a/docs/AddRoleAssignmentInput.md b/docs/AddRoleAssignmentInput.md new file mode 100644 index 0000000..3809c69 --- /dev/null +++ b/docs/AddRoleAssignmentInput.md @@ -0,0 +1,35 @@ +# AddRoleAssignmentInput + +A single role assignment to create in a batch add request. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**entity_id** | **UUID** | The ID of the entity (resource or group) being accessed. | +**entity_type** | [**EntityTypeEnum**](EntityTypeEnum.md) | The type of the entity being accessed. Must be `RESOURCE` or `GROUP`. | +**principal_id** | **UUID** | The ID of the principal (user, group, or resource) being granted access. | +**principal_type** | [**EntityTypeEnum**](EntityTypeEnum.md) | The type of the principal being granted access. Must be `RESOURCE`, `GROUP`, or `USER`. | +**access_level_remote_id** | **str** | Remote ID of the access level to grant. Omit for entities that only have a single default access level. | [optional] +**duration_minutes** | **int** | Duration of the grant in minutes. Omit or send `0` for an indefinite grant. | [optional] + +## Example + +```python +from opal_security.models.add_role_assignment_input import AddRoleAssignmentInput + +# TODO update the JSON string below +json = "{}" +# create an instance of AddRoleAssignmentInput from a JSON string +add_role_assignment_input_instance = AddRoleAssignmentInput.from_json(json) +# print the JSON string representation of the object +print(AddRoleAssignmentInput.to_json()) + +# convert the object into a dict +add_role_assignment_input_dict = add_role_assignment_input_instance.to_dict() +# create an instance of AddRoleAssignmentInput from a dict +add_role_assignment_input_from_dict = AddRoleAssignmentInput.from_dict(add_role_assignment_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddRoleAssignmentsEntry.md b/docs/AddRoleAssignmentsEntry.md new file mode 100644 index 0000000..388ff13 --- /dev/null +++ b/docs/AddRoleAssignmentsEntry.md @@ -0,0 +1,30 @@ +# AddRoleAssignmentsEntry + +A single entry in the result of `POST /role-assignments`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_assignment** | [**RoleAssignment**](RoleAssignment.md) | | + +## Example + +```python +from opal_security.models.add_role_assignments_entry import AddRoleAssignmentsEntry + +# TODO update the JSON string below +json = "{}" +# create an instance of AddRoleAssignmentsEntry from a JSON string +add_role_assignments_entry_instance = AddRoleAssignmentsEntry.from_json(json) +# print the JSON string representation of the object +print(AddRoleAssignmentsEntry.to_json()) + +# convert the object into a dict +add_role_assignments_entry_dict = add_role_assignments_entry_instance.to_dict() +# create an instance of AddRoleAssignmentsEntry from a dict +add_role_assignments_entry_from_dict = AddRoleAssignmentsEntry.from_dict(add_role_assignments_entry_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddRoleAssignmentsRequest.md b/docs/AddRoleAssignmentsRequest.md new file mode 100644 index 0000000..0cd2373 --- /dev/null +++ b/docs/AddRoleAssignmentsRequest.md @@ -0,0 +1,30 @@ +# AddRoleAssignmentsRequest + +Request body for `POST /role-assignments`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_assignments** | [**List[AddRoleAssignmentInput]**](AddRoleAssignmentInput.md) | The list of role assignments to add. | + +## Example + +```python +from opal_security.models.add_role_assignments_request import AddRoleAssignmentsRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AddRoleAssignmentsRequest from a JSON string +add_role_assignments_request_instance = AddRoleAssignmentsRequest.from_json(json) +# print the JSON string representation of the object +print(AddRoleAssignmentsRequest.to_json()) + +# convert the object into a dict +add_role_assignments_request_dict = add_role_assignments_request_instance.to_dict() +# create an instance of AddRoleAssignmentsRequest from a dict +add_role_assignments_request_from_dict = AddRoleAssignmentsRequest.from_dict(add_role_assignments_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddRoleAssignmentsResponse.md b/docs/AddRoleAssignmentsResponse.md new file mode 100644 index 0000000..53447fb --- /dev/null +++ b/docs/AddRoleAssignmentsResponse.md @@ -0,0 +1,31 @@ +# AddRoleAssignmentsResponse + +Response body for `POST /role-assignments`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**task_ids** | **List[str]** | Opaque IDs of push tasks enqueued to propagate the new assignments to end systems. Each ID is a base64-encoded, URL-safe string that mirrors the identifier returned by the GraphQL `addRoleAssignments` mutation. | +**entries** | [**List[AddRoleAssignmentsEntry]**](AddRoleAssignmentsEntry.md) | One entry per role assignment created, in request order. | + +## Example + +```python +from opal_security.models.add_role_assignments_response import AddRoleAssignmentsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AddRoleAssignmentsResponse from a JSON string +add_role_assignments_response_instance = AddRoleAssignmentsResponse.from_json(json) +# print the JSON string representation of the object +print(AddRoleAssignmentsResponse.to_json()) + +# convert the object into a dict +add_role_assignments_response_dict = add_role_assignments_response_instance.to_dict() +# create an instance of AddRoleAssignmentsResponse from a dict +add_role_assignments_response_from_dict = AddRoleAssignmentsResponse.from_dict(add_role_assignments_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentActivityApi.md b/docs/AgentActivityApi.md new file mode 100644 index 0000000..cba3727 --- /dev/null +++ b/docs/AgentActivityApi.md @@ -0,0 +1,536 @@ +# opal_security.AgentActivityApi + +All URIs are relative to *https://api.opal.dev/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**anthropic_inference_hook**](AgentActivityApi.md#anthropic_inference_hook) | **POST** /inference-hooks/anthropic | Anthropic inference hook verdict +[**get_agent_activity_client_settings**](AgentActivityApi.md#get_agent_activity_client_settings) | **GET** /agent-activity/client-settings | Get agent activity client settings +[**get_agent_kill_switch**](AgentActivityApi.md#get_agent_kill_switch) | **GET** /agent-kill-switch | Get the agent kill switch +[**report_agent_activity**](AgentActivityApi.md#report_agent_activity) | **POST** /agent-activity | Report agent activity +[**report_mcp_config**](AgentActivityApi.md#report_mcp_config) | **POST** /agent-activity/mcp-config | Report MCP server configuration +[**set_agent_kill_switch**](AgentActivityApi.md#set_agent_kill_switch) | **PUT** /agent-kill-switch | Set the agent kill switch + + +# **anthropic_inference_hook** +> AnthropicInferenceHookVerdict anthropic_inference_hook(request_body) + +Anthropic inference hook verdict + +**Prototype (AG-336).** The AI security server endpoint for Anthropic Inference hooks. Anthropic POSTs each governed frame here and waits for an allow or deny verdict. Configure it in claude.ai with this URL and a custom `Authorization: Bearer ` request header. + +`tool_call` frames are evaluated against the organization's runtime policy rules. One verdict covers every tool call in the frame. Every other frame type, including `prompt`, is allowed without inspection. Any non-200 response is a webhook failure, so the organization's Anthropic failure-handling setting decides the outcome. + +Once the organization saves its Anthropic signing secret in Opal, a `tool_call` frame must carry a valid Standard Webhooks signature (`webhook-id`, `webhook-timestamp`, `webhook-signature`), or it is answered with a 401. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.anthropic_inference_hook_verdict import AnthropicInferenceHookVerdict +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.AgentActivityApi(api_client) + request_body = None # Dict[str, object] | + + try: + # Anthropic inference hook verdict + api_response = api_instance.anthropic_inference_hook(request_body) + print("The response of AgentActivityApi->anthropic_inference_hook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentActivityApi->anthropic_inference_hook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_body** | [**Dict[str, object]**](object.md)| | + +### Return type + +[**AnthropicInferenceHookVerdict**](AnthropicInferenceHookVerdict.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The verdict for the frame. | - | +**401** | The frame is unsigned or its signature does not verify. Anthropic applies the organization's failure handling. | - | +**500** | The frame could not be evaluated. Anthropic applies the organization's failure handling. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_agent_activity_client_settings** +> AgentActivityClientSettings get_agent_activity_client_settings() + +Get agent activity client settings + +**Prototype.** Returns how a client that reports agent activity (today, the Claude Code hook kit on a developer's machine) should send batched events for this organization: the minimum gap between two sends from one machine, the most events and bytes one request to `/agent-activity` may carry, the request rate to stay under, and how long the answer may be cached. + +The rate is derived from the organization's own rate limit for `POST /agent-activity`, which every client in the organization shares: the clients that asked for these settings in the last cache period or two share half of it evenly, and the checks before tool calls keep the other half. A check before a tool call is not batched and should not be held back by this rate. A client is counted by its `X-Opal-Host` and `X-Opal-Actor` headers, so it should send the same ones it sends to `/agent-activity`. + +A client should ask for these at most once per `cache_seconds`, and keep using its last answer, or its own defaults, when it cannot get one. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.agent_activity_client_settings import AgentActivityClientSettings +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.AgentActivityApi(api_client) + + try: + # Get agent activity client settings + api_response = api_instance.get_agent_activity_client_settings() + print("The response of AgentActivityApi->get_agent_activity_client_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentActivityApi->get_agent_activity_client_settings: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**AgentActivityClientSettings**](AgentActivityClientSettings.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The settings for this organization. | - | +**403** | Agent activity ingest is not enabled for this organization. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_agent_kill_switch** +> AgentKillSwitch get_agent_kill_switch() + +Get the agent kill switch + +**Prototype (AG-297).** Returns whether agent tool calls are currently being denied for this organization, and the activation that is in force or that last was. + +`active` is evaluated against the clock on every read, so an activation past its `expires_at` reads as inactive without anything having swept it. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.agent_kill_switch import AgentKillSwitch +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.AgentActivityApi(api_client) + + try: + # Get the agent kill switch + api_response = api_instance.get_agent_kill_switch() + print("The response of AgentActivityApi->get_agent_kill_switch:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentActivityApi->get_agent_kill_switch: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**AgentKillSwitch**](AgentKillSwitch.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The current state of the kill switch. | - | +**403** | The caller is not an admin, or the agent kill switch is not enabled for this organization. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **report_agent_activity** +> AgentActivityIngestResult report_agent_activity(agent_activity_ingest_request, x_opal_actor=x_opal_actor, x_opal_host=x_opal_host, x_opal_content=x_opal_content) + +Report agent activity + +**Prototype (AG-285).** Reports activity observed by an agent runtime on a developer's machine - today, Claude Code hook events. + +This is **telemetry from cooperating machines, not attestation**. Opal can only see what a configured, consenting client chooses to send, cannot verify that a fleet is configured at all, and has no way to detect a machine that is reporting nothing. Absence of activity for an agent therefore means "nothing was reported", never "the agent did nothing". + +The request body is either a batch envelope (`{"events": [...]}`), a bare JSON array of events, or a single raw Claude Code hook payload - the last so a hook can POST here directly with no relay in between. + +The bearer token establishes the **organization** and nothing finer. No field in the payload is treated as an identity claim Opal trusts: the actor headers below are used for best-effort attribution and display only. Events that cannot be attributed to an agent are retained and surfaced as unattributed activity rather than dropped. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.agent_activity_ingest_request import AgentActivityIngestRequest +from opal_security.models.agent_activity_ingest_result import AgentActivityIngestResult +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.AgentActivityApi(api_client) + agent_activity_ingest_request = opal_security.AgentActivityIngestRequest() # AgentActivityIngestRequest | + x_opal_actor = 'x_opal_actor_example' # str | The identity the reporting client claims this activity belongs to - an email or an Anthropic user id. **Unverified**: a Claude Code hook payload contains no user identity, so this has to be injected by whoever deploys the hook (via the http handler's `headers` map and `allowedEnvVars` interpolation), and whoever controls the machine controls the header. Used only when the API key itself does not identify a developer. When the email belongs to a person in the organization, that person is recorded as who the activity was reported for (always as a claim), and the activity is attributed to the one Claude agent they own, if they own exactly one. The API key's own email is never treated this way: a key belongs to whoever created it, which with a shared key is not who is at the keyboard. Omitting it is valid. When an event's `opal_reported` object carries other emails, Opal also tries them, in the order `configured_email`, `claude_account_email`, `git_email`, after this header and skipping any that repeat it. The first one that resolves to an agent wins. (optional) + x_opal_host = 'x_opal_host_example' # str | The name of the machine that sent this request, as that machine reports it (`hostname -s`). **Unverified**: two machines can share a name, and whoever controls the machine controls the header. Stored with each event, so a reader can tell which machine reported it. When an event's own `opal_reported.hostname` names a different machine, this header wins and the body's value is kept beside it. Omitting it is valid. (optional) + x_opal_content = 'x_opal_content_example' # str | `1` when the sender collects conversation content: the prompt of a `UserPromptSubmit` event, the `tool_response` of a `PostToolUse` event and the `last_assistant_message` of a `Stop` or `SubagentStop` event. Without it (or an event's own `opal_content`) those fields are read and discarded, as before. An `http` hook sets it in its `headers` map, because it cannot change the payload. Opal stores the content only when the organization stores content as well. (optional) + + try: + # Report agent activity + api_response = api_instance.report_agent_activity(agent_activity_ingest_request, x_opal_actor=x_opal_actor, x_opal_host=x_opal_host, x_opal_content=x_opal_content) + print("The response of AgentActivityApi->report_agent_activity:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentActivityApi->report_agent_activity: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **agent_activity_ingest_request** | [**AgentActivityIngestRequest**](AgentActivityIngestRequest.md)| | + **x_opal_actor** | **str**| The identity the reporting client claims this activity belongs to - an email or an Anthropic user id. **Unverified**: a Claude Code hook payload contains no user identity, so this has to be injected by whoever deploys the hook (via the http handler's `headers` map and `allowedEnvVars` interpolation), and whoever controls the machine controls the header. Used only when the API key itself does not identify a developer. When the email belongs to a person in the organization, that person is recorded as who the activity was reported for (always as a claim), and the activity is attributed to the one Claude agent they own, if they own exactly one. The API key's own email is never treated this way: a key belongs to whoever created it, which with a shared key is not who is at the keyboard. Omitting it is valid. When an event's `opal_reported` object carries other emails, Opal also tries them, in the order `configured_email`, `claude_account_email`, `git_email`, after this header and skipping any that repeat it. The first one that resolves to an agent wins. | [optional] + **x_opal_host** | **str**| The name of the machine that sent this request, as that machine reports it (`hostname -s`). **Unverified**: two machines can share a name, and whoever controls the machine controls the header. Stored with each event, so a reader can tell which machine reported it. When an event's own `opal_reported.hostname` names a different machine, this header wins and the body's value is kept beside it. Omitting it is valid. | [optional] + **x_opal_content** | **str**| `1` when the sender collects conversation content: the prompt of a `UserPromptSubmit` event, the `tool_response` of a `PostToolUse` event and the `last_assistant_message` of a `Stop` or `SubagentStop` event. Without it (or an event's own `opal_content`) those fields are read and discarded, as before. An `http` hook sets it in its `headers` map, because it cannot change the payload. Opal stores the content only when the organization stores content as well. | [optional] + +### Return type + +[**AgentActivityIngestResult**](AgentActivityIngestResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A per-batch accounting of what was accepted, stored, and attributed. An organization that has agent activity turned off gets a 200 with an empty body for every body shape, so a sender does not keep the events and try again. | - | +**400** | The body was unparseable, empty, or carried more events than one request may. | - | +**413** | The request body exceeded the maximum accepted size. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **report_mcp_config** +> McpConfigReportResult report_mcp_config(mcp_config_report, x_opal_actor=x_opal_actor, x_opal_host=x_opal_host) + +Report MCP server configuration + +**Prototype.** Reports the MCP servers configured in Claude Code on one developer's machine, as the Opal hook kit read them: user-level and per-project servers in `~/.claude.json`, a project's `.mcp.json`, `managed-mcp.json`, and servers a plugin provides when they can be found. + +For each server the kit sends its name, the scope it was configured in, its transport, and either its URL (`http`, `sse`) or a hash of its command's shape (`stdio`). It never sends environment values, headers or command arguments, which can hold secrets. Opal adds each server to the organization's MCP server registry and records that this person has it configured. Nothing on the machine is changed. + +Like `/agent-activity`, this is **telemetry from cooperating machines**: the identity and the list are what the machine says. The bearer token establishes the organization and nothing finer. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.mcp_config_report import McpConfigReport +from opal_security.models.mcp_config_report_result import McpConfigReportResult +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.AgentActivityApi(api_client) + mcp_config_report = opal_security.McpConfigReport() # McpConfigReport | + x_opal_actor = 'x_opal_actor_example' # str | The identity the reporting client claims - an email, or an operating-system user name. **Unverified**, used the same way as on `/agent-activity`. (optional) + x_opal_host = 'x_opal_host_example' # str | The name of the machine that sent the report, as that machine reports it (`hostname -s`). **Unverified.** A server this machine listed before and this report leaves out is marked removed for the reporting person, unless another of their machines still lists it. Omitting it is valid: the reports without one count as one machine. (optional) + + try: + # Report MCP server configuration + api_response = api_instance.report_mcp_config(mcp_config_report, x_opal_actor=x_opal_actor, x_opal_host=x_opal_host) + print("The response of AgentActivityApi->report_mcp_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentActivityApi->report_mcp_config: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mcp_config_report** | [**McpConfigReport**](McpConfigReport.md)| | + **x_opal_actor** | **str**| The identity the reporting client claims - an email, or an operating-system user name. **Unverified**, used the same way as on `/agent-activity`. | [optional] + **x_opal_host** | **str**| The name of the machine that sent the report, as that machine reports it (`hostname -s`). **Unverified.** A server this machine listed before and this report leaves out is marked removed for the reporting person, unless another of their machines still lists it. Omitting it is valid: the reports without one count as one machine. | [optional] + +### Return type + +[**McpConfigReportResult**](McpConfigReportResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | How many servers were read and recorded. | - | +**400** | The body was unparseable, or carried more servers than one report may. | - | +**403** | The MCP server registry is not enabled for this organization. | - | +**413** | The request body exceeded the maximum accepted size. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_agent_kill_switch** +> AgentKillSwitch set_agent_kill_switch(set_agent_kill_switch_request) + +Set the agent kill switch + +**Prototype (AG-297).** Turns the org-level agent kill switch on or off. Admin only. + +While it is on, Opal answers every `PreToolUse` hook POST to `/agent-activity` with a `deny` decision, so a cooperating Claude Code client stops running tools. + +**It is not a security boundary, and it fails open.** It reaches only clients that are configured to POST to `/agent-activity` and that honour the answer; a client on a non-default base URL, an older build, or with no hook deployed is unaffected. If Opal is unreachable or slow the tool call proceeds, because Claude Code treats a failed `PreToolUse` hook as a non-blocking error by design. + +Activation is always time-bound: `duration_minutes` is capped, and an activation that reaches `expires_at` stops denying on its own. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.agent_kill_switch import AgentKillSwitch +from opal_security.models.set_agent_kill_switch_request import SetAgentKillSwitchRequest +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.AgentActivityApi(api_client) + set_agent_kill_switch_request = opal_security.SetAgentKillSwitchRequest() # SetAgentKillSwitchRequest | + + try: + # Set the agent kill switch + api_response = api_instance.set_agent_kill_switch(set_agent_kill_switch_request) + print("The response of AgentActivityApi->set_agent_kill_switch:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentActivityApi->set_agent_kill_switch: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set_agent_kill_switch_request** | [**SetAgentKillSwitchRequest**](SetAgentKillSwitchRequest.md)| | + +### Return type + +[**AgentKillSwitch**](AgentKillSwitch.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The state of the kill switch after the change. | - | +**400** | The body was unparseable, or `duration_minutes` was out of range. | - | +**403** | The caller is not an admin, or the agent kill switch is not enabled for this organization. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AgentActivityClientSetting.md b/docs/AgentActivityClientSetting.md new file mode 100644 index 0000000..e0e030b --- /dev/null +++ b/docs/AgentActivityClientSetting.md @@ -0,0 +1,31 @@ +# AgentActivityClientSetting + +# AgentActivityClientSetting Object ### Description What the organization chose for one client that runs the hook. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reports_tool_calls** | **bool** | Whether the client reports tool calls. When false its hook sends nothing and lets every tool call run, and Opal stores nothing the client still sends. | +**conversation_content** | **str** | Who decides whether the client's conversation content (prompts, what each tool returned, the model's replies) is sent and stored. `always` sends it from every machine; `never` sends none, even from a machine installed with --content, and Opal stores none; `person_decides` leaves it to whether the machine was installed with --content. Absent for a client whose hook sends no conversation content (codex). | [optional] + +## Example + +```python +from opal_security.models.agent_activity_client_setting import AgentActivityClientSetting + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentActivityClientSetting from a JSON string +agent_activity_client_setting_instance = AgentActivityClientSetting.from_json(json) +# print the JSON string representation of the object +print(AgentActivityClientSetting.to_json()) + +# convert the object into a dict +agent_activity_client_setting_dict = agent_activity_client_setting_instance.to_dict() +# create an instance of AgentActivityClientSetting from a dict +agent_activity_client_setting_from_dict = AgentActivityClientSetting.from_dict(agent_activity_client_setting_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentActivityClientSettings.md b/docs/AgentActivityClientSettings.md new file mode 100644 index 0000000..f94cd9f --- /dev/null +++ b/docs/AgentActivityClientSettings.md @@ -0,0 +1,36 @@ +# AgentActivityClientSettings + +# AgentActivityClientSettings Object ### Description How a client should send batched agent activity for this organization. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**batch_wait_seconds** | **float** | The minimum gap between two sends from one machine. Send at once when the last send was at least this long ago; otherwise wait until this long after the last send, and send what arrived meanwhile as one request. Between 0 and 300. | +**max_events_per_request** | **int** | The most events one request to `/agent-activity` may carry. | +**max_bytes_per_request** | **int** | The largest body, in bytes, `/agent-activity` accepts for a request with more than one event. A request with one event may be up to 1 MiB. | +**max_requests_per_second** | **float** | The rate of batched requests one client should stay under. Can be below 1. | +**burst_requests** | **int** | How many batched requests a client may send at once before the rate applies. At least 1. | +**cache_seconds** | **int** | How long these settings may be kept before asking again. | +**clients** | [**Dict[str, AgentActivityClientSetting]**](AgentActivityClientSetting.md) | What the organization chose on the Setup tab for each client that runs the hook, keyed by client (claude_code, codex, cursor). A client that is not listed keeps the defaults. | + +## Example + +```python +from opal_security.models.agent_activity_client_settings import AgentActivityClientSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentActivityClientSettings from a JSON string +agent_activity_client_settings_instance = AgentActivityClientSettings.from_json(json) +# print the JSON string representation of the object +print(AgentActivityClientSettings.to_json()) + +# convert the object into a dict +agent_activity_client_settings_dict = agent_activity_client_settings_instance.to_dict() +# create an instance of AgentActivityClientSettings from a dict +agent_activity_client_settings_from_dict = AgentActivityClientSettings.from_dict(agent_activity_client_settings_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentActivityContentReport.md b/docs/AgentActivityContentReport.md new file mode 100644 index 0000000..622d021 --- /dev/null +++ b/docs/AgentActivityContentReport.md @@ -0,0 +1,33 @@ +# AgentActivityContentReport + +# AgentActivityContentReport Object ### Description What Opal's hook kit adds to an event when it collects conversation content. Its presence means the sender collects content, like the `X-Opal-Content` header. The kit has already masked secrets in the texts and cut them to its own limit. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assistant_text** | **str** | Every text the model wrote in the turn, read from the session's transcript (`Stop`, `SubagentStop`). Preferred over `last_assistant_message`, which holds only the final message. | [optional] +**thinking** | **str** | The model's thinking in the turn, when the transcript holds it as plain text. | [optional] +**images** | [**AgentActivityImages**](AgentActivityImages.md) | | [optional] +**truncated** | **Dict[str, int]** | The fields the kit cut (`prompt`, `tool_response`, `assistant_text`, `last_assistant_message`, `thinking`), each with its size in bytes before the cut. A prompt or a tool result keeps its start; a turn's text and thinking keep their end. Sizes are stored up to 2147483647. | [optional] + +## Example + +```python +from opal_security.models.agent_activity_content_report import AgentActivityContentReport + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentActivityContentReport from a JSON string +agent_activity_content_report_instance = AgentActivityContentReport.from_json(json) +# print the JSON string representation of the object +print(AgentActivityContentReport.to_json()) + +# convert the object into a dict +agent_activity_content_report_dict = agent_activity_content_report_instance.to_dict() +# create an instance of AgentActivityContentReport from a dict +agent_activity_content_report_from_dict = AgentActivityContentReport.from_dict(agent_activity_content_report_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentActivityEvent.md b/docs/AgentActivityEvent.md new file mode 100644 index 0000000..02e88d8 --- /dev/null +++ b/docs/AgentActivityEvent.md @@ -0,0 +1,54 @@ +# AgentActivityEvent + +# AgentActivityEvent Object ### Description One activity event reported by an agent runtime: a Claude Code or Codex hook payload, or a Cursor hook payload the Opal kit rewrote into the same shape, posted either by the hook itself or by a relay that batches them. Only the fields below are read; everything else in the payload is parsed and **discarded**, never persisted. That includes `transcript_path` / `scratchpad_dir` (absolute paths on an employee's own laptop, which Opal cannot govern and should not be accumulating). `prompt`, `tool_response` and `last_assistant_message` (the conversation content) are stored only when the sender collects them (`opal_content` on the event, or the `X-Opal-Content` header) and the organization stores content. Secrets in the shapes Opal recognizes are masked and each text is cut to the organization's limit before it is written. Otherwise they are discarded too. `tool_input` IS now read and stored. It was previously discarded pending a data-handling decision; that decision has since been made, and without arguments no policy can name what a call acted on - a rule about a file path, a command family or a web domain refers to something that exists only inside `tool_input`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hook_event_name** | **str** | Which hook fired, e.g. `PostToolUse`, `PreToolUse`, `PermissionDenied`. Required; an event with no name cannot be interpreted and is rejected. | +**tool_input** | **Dict[str, object]** | The call's arguments, as the runtime sent them. Server-defined for an MCP tool; a fixed shape per built-in (`command` for Bash, `file_path` for Edit, `url` for WebFetch). Stored as sent, and separately reduced to a normalized target the activity feed and policy can match on. The stored copy is the record of fact; the derived target is recomputed whenever the extractor improves. Capped before storage. A capped payload is no longer valid JSON, so the row records that it was capped rather than leaving each reader to discover it by failing to parse. A value that is not an object (Codex sends a string when a model's function arguments are not valid JSON) is stored as `{\"raw\": <value>}` rather than rejected. | [optional] +**session_id** | **str** | The agent session this event belongs to. Opaque to Opal. | [optional] +**prompt_id** | **str** | Groups every tool call made under one user instruction, so a run can be read back as the instruction that caused it rather than as unrelated rows. | [optional] +**turn_id** | **str** | Codex's id for one user turn. Codex sends no `prompt_id`, so for a Codex event this is stored as the prompt id. Together with `model`, and with no `prompt_id`, it also marks an event as coming from Codex when `opal_reported.client` is absent. | [optional] +**model** | **str** | The model the runtime was using, as Codex reports it. Read only to tell Codex from Claude Code; not stored. | [optional] +**cursor_version** | **str** | The Cursor version, which Cursor adds to every hook input. Read only to mark an event as coming from Cursor when `opal_reported.client` is absent; not stored. A Cursor tool-call event named `preToolUse`, `postToolUse` or `postToolUseFailure` is stored under the Claude Code name for the same event. | [optional] +**agent_id** | **str** | Set only when the call came from an autonomous subagent rather than the session a person is typing into. Stored as `subagent_id` - Opal's own `agent_id` already means something else. | [optional] +**agent_type** | **str** | The subagent's type, e.g. `general-purpose`. Set alongside `agent_id`. | [optional] +**permission_mode** | **str** | The session's permission mode, e.g. `default`, `acceptEdits`, `bypassPermissions`. A session running `bypassPermissions` had no approval gate in front of any tool call it made. | [optional] +**actor_email** | **str** | The identity the sender reports for this specific event. **Unverified**, the same as `X-Opal-Actor`, and used only when neither the API key nor that header identified a developer. An `http` hook cannot populate this; a `command`-type hook or a relay can (`$USER`, a hostname, `git config user.email`), which is why it is per-event rather than per-request - a relay can batch several developers. | [optional] +**opal_reported** | [**AgentActivityOpalReported**](AgentActivityOpalReported.md) | | [optional] +**duration_ms** | **object** | | [optional] +**transcript_path** | **str** | Read at ingest **only** to parse an operating-system username out of, as the last-resort attribution step, and then discarded. The path itself is never stored: it is an absolute path on an employee's laptop and Opal has no business accumulating those. | [optional] +**tool_name** | **str** | The tool invoked, for tool-scoped events. Empty for session-level events. An MCP tool is named `mcp__<server>__<tool>`. The whole string is stored as sent, and the server and the tool are also stored in their own fields (see `mcp_server`). | [optional] +**mcp_server** | [**AgentActivityMcpServer**](AgentActivityMcpServer.md) | | [optional] +**opal_mcp_server** | [**AgentActivityOpalMcpServer**](AgentActivityOpalMcpServer.md) | | [optional] +**tool_use_id** | **str** | The tool invocation's id, used together with `hook_event_name` to deduplicate a retried delivery. Absent on events that carry none, which are stored at-least-once unless they are a prompt or the end of a turn with `session_id` and `prompt_id`, or carry `opal_event_id`. | [optional] +**opal_event_id** | **str** | An id Opal's hook kit gives each event it holds for sending, so that a retried delivery of an event without a `tool_use_id` (a prompt, the end of a turn) is stored once. Used only for an event that has no `tool_use_id` and is not a tool-call event, and only when it is 8 to 64 letters, digits and dashes; otherwise ignored. | [optional] +**cwd** | **str** | The working directory the agent was operating in. | [optional] +**timestamp** | **datetime** | When the client says the event occurred (RFC 3339). Clamped server-side to a window around receipt, because a client-controlled sort key is otherwise a way to pin rows to the top of every list. Defaults to receipt time when absent or unparseable. | [optional] +**prompt** | **object** | | [optional] +**tool_response** | **object** | | [optional] +**last_assistant_message** | **object** | | [optional] +**opal_content** | [**AgentActivityContentReport**](AgentActivityContentReport.md) | | [optional] + +## Example + +```python +from opal_security.models.agent_activity_event import AgentActivityEvent + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentActivityEvent from a JSON string +agent_activity_event_instance = AgentActivityEvent.from_json(json) +# print the JSON string representation of the object +print(AgentActivityEvent.to_json()) + +# convert the object into a dict +agent_activity_event_dict = agent_activity_event_instance.to_dict() +# create an instance of AgentActivityEvent from a dict +agent_activity_event_from_dict = AgentActivityEvent.from_dict(agent_activity_event_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentActivityImages.md b/docs/AgentActivityImages.md new file mode 100644 index 0000000..ffc3ebe --- /dev/null +++ b/docs/AgentActivityImages.md @@ -0,0 +1,31 @@ +# AgentActivityImages + +# AgentActivityImages Object ### Description The images attached to a prompt or returned by a tool. Only their number and size are sent; the images themselves are not. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | [optional] +**bytes** | **int** | | [optional] + +## Example + +```python +from opal_security.models.agent_activity_images import AgentActivityImages + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentActivityImages from a JSON string +agent_activity_images_instance = AgentActivityImages.from_json(json) +# print the JSON string representation of the object +print(AgentActivityImages.to_json()) + +# convert the object into a dict +agent_activity_images_dict = agent_activity_images_instance.to_dict() +# create an instance of AgentActivityImages from a dict +agent_activity_images_from_dict = AgentActivityImages.from_dict(agent_activity_images_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentActivityIngestRequest.md b/docs/AgentActivityIngestRequest.md new file mode 100644 index 0000000..fc42784 --- /dev/null +++ b/docs/AgentActivityIngestRequest.md @@ -0,0 +1,30 @@ +# AgentActivityIngestRequest + +# AgentActivityIngestRequest Object ### Description A batch of agent activity events. Three body shapes are accepted: this envelope (`{\"events\": [...]}`), a bare JSON array of `AgentActivityEvent`, and a single `AgentActivityEvent` object. The last exists so a Claude Code hook can POST here directly, since a hook sends one bare payload per event and cannot wrap it. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**List[AgentActivityEvent]**](AgentActivityEvent.md) | | [optional] + +## Example + +```python +from opal_security.models.agent_activity_ingest_request import AgentActivityIngestRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentActivityIngestRequest from a JSON string +agent_activity_ingest_request_instance = AgentActivityIngestRequest.from_json(json) +# print the JSON string representation of the object +print(AgentActivityIngestRequest.to_json()) + +# convert the object into a dict +agent_activity_ingest_request_dict = agent_activity_ingest_request_instance.to_dict() +# create an instance of AgentActivityIngestRequest from a dict +agent_activity_ingest_request_from_dict = AgentActivityIngestRequest.from_dict(agent_activity_ingest_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentActivityIngestResult.md b/docs/AgentActivityIngestResult.md new file mode 100644 index 0000000..75ec016 --- /dev/null +++ b/docs/AgentActivityIngestResult.md @@ -0,0 +1,33 @@ +# AgentActivityIngestResult + +# AgentActivityIngestResult Object ### Description What one ingest request actually did. `received` and `stored` differ when a delivery was retried and deduplicated. `attributed` and `unattributed` sum to `received` rather than to `stored`, because attribution happens before deduplication. Unattributed events are kept, not dropped: activity Opal cannot tie to a governed agent is itself a governance finding. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**received** | **int** | Events parsed out of the request body. | +**stored** | **int** | Rows actually written. Lower than `received` when a retried delivery was deduplicated on `tool_use_id`. | +**attributed** | **int** | Events that resolved to an agent in this organization. | +**unattributed** | **int** | Events that resolved to no agent, and are therefore visible only in the unattributed activity list. A persistently high value means the reporting clients are not sending an identity Opal can resolve. | + +## Example + +```python +from opal_security.models.agent_activity_ingest_result import AgentActivityIngestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentActivityIngestResult from a JSON string +agent_activity_ingest_result_instance = AgentActivityIngestResult.from_json(json) +# print the JSON string representation of the object +print(AgentActivityIngestResult.to_json()) + +# convert the object into a dict +agent_activity_ingest_result_dict = agent_activity_ingest_result_instance.to_dict() +# create an instance of AgentActivityIngestResult from a dict +agent_activity_ingest_result_from_dict = AgentActivityIngestResult.from_dict(agent_activity_ingest_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentActivityMcpServer.md b/docs/AgentActivityMcpServer.md new file mode 100644 index 0000000..67542d2 --- /dev/null +++ b/docs/AgentActivityMcpServer.md @@ -0,0 +1,31 @@ +# AgentActivityMcpServer + +# AgentActivityMcpServer Object ### Description The MCP server behind a tool call, as Claude Code reports it. Claude Code v2.1.274 and later adds this object to the hook input of an MCP tool call; an older client does not send it, and it is never present for a built-in tool such as `Bash`. When `name` is present it is stored as the call's server. When this object is absent, the server is read from `tool_name` instead: the part after the `mcp__` prefix and before the next `__`. The tool is always read from `tool_name`. `name` is stored as the call's server. `source` says where the server's definition came from (`plugin`, `sdk`, or a configuration scope such as `user` or `project`) and is stored as sent, cut to 64 characters. Neither field is an identity: `name` is whatever the user called the server in their own configuration, and `source` is what the machine said. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The server's name. | [optional] +**source** | **str** | Where the server's definition came from, such as `plugin`, `sdk`, `user` or `project`. Stored as sent, cut to 64 characters. | [optional] + +## Example + +```python +from opal_security.models.agent_activity_mcp_server import AgentActivityMcpServer + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentActivityMcpServer from a JSON string +agent_activity_mcp_server_instance = AgentActivityMcpServer.from_json(json) +# print the JSON string representation of the object +print(AgentActivityMcpServer.to_json()) + +# convert the object into a dict +agent_activity_mcp_server_dict = agent_activity_mcp_server_instance.to_dict() +# create an instance of AgentActivityMcpServer from a dict +agent_activity_mcp_server_from_dict = AgentActivityMcpServer.from_dict(agent_activity_mcp_server_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentActivityOpalMcpServer.md b/docs/AgentActivityOpalMcpServer.md new file mode 100644 index 0000000..055a6b1 --- /dev/null +++ b/docs/AgentActivityOpalMcpServer.md @@ -0,0 +1,33 @@ +# AgentActivityOpalMcpServer + +# AgentActivityOpalMcpServer Object ### Description Where the MCP server behind a tool call connects, as the Opal hook kit read it from the developer's own Claude Code configuration. Claude Code's hook payload names the server but not where it connects, so the kit adds this for an `mcp____` call when it finds the server in the configuration. Opal uses it to identify the server in the organization's MCP server registry: by its URL, or by the hash of its command. The URL is stored without its query, fragment or user name and password. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | The server's URL, for an `http` or `sse` server. | [optional] +**transport** | **str** | `http`, `sse` or `stdio`. | [optional] +**command_hash** | **str** | For a `stdio` server, a SHA-256 of its command's shape, in hex. Arguments that can hold a secret are replaced before hashing, and the command itself is never sent. | [optional] +**scope** | **str** | The configuration the server was found in, such as `user`, `project`, `local`, `managed` or `plugin`. | [optional] + +## Example + +```python +from opal_security.models.agent_activity_opal_mcp_server import AgentActivityOpalMcpServer + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentActivityOpalMcpServer from a JSON string +agent_activity_opal_mcp_server_instance = AgentActivityOpalMcpServer.from_json(json) +# print the JSON string representation of the object +print(AgentActivityOpalMcpServer.to_json()) + +# convert the object into a dict +agent_activity_opal_mcp_server_dict = agent_activity_opal_mcp_server_instance.to_dict() +# create an instance of AgentActivityOpalMcpServer from a dict +agent_activity_opal_mcp_server_from_dict = AgentActivityOpalMcpServer.from_dict(agent_activity_opal_mcp_server_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentActivityOpalReported.md b/docs/AgentActivityOpalReported.md new file mode 100644 index 0000000..1c9b6af --- /dev/null +++ b/docs/AgentActivityOpalReported.md @@ -0,0 +1,39 @@ +# AgentActivityOpalReported + +# AgentActivityOpalReported Object ### Description What the sending machine says about who and what it is, added by the Opal hook script. Every field is optional and **unverified**: whoever controls the machine controls them. They can disagree, and Opal keeps every one that is present, each cut to a fixed length (254 characters for an email, 64 for `os_user`, 255 for `hostname`) with control characters removed. The emails are also tried, in the order below and after the `X-Opal-Actor` header, to find the agent, so a person without a git email can still match through their Claude account. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**configured_email** | **str** | An email set by an administrator, an MDM profile or the installer. | [optional] +**claude_account_email** | **str** | The email of the account Claude Code is signed in with. | [optional] +**codex_account_email** | **str** | The email of the ChatGPT account Codex is signed in with. | [optional] +**codex_auth_mode** | **str** | How Codex is signed in, from `auth_mode` in its `auth.json`: `chatgpt` for a ChatGPT sign-in, `apikey` for an API key. In an organization that has turned on person agents, a Codex call from a person who owns no OpenAI agent creates \"<Name>'s ChatGPT\" for a ChatGPT sign-in and \"<Name>'s OpenAI\" for an API key. Without it, no agent is created. | [optional] +**chatgpt_account_email** | **str** | The email of the ChatGPT account the sending runtime is signed in with. | [optional] +**cursor_account_email** | **str** | The email of the account Cursor is signed in with, from the `user_email` of Cursor's hook input. Tried before the other emails here. | [optional] +**client** | **str** | Which agent runtime sent the event: `claude_code`, `codex`, `cursor`, `openai_agents_python`, `openai_agents_js`, `chatgpt` or `chatgpt_workspace_agent`. Any other value is stored as `unknown`. When absent, an event carrying `cursor_version` is Cursor, one carrying `turn_id` and `model` and no `prompt_id` is Codex, and anything else is Claude Code. | [optional] +**git_email** | **str** | The machine's global `git config user.email`. | [optional] +**os_user** | **str** | The operating-system username. Not used to find an agent. | [optional] +**hostname** | **str** | The machine's name. The `X-Opal-Host` header wins when it names a different machine. | [optional] + +## Example + +```python +from opal_security.models.agent_activity_opal_reported import AgentActivityOpalReported + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentActivityOpalReported from a JSON string +agent_activity_opal_reported_instance = AgentActivityOpalReported.from_json(json) +# print the JSON string representation of the object +print(AgentActivityOpalReported.to_json()) + +# convert the object into a dict +agent_activity_opal_reported_dict = agent_activity_opal_reported_instance.to_dict() +# create an instance of AgentActivityOpalReported from a dict +agent_activity_opal_reported_from_dict = AgentActivityOpalReported.from_dict(agent_activity_opal_reported_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentKillSwitch.md b/docs/AgentKillSwitch.md new file mode 100644 index 0000000..cad496d --- /dev/null +++ b/docs/AgentKillSwitch.md @@ -0,0 +1,35 @@ +# AgentKillSwitch + +# AgentKillSwitch Object ### Description The org-level agent kill switch, and the activation that is in force or last was. `active` is what matters; the rest is the record of how it got that way. An activation is in force only while it has not been deactivated AND `expires_at` is still in the future, and that is evaluated on every read - so `active` can be `false` on a row that was never explicitly turned off. Everything below `active` describes the LATEST activation whether or not it is still in force, so an admin reading an inactive switch can still see who last turned it on and when it ended. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | Whether agent tool calls are being denied right now. This is the field to read; it already accounts for expiry. | +**activated_at** | **datetime** | When the latest activation was turned on. Absent if it never has been. | [optional] +**activated_by_user_id** | **UUID** | The admin who turned it on. Absent when that user has since been hard-deleted - the activation record outlives them deliberately. | [optional] +**expires_at** | **datetime** | When the latest activation stops denying on its own. In the past for an activation that already ran out. | [optional] +**deactivated_at** | **datetime** | When the latest activation was turned off before its expiry, either by an admin or by being superseded. Absent when it ended at `expires_at`, or has not ended. | [optional] +**reason** | **str** | The admin's stated reason. Not an internal note - it is shown to the developer whose tool call is denied, in their own terminal. | [optional] + +## Example + +```python +from opal_security.models.agent_kill_switch import AgentKillSwitch + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentKillSwitch from a JSON string +agent_kill_switch_instance = AgentKillSwitch.from_json(json) +# print the JSON string representation of the object +print(AgentKillSwitch.to_json()) + +# convert the object into a dict +agent_kill_switch_dict = agent_kill_switch_instance.to_dict() +# create an instance of AgentKillSwitch from a dict +agent_kill_switch_from_dict = AgentKillSwitch.from_dict(agent_kill_switch_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnthropicInferenceHookVerdict.md b/docs/AnthropicInferenceHookVerdict.md new file mode 100644 index 0000000..b4f3c84 --- /dev/null +++ b/docs/AnthropicInferenceHookVerdict.md @@ -0,0 +1,32 @@ +# AnthropicInferenceHookVerdict + +# AnthropicInferenceHookVerdict Object ### Description An Anthropic Inference hooks verdict. `deny_reason` is shown to the end user on a deny. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **str** | | +**deny_reason** | **str** | | [optional] +**reference_id** | **str** | | [optional] + +## Example + +```python +from opal_security.models.anthropic_inference_hook_verdict import AnthropicInferenceHookVerdict + +# TODO update the JSON string below +json = "{}" +# create an instance of AnthropicInferenceHookVerdict from a JSON string +anthropic_inference_hook_verdict_instance = AnthropicInferenceHookVerdict.from_json(json) +# print the JSON string representation of the object +print(AnthropicInferenceHookVerdict.to_json()) + +# convert the object into a dict +anthropic_inference_hook_verdict_dict = anthropic_inference_hook_verdict_instance.to_dict() +# create an instance of AnthropicInferenceHookVerdict from a dict +anthropic_inference_hook_verdict_from_dict = AnthropicInferenceHookVerdict.from_dict(anthropic_inference_hook_verdict_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiAccessLevelEnum.md b/docs/ApiAccessLevelEnum.md index 4b74de5..5ec7ec2 100644 --- a/docs/ApiAccessLevelEnum.md +++ b/docs/ApiAccessLevelEnum.md @@ -1,6 +1,6 @@ # ApiAccessLevelEnum -The access level of an API token. +The access level of an API token. AGENT_HOOKS tokens are made only by the Claude Code hook kit's browser sign-in and can only report agent activity; they cannot be created through this API. ## Enum @@ -8,6 +8,8 @@ The access level of an API token. * `FULL_ACCESS` (value: `'FULL_ACCESS'`) +* `AGENT_HOOKS` (value: `'AGENT_HOOKS'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/App.md b/docs/App.md index d430853..302acbe 100644 --- a/docs/App.md +++ b/docs/App.md @@ -11,7 +11,11 @@ Name | Type | Description | Notes **description** | **str** | A description of the app. | **admin_owner_id** | **UUID** | The ID of the owner of the app. | **app_type** | [**AppTypeEnum**](AppTypeEnum.md) | | +**visibility** | [**VisibilityTypeEnum**](VisibilityTypeEnum.md) | | [optional] +**visibility_group_ids** | **List[UUID]** | The IDs of groups that can see this app when visibility is `LIMITED`. Must be empty when visibility is `GLOBAL`. | [optional] +**import_visibility** | [**VisibilityTypeEnum**](VisibilityTypeEnum.md) | The visibility level of items imported from this app. | [optional] **validations** | [**List[AppValidation]**](AppValidation.md) | Validation checks of an apps' configuration and permissions. | [optional] +**custom_connector** | [**CustomConnectorAppConfig**](CustomConnectorAppConfig.md) | | [optional] ## Example diff --git a/docs/AppTypeEnum.md b/docs/AppTypeEnum.md index 2bc6e0a..a79c7fe 100644 --- a/docs/AppTypeEnum.md +++ b/docs/AppTypeEnum.md @@ -22,14 +22,20 @@ The type of an app. * `CUSTOM` (value: `'CUSTOM'`) +* `CONFLUENCE` (value: `'CONFLUENCE'`) + * `CUSTOM_CONNECTOR` (value: `'CUSTOM_CONNECTOR'`) * `DATABRICKS` (value: `'DATABRICKS'`) * `DATASTAX_ASTRA` (value: `'DATASTAX_ASTRA'`) +* `ALICLOUD` (value: `'ALICLOUD'`) + * `DEVIN` (value: `'DEVIN'`) +* `DOCUSIGN` (value: `'DOCUSIGN'`) + * `DUO` (value: `'DUO'`) * `GCP` (value: `'GCP'`) @@ -50,8 +56,12 @@ The type of an app. * `INCIDENTIO` (value: `'INCIDENTIO'`) +* `JIRA` (value: `'JIRA'`) + * `LDAP` (value: `'LDAP'`) +* `LINEAR` (value: `'LINEAR'`) + * `MARIADB` (value: `'MARIADB'`) * `MONGO` (value: `'MONGO'`) @@ -86,6 +96,8 @@ The type of an app. * `SLACK` (value: `'SLACK'`) +* `TABLEAU` (value: `'TABLEAU'`) + * `TAILSCALE` (value: `'TAILSCALE'`) * `TELEPORT` (value: `'TELEPORT'`) @@ -98,6 +110,34 @@ The type of an app. * `ZENDESK` (value: `'ZENDESK'`) +* `ZOOM` (value: `'ZOOM'`) + +* `RAMP` (value: `'RAMP'`) + +* `WRIKE` (value: `'WRIKE'`) + +* `VERCEL` (value: `'VERCEL'`) + +* `AXIOM` (value: `'AXIOM'`) + +* `ACTIVECAMPAIGN` (value: `'ACTIVECAMPAIGN'`) + +* `AHA` (value: `'AHA'`) + +* `ASANA` (value: `'ASANA'`) + +* `BITWARDEN` (value: `'BITWARDEN'`) + +* `CALENDLY` (value: `'CALENDLY'`) + +* `ONELOGIN` (value: `'ONELOGIN'`) + +* `SQUARE` (value: `'SQUARE'`) + +* `TRAY` (value: `'TRAY'`) + +* `RIPPLING` (value: `'RIPPLING'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AppVisibilityInfo.md b/docs/AppVisibilityInfo.md new file mode 100644 index 0000000..3cfb1ff --- /dev/null +++ b/docs/AppVisibilityInfo.md @@ -0,0 +1,32 @@ +# AppVisibilityInfo + +Visibility information for an app. Mirrors `VisibilityInfo` but adds the App-specific `import_visibility`, which governs the default visibility of items imported from the app. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visibility** | [**VisibilityTypeEnum**](VisibilityTypeEnum.md) | | +**visibility_group_ids** | **List[UUID]** | The IDs of groups that can see this app when visibility is `LIMITED`. Must be empty when visibility is `GLOBAL`. | [optional] +**import_visibility** | [**VisibilityTypeEnum**](VisibilityTypeEnum.md) | The visibility of items imported from this app. Defaults to `GLOBAL` when omitted on a write. | [optional] + +## Example + +```python +from opal_security.models.app_visibility_info import AppVisibilityInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of AppVisibilityInfo from a JSON string +app_visibility_info_instance = AppVisibilityInfo.from_json(json) +# print the JSON string representation of the object +print(AppVisibilityInfo.to_json()) + +# convert the object into a dict +app_visibility_info_dict = app_visibility_info_instance.to_dict() +# create an instance of AppVisibilityInfo from a dict +app_visibility_info_from_dict = AppVisibilityInfo.from_dict(app_visibility_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApproveRequestRequest.md b/docs/ApproveRequestRequest.md index 7a7547e..a47a972 100644 --- a/docs/ApproveRequestRequest.md +++ b/docs/ApproveRequestRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**acting_user_id** | **UUID** | Approve as this Opal user instead of the caller. Only for service users an admin has allowed to act for users, in organizations with the feature enabled. The user must be active in the identity provider and be a reviewer on the request's current stage and not the request's target; the decision counts as theirs. Requests that require MFA to approve, and ADMIN level, are rejected. | [optional] **level** | [**RequestApprovalEnum**](RequestApprovalEnum.md) | | **comment** | **str** | Optional comment for the approval | [optional] diff --git a/docs/AppsApi.md b/docs/AppsApi.md index c431723..8acce89 100644 --- a/docs/AppsApi.md +++ b/docs/AppsApi.md @@ -4,11 +4,178 @@ All URIs are relative to *https://api.opal.dev/v1* Method | HTTP request | Description ------------- | ------------- | ------------- +[**create_app**](AppsApi.md#create_app) | **POST** /apps | Create app +[**delete_app**](AppsApi.md#delete_app) | **DELETE** /apps/{app_id} | Delete app [**get_app**](AppsApi.md#get_app) | **GET** /apps/{app_id} | Get app by ID +[**get_app_visibility**](AppsApi.md#get_app_visibility) | **GET** /apps/{app_id}/visibility | Get app visibility [**get_apps**](AppsApi.md#get_apps) | **GET** /apps | Get apps [**get_sync_errors**](AppsApi.md#get_sync_errors) | **GET** /sync_errors | +[**set_app_visibility**](AppsApi.md#set_app_visibility) | **PUT** /apps/{app_id}/visibility | Set app visibility +[**update_app**](AppsApi.md#update_app) | **PUT** /apps/{app_id} | Update app +# **create_app** +> App create_app(create_app_info) + +Create app + +Creates an `App` in Opal. Currently supports only Push-only apps (`CUSTOM`) +and Custom Connector apps (`CUSTOM_CONNECTOR`). + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.app import App +from opal_security.models.create_app_info import CreateAppInfo +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.AppsApi(api_client) + create_app_info = opal_security.CreateAppInfo() # CreateAppInfo | + + try: + # Create app + api_response = api_instance.create_app(create_app_info) + print("The response of AppsApi->create_app:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AppsApi->create_app: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_app_info** | [**CreateAppInfo**](CreateAppInfo.md)| | + +### Return type + +[**App**](App.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The app that was created. | - | +**400** | Invalid request body — for example, `visibility_group_ids` is non-empty while `visibility` is `GLOBAL`, an unsupported `app_type`, or a missing/invalid `custom_connector` configuration. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_app** +> delete_app(app_id) + +Delete app + +Deletes an `App`. Currently supports only Push-only apps (`CUSTOM`) and +Custom Connector apps (`CUSTOM_CONNECTOR`). Matches the UI: soft-deletes +the app and cleans up its resources, groups, and users. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.AppsApi(api_client) + app_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the app. + + try: + # Delete app + api_instance.delete_app(app_id) + except Exception as e: + print("Exception when calling AppsApi->delete_app: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **app_id** | **UUID**| The ID of the app. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The app was successfully deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_app** > App get_app(app_id) @@ -89,6 +256,89 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_app_visibility** +> AppVisibilityInfo get_app_visibility(app_id) + +Get app visibility + +Returns the visibility of this app. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.app_visibility_info import AppVisibilityInfo +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.AppsApi(api_client) + app_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the app. + + try: + # Get app visibility + api_response = api_instance.get_app_visibility(app_id) + print("The response of AppsApi->get_app_visibility:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AppsApi->get_app_visibility: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **app_id** | **UUID**| The ID of the app. | + +### Return type + +[**AppVisibilityInfo**](AppVisibilityInfo.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The visibility info of this app. | - | +**400** | This endpoint only supports apps whose type is managed via `POST /v1/apps` and `PATCH /v1/apps/{id}` (`CUSTOM`, `OPAL_*`, and similar). Discovery-sourced app types (for example `AWS_SSO`) are rejected with 400. | - | +**403** | The caller is not authorized to view this app's visibility. | - | +**404** | The app was not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_apps** > AppsList get_apps(app_type_filter=app_type_filter, owner_filter=owner_filter) @@ -253,3 +503,179 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **set_app_visibility** +> AppVisibilityInfo set_app_visibility(app_id, app_visibility_info) + +Set app visibility + +Sets the visibility of this app. Preferred over setting +`visibility` / `visibility_group_ids` / `import_visibility` inline on +`POST /apps` or `PATCH /apps/{app_id}` for drift-sensitive callers +(Terraform, GitOps). Semantics are a replace, not a merge: +`visibility_group_ids` is written to exactly what the request sends +(an omitted or empty array clears all groups), and `import_visibility` +is updated only when present. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.app_visibility_info import AppVisibilityInfo +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.AppsApi(api_client) + app_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the app. + app_visibility_info = opal_security.AppVisibilityInfo() # AppVisibilityInfo | + + try: + # Set app visibility + api_response = api_instance.set_app_visibility(app_id, app_visibility_info) + print("The response of AppsApi->set_app_visibility:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AppsApi->set_app_visibility: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **app_id** | **UUID**| The ID of the app. | + **app_visibility_info** | [**AppVisibilityInfo**](AppVisibilityInfo.md)| | + +### Return type + +[**AppVisibilityInfo**](AppVisibilityInfo.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated visibility info of this app. | - | +**400** | Invalid request body or app state. Returned for any of: a malformed JSON body, an unknown field, an invalid `visibility` or `import_visibility` enum value, a `visibility_group_ids` entry that does not resolve to a group in the caller's org, a `visibility_group_ids` value that is non-empty while the effective `visibility` is `GLOBAL` (either sent on this request or already stored on the app), or an app whose type does not support visibility writes (only `CUSTOM` and `CUSTOM_CONNECTOR` do). | - | +**403** | The caller is not authorized to edit this app's visibility. | - | +**404** | The app was not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_app** +> App update_app(app_id, update_app_info) + +Update app + +Updates an `App`. Currently supports only Push-only apps (`CUSTOM`) and +Custom Connector apps (`CUSTOM_CONNECTOR`). + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.app import App +from opal_security.models.update_app_info import UpdateAppInfo +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.AppsApi(api_client) + app_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the app. + update_app_info = opal_security.UpdateAppInfo() # UpdateAppInfo | + + try: + # Update app + api_response = api_instance.update_app(app_id, update_app_info) + print("The response of AppsApi->update_app:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AppsApi->update_app: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **app_id** | **UUID**| The ID of the app. | + **update_app_info** | [**UpdateAppInfo**](UpdateAppInfo.md)| | + +### Return type + +[**App**](App.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated app. | - | +**400** | Invalid request body — for example, `visibility_group_ids` is non-empty while the effective visibility is `GLOBAL` (either explicitly on this request or already stored on the app), or a `custom_connector` field is invalid for this app type. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Campaign.md b/docs/Campaign.md new file mode 100644 index 0000000..e59f4f9 --- /dev/null +++ b/docs/Campaign.md @@ -0,0 +1,43 @@ +# Campaign + +An access review campaign. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_id** | **UUID** | The ID of the campaign. | +**name** | **str** | The name of the campaign. | +**status** | [**CampaignStatusEnum**](CampaignStatusEnum.md) | | +**is_template** | **bool** | Whether this campaign is a recurring schedule template. Templates spawn draft campaigns on schedule rather than being reviewed directly. | +**created_at** | **datetime** | The creation time of the campaign. | +**updated_at** | **datetime** | The last updated time of the campaign. | +**created_by_user_id** | **UUID** | The ID of the user who created the campaign. | +**configuration** | [**CampaignConfiguration**](CampaignConfiguration.md) | The campaign's configuration, if set. | [optional] +**started_at** | **datetime** | The time the campaign was started, if started. | [optional] +**started_by_user_id** | **UUID** | The ID of the user who started the campaign, if started. | [optional] +**stopped_at** | **datetime** | The time the campaign was manually stopped, if stopped. | [optional] +**stopped_by_user_id** | **UUID** | The ID of the user who stopped the campaign, if stopped. | [optional] +**ended_at** | **datetime** | The time the campaign reached its scheduled end, if ended. | [optional] +**ended_by_user_id** | **UUID** | The ID of the user who ended the campaign, if ended. | [optional] + +## Example + +```python +from opal_security.models.campaign import Campaign + +# TODO update the JSON string below +json = "{}" +# create an instance of Campaign from a JSON string +campaign_instance = Campaign.from_json(json) +# print the JSON string representation of the object +print(Campaign.to_json()) + +# convert the object into a dict +campaign_dict = campaign_instance.to_dict() +# create an instance of Campaign from a dict +campaign_from_dict = Campaign.from_dict(campaign_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignConfiguration.md b/docs/CampaignConfiguration.md new file mode 100644 index 0000000..673a21f --- /dev/null +++ b/docs/CampaignConfiguration.md @@ -0,0 +1,54 @@ +# CampaignConfiguration + +Configuration for an access review campaign. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**configuration_id** | **UUID** | The ID of the campaign configuration. | +**created_at** | **datetime** | The creation time of the configuration. | +**updated_at** | **datetime** | The last updated time of the configuration. | +**query** | [**OpalAccessPathQueryBody**](OpalAccessPathQueryBody.md) | Access-path query defining the scope of access to review. Uses the same principalFilter / entitlementFilter shape as ACCESS OpalQuery. | [optional] +**reviewer_assignment_policy** | [**UARReviewerAssignmentPolicyEnum**](UARReviewerAssignmentPolicyEnum.md) | | +**allow_self_review** | **bool** | Whether reviewers can review their own access. | +**send_reviewer_assignment_notification** | **bool** | Whether to notify reviewers upon assignment. | +**allow_reviewer_reassignment** | **bool** | Whether reviewers may reassign their reviews to another user. | +**allow_reviewers_to_reduce_expiration** | **bool** | Whether reviewers can shorten an item's access expiration. They cannot extend it. | +**start_date** | **datetime** | Scheduled start date of the campaign. | [optional] +**end_date** | **datetime** | Scheduled end date of the campaign. | [optional] +**timezone** | **str** | IANA timezone used to interpret campaign deadlines (e.g. America/Los_Angeles). | +**revoke_on** | [**CampaignRevokeOnEnum**](CampaignRevokeOnEnum.md) | | +**reminder_schedule** | **List[int]** | Days before end date to send reminder notifications. | [optional] +**reminder_include_manager** | **bool** | Whether to include the reviewer's manager in reminders. | +**require_reason_on_denial** | **bool** | Whether reviewers must provide a reason when denying (revoking) access. | +**auto_stop_when_complete** | **bool** | Whether the campaign stops automatically once every review item is complete. Stopping locks further reviews so admins can review the decisions or end the campaign to generate the report. | +**hide_ai_suggestions** | **bool** | Whether AI suggestions are hidden from reviewers. | +**custom_start_message** | **str** | Optional custom message included when notifying reviewers that the campaign started. | [optional] +**group_asset_visibility_policy** | [**CampaignGroupAssetVisibilityPolicyEnum**](CampaignGroupAssetVisibilityPolicyEnum.md) | | +**is_template** | **bool** | Whether this configuration is a recurring schedule template. | +**cron_expression** | **str** | Cron expression driving the recurring schedule. Null for one-off campaigns. | [optional] +**next_scheduled_run** | **datetime** | Next time a draft will be generated from this template. | [optional] +**last_scheduled_run** | **datetime** | Most recent time a draft was generated from this template. | [optional] +**recurring_duration_days** | **int** | Deadline window in days applied to each draft generated from this template. | [optional] + +## Example + +```python +from opal_security.models.campaign_configuration import CampaignConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of CampaignConfiguration from a JSON string +campaign_configuration_instance = CampaignConfiguration.from_json(json) +# print the JSON string representation of the object +print(CampaignConfiguration.to_json()) + +# convert the object into a dict +campaign_configuration_dict = campaign_configuration_instance.to_dict() +# create an instance of CampaignConfiguration from a dict +campaign_configuration_from_dict = CampaignConfiguration.from_dict(campaign_configuration_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignGroupAssetVisibilityPolicyEnum.md b/docs/CampaignGroupAssetVisibilityPolicyEnum.md new file mode 100644 index 0000000..d3fdd4c --- /dev/null +++ b/docs/CampaignGroupAssetVisibilityPolicyEnum.md @@ -0,0 +1,15 @@ +# CampaignGroupAssetVisibilityPolicyEnum + +Controls what group assets reviewers can see during the campaign. + +## Enum + +* `STRICT` (value: `'STRICT'`) + +* `VIEW_VISIBLE_AND_ASSIGNED` (value: `'VIEW_VISIBLE_AND_ASSIGNED'`) + +* `VIEW_ALL` (value: `'VIEW_ALL'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignItem.md b/docs/CampaignItem.md new file mode 100644 index 0000000..0eae0de --- /dev/null +++ b/docs/CampaignItem.md @@ -0,0 +1,44 @@ +# CampaignItem + +A campaign review item — one direct access edge under review, matching a row on the admin Reviews tab. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_item_id** | **UUID** | The ID of the campaign item. | +**campaign_id** | **UUID** | The ID of the parent campaign. | +**target_type** | [**CampaignItemTargetTypeEnum**](CampaignItemTargetTypeEnum.md) | | +**role_assignment_id** | **UUID** | The role assignment ID this item reviews (`target_id` when `target_type` is ROLE_ASSIGNMENT). | +**status** | [**CampaignItemStatusEnum**](CampaignItemStatusEnum.md) | | +**created_at** | **datetime** | When the item was created (snapshotted into the campaign). | +**is_target_deleted** | **bool** | True when the underlying role assignment is soft-deleted. | +**principal_id** | **UUID** | Principal ID from the role assignment. Null if the RA is missing. | [optional] +**principal_type** | [**EntityTypeEnum**](EntityTypeEnum.md) | Principal entity type. Null if the RA is missing. | [optional] +**entity_id** | **UUID** | Entitlement entity ID. Null if the RA is missing. | [optional] +**entity_type** | [**EntityTypeEnum**](EntityTypeEnum.md) | Entitlement entity type. Null if the RA is missing. | [optional] +**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | Access level on the role assignment, if any. | [optional] +**access_level_name** | **str** | Denormalized access level name stored on the campaign item. | [optional] +**reviews** | [**List[CampaignItemReview]**](CampaignItemReview.md) | Reviewer assignments and decisions for this item. | +**admin_override** | [**CampaignItemAdminOverride**](CampaignItemAdminOverride.md) | Admin override, if any. | [optional] + +## Example + +```python +from opal_security.models.campaign_item import CampaignItem + +# TODO update the JSON string below +json = "{}" +# create an instance of CampaignItem from a JSON string +campaign_item_instance = CampaignItem.from_json(json) +# print the JSON string representation of the object +print(CampaignItem.to_json()) + +# convert the object into a dict +campaign_item_dict = campaign_item_instance.to_dict() +# create an instance of CampaignItem from a dict +campaign_item_from_dict = CampaignItem.from_dict(campaign_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignItemAdminOverride.md b/docs/CampaignItemAdminOverride.md new file mode 100644 index 0000000..32e7a01 --- /dev/null +++ b/docs/CampaignItemAdminOverride.md @@ -0,0 +1,32 @@ +# CampaignItemAdminOverride + +Admin override applied to a campaign item. When set, it takes precedence over reviewer decisions for status and end-campaign remediations. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actor_user_id** | **UUID** | The admin who applied the override. | +**decision** | [**CampaignItemReviewDecisionEnum**](CampaignItemReviewDecisionEnum.md) | | +**decided_at** | **datetime** | When the override was applied. | + +## Example + +```python +from opal_security.models.campaign_item_admin_override import CampaignItemAdminOverride + +# TODO update the JSON string below +json = "{}" +# create an instance of CampaignItemAdminOverride from a JSON string +campaign_item_admin_override_instance = CampaignItemAdminOverride.from_json(json) +# print the JSON string representation of the object +print(CampaignItemAdminOverride.to_json()) + +# convert the object into a dict +campaign_item_admin_override_dict = campaign_item_admin_override_instance.to_dict() +# create an instance of CampaignItemAdminOverride from a dict +campaign_item_admin_override_from_dict = CampaignItemAdminOverride.from_dict(campaign_item_admin_override_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignItemReview.md b/docs/CampaignItemReview.md new file mode 100644 index 0000000..8b0b990 --- /dev/null +++ b/docs/CampaignItemReview.md @@ -0,0 +1,39 @@ +# CampaignItemReview + +A single reviewer's assignment and decision for a campaign item. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_item_review_id** | **UUID** | The ID of the campaign item review. | +**campaign_item_id** | **UUID** | The ID of the campaign item. | +**reviewer_user_id** | **UUID** | The ID of the assigned reviewer. | +**assignment_source** | [**CampaignItemReviewerAssignmentSourceEnum**](CampaignItemReviewerAssignmentSourceEnum.md) | | +**decision** | [**CampaignItemReviewDecisionEnum**](CampaignItemReviewDecisionEnum.md) | The reviewer's decision. Null when the reviewer has not yet submitted. | [optional] +**note** | **str** | Optional note from the reviewer. | [optional] +**updated_access_level_remote_id** | **str** | Target access level remote ID when decision is CHANGE_ROLE. | [optional] +**updated_duration_in_minutes** | **int** | Built-in duration in minutes when decision is REDUCE_EXPIRATION. | [optional] +**decided_at** | **datetime** | When the decision was finalized. | [optional] +**resolution_message** | **str** | Preset assignment summary when a manager/owner chain was resolved or substituted. | [optional] + +## Example + +```python +from opal_security.models.campaign_item_review import CampaignItemReview + +# TODO update the JSON string below +json = "{}" +# create an instance of CampaignItemReview from a JSON string +campaign_item_review_instance = CampaignItemReview.from_json(json) +# print the JSON string representation of the object +print(CampaignItemReview.to_json()) + +# convert the object into a dict +campaign_item_review_dict = campaign_item_review_instance.to_dict() +# create an instance of CampaignItemReview from a dict +campaign_item_review_from_dict = CampaignItemReview.from_dict(campaign_item_review_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignItemReviewDecisionEnum.md b/docs/CampaignItemReviewDecisionEnum.md new file mode 100644 index 0000000..55f2ba3 --- /dev/null +++ b/docs/CampaignItemReviewDecisionEnum.md @@ -0,0 +1,27 @@ +# CampaignItemReviewDecisionEnum + +Decision recorded on a campaign item review row. + +## Enum + +* `APPROVED` (value: `'APPROVED'`) + +* `REVOKED` (value: `'REVOKED'`) + +* `CHANGE_ROLE` (value: `'CHANGE_ROLE'`) + +* `REDUCE_EXPIRATION` (value: `'REDUCE_EXPIRATION'`) + +* `ADMIN_REVOKED` (value: `'ADMIN_REVOKED'`) + +* `NO_ACTION` (value: `'NO_ACTION'`) + +* `REASSIGNED` (value: `'REASSIGNED'`) + +* `ADMIN_OVERRIDE_APPROVED` (value: `'ADMIN_OVERRIDE_APPROVED'`) + +* `ADMIN_OVERRIDE_REVOKED` (value: `'ADMIN_OVERRIDE_REVOKED'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignItemReviewResult.md b/docs/CampaignItemReviewResult.md new file mode 100644 index 0000000..1a2f920 --- /dev/null +++ b/docs/CampaignItemReviewResult.md @@ -0,0 +1,35 @@ +# CampaignItemReviewResult + +A campaign item review after a successful submit. Flat fields only — does not expand principal/entity relationships. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_item_review_id** | **UUID** | The ID of the campaign item review. | +**decision** | [**CampaignItemReviewDecisionEnum**](CampaignItemReviewDecisionEnum.md) | | [optional] +**note** | **str** | Note recorded with the decision, if any. | [optional] +**decided_at** | **datetime** | When the decision was submitted. | [optional] +**updated_access_level_remote_id** | **str** | When `decision` is `CHANGE_ROLE`, the remote ID of the access level the reviewer selected. | [optional] +**reassigned_to_reviewer_ids** | **List[UUID]** | When `decision` is `REASSIGNED`, the user IDs the review was reassigned to. | [optional] + +## Example + +```python +from opal_security.models.campaign_item_review_result import CampaignItemReviewResult + +# TODO update the JSON string below +json = "{}" +# create an instance of CampaignItemReviewResult from a JSON string +campaign_item_review_result_instance = CampaignItemReviewResult.from_json(json) +# print the JSON string representation of the object +print(CampaignItemReviewResult.to_json()) + +# convert the object into a dict +campaign_item_review_result_dict = campaign_item_review_result_instance.to_dict() +# create an instance of CampaignItemReviewResult from a dict +campaign_item_review_result_from_dict = CampaignItemReviewResult.from_dict(campaign_item_review_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignItemReviewerAssignment.md b/docs/CampaignItemReviewerAssignment.md new file mode 100644 index 0000000..6aafe76 --- /dev/null +++ b/docs/CampaignItemReviewerAssignment.md @@ -0,0 +1,32 @@ +# CampaignItemReviewerAssignment + +Pair of campaign item and reviewer to assign or unassign. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_item_id** | **UUID** | The ID of the campaign item. | +**reviewer_id** | **UUID** | The ID of the reviewer. Required when `assignment_source` is `MANUAL` (or omitted), and required for every unassign entry. | [optional] +**assignment_source** | [**CampaignItemReviewerAssignmentSourceEnum**](CampaignItemReviewerAssignmentSourceEnum.md) | Defaults to `MANUAL`. When `PRINCIPAL_MANAGER` or `ASSET_ADMIN_OWNER`, the backend resolves reviewer ID(s) and `reviewer_id` may be omitted. | [optional] + +## Example + +```python +from opal_security.models.campaign_item_reviewer_assignment import CampaignItemReviewerAssignment + +# TODO update the JSON string below +json = "{}" +# create an instance of CampaignItemReviewerAssignment from a JSON string +campaign_item_reviewer_assignment_instance = CampaignItemReviewerAssignment.from_json(json) +# print the JSON string representation of the object +print(CampaignItemReviewerAssignment.to_json()) + +# convert the object into a dict +campaign_item_reviewer_assignment_dict = campaign_item_reviewer_assignment_instance.to_dict() +# create an instance of CampaignItemReviewerAssignment from a dict +campaign_item_reviewer_assignment_from_dict = CampaignItemReviewerAssignment.from_dict(campaign_item_reviewer_assignment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignItemReviewerAssignmentSourceEnum.md b/docs/CampaignItemReviewerAssignmentSourceEnum.md new file mode 100644 index 0000000..76a9cde --- /dev/null +++ b/docs/CampaignItemReviewerAssignmentSourceEnum.md @@ -0,0 +1,17 @@ +# CampaignItemReviewerAssignmentSourceEnum + +How a reviewer was assigned to a campaign item. + +## Enum + +* `MANUAL` (value: `'MANUAL'`) + +* `PRINCIPAL_MANAGER` (value: `'PRINCIPAL_MANAGER'`) + +* `ASSET_ADMIN_OWNER` (value: `'ASSET_ADMIN_OWNER'`) + +* `PRINCIPAL_SELF` (value: `'PRINCIPAL_SELF'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignItemReviewerSourceRemoval.md b/docs/CampaignItemReviewerSourceRemoval.md new file mode 100644 index 0000000..4c4de87 --- /dev/null +++ b/docs/CampaignItemReviewerSourceRemoval.md @@ -0,0 +1,31 @@ +# CampaignItemReviewerSourceRemoval + +Remove all pending reviewer rows for a given assignment source on a campaign item. Completed reviews are preserved. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_item_id** | **UUID** | The ID of the campaign item. | +**assignment_source** | [**CampaignItemReviewerAssignmentSourceEnum**](CampaignItemReviewerAssignmentSourceEnum.md) | | + +## Example + +```python +from opal_security.models.campaign_item_reviewer_source_removal import CampaignItemReviewerSourceRemoval + +# TODO update the JSON string below +json = "{}" +# create an instance of CampaignItemReviewerSourceRemoval from a JSON string +campaign_item_reviewer_source_removal_instance = CampaignItemReviewerSourceRemoval.from_json(json) +# print the JSON string representation of the object +print(CampaignItemReviewerSourceRemoval.to_json()) + +# convert the object into a dict +campaign_item_reviewer_source_removal_dict = campaign_item_reviewer_source_removal_instance.to_dict() +# create an instance of CampaignItemReviewerSourceRemoval from a dict +campaign_item_reviewer_source_removal_from_dict = CampaignItemReviewerSourceRemoval.from_dict(campaign_item_reviewer_source_removal_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignItemStatusEnum.md b/docs/CampaignItemStatusEnum.md new file mode 100644 index 0000000..9bd0803 --- /dev/null +++ b/docs/CampaignItemStatusEnum.md @@ -0,0 +1,25 @@ +# CampaignItemStatusEnum + +Derived aggregate status for a campaign item. Matches the admin Reviews tab Status column labels (undecided items on a stopped campaign are PENDING, not a separate stopped status). + +## Enum + +* `PENDING` (value: `'PENDING'`) + +* `COMPLETED` (value: `'COMPLETED'`) + +* `APPROVED` (value: `'APPROVED'`) + +* `REVOKED` (value: `'REVOKED'`) + +* `NO_ACTION` (value: `'NO_ACTION'`) + +* `CHANGED_ROLE` (value: `'CHANGED_ROLE'`) + +* `EXPIRATION_REDUCED` (value: `'EXPIRATION_REDUCED'`) + +* `ADMIN_REVOKED` (value: `'ADMIN_REVOKED'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignItemTargetTypeEnum.md b/docs/CampaignItemTargetTypeEnum.md new file mode 100644 index 0000000..d6557f8 --- /dev/null +++ b/docs/CampaignItemTargetTypeEnum.md @@ -0,0 +1,11 @@ +# CampaignItemTargetTypeEnum + +Type of access edge the campaign item reviews. + +## Enum + +* `ROLE_ASSIGNMENT` (value: `'ROLE_ASSIGNMENT'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignItemUnassignedPresetMessage.md b/docs/CampaignItemUnassignedPresetMessage.md new file mode 100644 index 0000000..41b8d16 --- /dev/null +++ b/docs/CampaignItemUnassignedPresetMessage.md @@ -0,0 +1,32 @@ +# CampaignItemUnassignedPresetMessage + +Preset assignment feedback when no review row was created. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_item_id** | **UUID** | The ID of the campaign item. | +**assignment_source** | [**CampaignItemReviewerAssignmentSourceEnum**](CampaignItemReviewerAssignmentSourceEnum.md) | | +**message** | **str** | Human-readable explanation of why no reviewer was assigned. | + +## Example + +```python +from opal_security.models.campaign_item_unassigned_preset_message import CampaignItemUnassignedPresetMessage + +# TODO update the JSON string below +json = "{}" +# create an instance of CampaignItemUnassignedPresetMessage from a JSON string +campaign_item_unassigned_preset_message_instance = CampaignItemUnassignedPresetMessage.from_json(json) +# print the JSON string representation of the object +print(CampaignItemUnassignedPresetMessage.to_json()) + +# convert the object into a dict +campaign_item_unassigned_preset_message_dict = campaign_item_unassigned_preset_message_instance.to_dict() +# create an instance of CampaignItemUnassignedPresetMessage from a dict +campaign_item_unassigned_preset_message_from_dict = CampaignItemUnassignedPresetMessage.from_dict(campaign_item_unassigned_preset_message_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignRevokeOnEnum.md b/docs/CampaignRevokeOnEnum.md new file mode 100644 index 0000000..9e0f7d0 --- /dev/null +++ b/docs/CampaignRevokeOnEnum.md @@ -0,0 +1,15 @@ +# CampaignRevokeOnEnum + +When access decisions take effect during a campaign. + +## Enum + +* `ACTION` (value: `'ACTION'`) + +* `END` (value: `'END'`) + +* `NONE` (value: `'NONE'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignStatusEnum.md b/docs/CampaignStatusEnum.md new file mode 100644 index 0000000..362f82c --- /dev/null +++ b/docs/CampaignStatusEnum.md @@ -0,0 +1,19 @@ +# CampaignStatusEnum + +The current status of a campaign. + +## Enum + +* `DRAFT` (value: `'DRAFT'`) + +* `ONGOING` (value: `'ONGOING'`) + +* `COMPLETED` (value: `'COMPLETED'`) + +* `STOPPED` (value: `'STOPPED'`) + +* `ENDED` (value: `'ENDED'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignsApi.md b/docs/CampaignsApi.md new file mode 100644 index 0000000..fe85b99 --- /dev/null +++ b/docs/CampaignsApi.md @@ -0,0 +1,1026 @@ +# opal_security.CampaignsApi + +All URIs are relative to *https://api.opal.dev/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_campaign**](CampaignsApi.md#create_campaign) | **POST** /campaigns | +[**end_campaign**](CampaignsApi.md#end_campaign) | **POST** /campaigns/{campaign_id}/end | End campaign +[**get_campaign**](CampaignsApi.md#get_campaign) | **GET** /campaigns/{campaign_id} | Get campaign by ID +[**get_campaign_items**](CampaignsApi.md#get_campaign_items) | **GET** /campaigns/{campaign_id}/items | List campaign items +[**get_campaign_viewer_items**](CampaignsApi.md#get_campaign_viewer_items) | **GET** /campaigns/{campaign_id}/viewer-items | List viewer campaign items +[**get_campaigns**](CampaignsApi.md#get_campaigns) | **GET** /campaigns | +[**review_campaign_items**](CampaignsApi.md#review_campaign_items) | **POST** /campaigns/{campaign_id}/reviews | Submit campaign item review decisions +[**start_campaign**](CampaignsApi.md#start_campaign) | **POST** /campaigns/{campaign_id}/start | Start campaign +[**stop_campaign**](CampaignsApi.md#stop_campaign) | **POST** /campaigns/{campaign_id}/stop | Stop campaign +[**update_campaign**](CampaignsApi.md#update_campaign) | **PUT** /campaigns/{campaign_id} | Update campaign +[**update_campaign_item_reviewers**](CampaignsApi.md#update_campaign_item_reviewers) | **POST** /campaigns/{campaign_id}/item-reviewers | Update campaign item reviewers + + +# **create_campaign** +> Campaign create_campaign(create_campaign_info) + +Creates a campaign. Campaign scope only supports direct access edges: +`configuration.query.edgeFilter.directOnly` defaults to `true`, is +always stored as `true`, and passing `false` returns 400. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.campaign import Campaign +from opal_security.models.create_campaign_info import CreateCampaignInfo +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.CampaignsApi(api_client) + create_campaign_info = opal_security.CreateCampaignInfo() # CreateCampaignInfo | + + try: + api_response = api_instance.create_campaign(create_campaign_info) + print("The response of CampaignsApi->create_campaign:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CampaignsApi->create_campaign: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_campaign_info** | [**CreateCampaignInfo**](CreateCampaignInfo.md)| | + +### Return type + +[**Campaign**](Campaign.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The campaign successfully created. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **end_campaign** +> Campaign end_campaign(campaign_id) + +End campaign + +Ends a stopped campaign, setting `ended_at` and `ended_by_user_id`, +applying pending access changes, and queuing report generation. +Returns 400 unless the campaign is started and stopped and not already +ended. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.campaign import Campaign +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.CampaignsApi(api_client) + campaign_id = UUID('f454d283-ca87-4a8a-bdbb-df212eca5353') # UUID | The ID of the campaign. + + try: + # End campaign + api_response = api_instance.end_campaign(campaign_id) + print("The response of CampaignsApi->end_campaign:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CampaignsApi->end_campaign: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaign_id** | **UUID**| The ID of the campaign. | + +### Return type + +[**Campaign**](Campaign.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The ended `Campaign`. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_campaign** +> Campaign get_campaign(campaign_id) + +Get campaign by ID + +Returns a `Campaign` object. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.campaign import Campaign +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.CampaignsApi(api_client) + campaign_id = UUID('f454d283-ca87-4a8a-bdbb-df212eca5353') # UUID | The ID of the campaign. + + try: + # Get campaign by ID + api_response = api_instance.get_campaign(campaign_id) + print("The response of CampaignsApi->get_campaign:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CampaignsApi->get_campaign: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaign_id** | **UUID**| The ID of the campaign. | + +### Return type + +[**Campaign**](Campaign.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The requested `Campaign`. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_campaign_items** +> PaginatedCampaignItemsList get_campaign_items(campaign_id, cursor=cursor, page_size=page_size, statuses=statuses, reviewer_user_id=reviewer_user_id, unassigned=unassigned, search=search) + +List campaign items + +Returns a paginated list of review items for a campaign — the same rows +shown on the admin Reviews tab. Status is derived using the same rules +as the UI Status column. Soft-deleted role assignments are still +returned with `is_target_deleted: true`. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.campaign_item_status_enum import CampaignItemStatusEnum +from opal_security.models.paginated_campaign_items_list import PaginatedCampaignItemsList +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.CampaignsApi(api_client) + campaign_id = UUID('f454d283-ca87-4a8a-bdbb-df212eca5353') # UUID | The ID of the campaign. + cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional) + page_size = 200 # int | Number of results to return per page. Default is 200; maximum is 500 (the campaign-items list cap). (optional) + statuses = [opal_security.CampaignItemStatusEnum()] # List[CampaignItemStatusEnum] | Filter by derived item status. When multiple values are provided, items matching any status are returned (OR). (optional) + reviewer_user_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | Restrict to items assigned to this reviewer user ID. (optional) + unassigned = True # bool | When true, restrict to items with no reviewer assigned. (optional) + search = 'search_example' # str | Case-insensitive search over principal name, asset name, and reviewer name. (optional) + + try: + # List campaign items + api_response = api_instance.get_campaign_items(campaign_id, cursor=cursor, page_size=page_size, statuses=statuses, reviewer_user_id=reviewer_user_id, unassigned=unassigned, search=search) + print("The response of CampaignsApi->get_campaign_items:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CampaignsApi->get_campaign_items: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaign_id** | **UUID**| The ID of the campaign. | + **cursor** | **str**| The pagination cursor value. | [optional] + **page_size** | **int**| Number of results to return per page. Default is 200; maximum is 500 (the campaign-items list cap). | [optional] + **statuses** | [**List[CampaignItemStatusEnum]**](CampaignItemStatusEnum.md)| Filter by derived item status. When multiple values are provided, items matching any status are returned (OR). | [optional] + **reviewer_user_id** | **UUID**| Restrict to items assigned to this reviewer user ID. | [optional] + **unassigned** | **bool**| When true, restrict to items with no reviewer assigned. | [optional] + **search** | **str**| Case-insensitive search over principal name, asset name, and reviewer name. | [optional] + +### Return type + +[**PaginatedCampaignItemsList**](PaginatedCampaignItemsList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A page of campaign items. | - | +**404** | Campaign not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_campaign_viewer_items** +> PaginatedViewerCampaignItemsList get_campaign_viewer_items(campaign_id, cursor=cursor, page_size=page_size, sort_field=sort_field, sort_direction=sort_direction, statuses=statuses, access_level_names=access_level_names, principal_ids=principal_ids, entity_ids=entity_ids, item_ids=item_ids, ai_bucket_id=ai_bucket_id) + +List viewer campaign items + +Returns a paginated list of campaign review items assigned to the +current authenticated viewer. Matches GraphQL `Campaign.viewerItems`. + +Campaign access matches `GET /campaigns/{campaign_id}` and GraphQL +`campaign(id)`: the caller must have access-review read permission or +be a reviewer on the campaign. Otherwise the request fails with 403 +(same as get-by-id). Item rows are still scoped to the caller's own +reviews (empty page when the caller is an admin but not a reviewer). + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.paginated_viewer_campaign_items_list import PaginatedViewerCampaignItemsList +from opal_security.models.sort_direction_enum import SortDirectionEnum +from opal_security.models.viewer_campaign_item_sort_field_enum import ViewerCampaignItemSortFieldEnum +from opal_security.models.viewer_campaign_item_status_enum import ViewerCampaignItemStatusEnum +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.CampaignsApi(api_client) + campaign_id = UUID('f454d283-ca87-4a8a-bdbb-df212eca5353') # UUID | The ID of the campaign. + cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional) + page_size = 200 # int | Number of results to return per page. Default is 200; maximum is 500. (optional) + sort_field = opal_security.ViewerCampaignItemSortFieldEnum() # ViewerCampaignItemSortFieldEnum | Sort by. Omit to sort by created_at. (optional) + sort_direction = opal_security.SortDirectionEnum() # SortDirectionEnum | Sort direction. (optional) + statuses = [opal_security.ViewerCampaignItemStatusEnum()] # List[ViewerCampaignItemStatusEnum] | Filter by review status. When multiple values are provided, items matching any status are returned (OR). (optional) + access_level_names = ['access_level_names_example'] # List[str] | Filter by access level name. (optional) + principal_ids = None # List[UUID] | Filter by principal ID. (optional) + entity_ids = None # List[UUID] | Filter by entity ID. (optional) + item_ids = None # List[UUID] | Filter to specific campaign item review IDs. (optional) + ai_bucket_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Restrict to items in this AI-suggestion bucket. (optional) + + try: + # List viewer campaign items + api_response = api_instance.get_campaign_viewer_items(campaign_id, cursor=cursor, page_size=page_size, sort_field=sort_field, sort_direction=sort_direction, statuses=statuses, access_level_names=access_level_names, principal_ids=principal_ids, entity_ids=entity_ids, item_ids=item_ids, ai_bucket_id=ai_bucket_id) + print("The response of CampaignsApi->get_campaign_viewer_items:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CampaignsApi->get_campaign_viewer_items: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaign_id** | **UUID**| The ID of the campaign. | + **cursor** | **str**| The pagination cursor value. | [optional] + **page_size** | **int**| Number of results to return per page. Default is 200; maximum is 500. | [optional] + **sort_field** | [**ViewerCampaignItemSortFieldEnum**](.md)| Sort by. Omit to sort by created_at. | [optional] + **sort_direction** | [**SortDirectionEnum**](.md)| Sort direction. | [optional] + **statuses** | [**List[ViewerCampaignItemStatusEnum]**](ViewerCampaignItemStatusEnum.md)| Filter by review status. When multiple values are provided, items matching any status are returned (OR). | [optional] + **access_level_names** | [**List[str]**](str.md)| Filter by access level name. | [optional] + **principal_ids** | [**List[UUID]**](UUID.md)| Filter by principal ID. | [optional] + **entity_ids** | [**List[UUID]**](UUID.md)| Filter by entity ID. | [optional] + **item_ids** | [**List[UUID]**](UUID.md)| Filter to specific campaign item review IDs. | [optional] + **ai_bucket_id** | **UUID**| Restrict to items in this AI-suggestion bucket. | [optional] + +### Return type + +[**PaginatedViewerCampaignItemsList**](PaginatedViewerCampaignItemsList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A page of viewer campaign items. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_campaigns** +> PaginatedCampaignsList get_campaigns(cursor=cursor, page_size=page_size, name=name, status=status, created_at_after=created_at_after, created_at_before=created_at_before, started_at_after=started_at_after, started_at_before=started_at_before, ended_at_after=ended_at_after, ended_at_before=ended_at_before, stopped_at_after=stopped_at_after, stopped_at_before=stopped_at_before) + +Returns a list of `Campaign` objects. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.campaign_status_enum import CampaignStatusEnum +from opal_security.models.paginated_campaigns_list import PaginatedCampaignsList +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.CampaignsApi(api_client) + cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional) + page_size = 200 # int | Number of results to return per page. Default is 200. (optional) + name = 'Q3 Access Review' # str | Campaign name to filter by. Returns campaigns whose names contain this substring (case-insensitive). (optional) + status = opal_security.CampaignStatusEnum() # CampaignStatusEnum | Filter by campaign status. Status is derived from lifecycle timestamps and review progress. (optional) + created_at_after = '2026-01-01T00:00:00Z' # datetime | Include campaigns created after this timestamp (exclusive). ISO 8601 format. (optional) + created_at_before = '2026-12-31T23:59:59Z' # datetime | Include campaigns created before this timestamp (exclusive). ISO 8601 format. (optional) + started_at_after = '2026-01-01T00:00:00Z' # datetime | Include campaigns started after this timestamp (exclusive). ISO 8601 format. (optional) + started_at_before = '2026-12-31T23:59:59Z' # datetime | Include campaigns started before this timestamp (exclusive). ISO 8601 format. (optional) + ended_at_after = '2026-01-01T00:00:00Z' # datetime | Include campaigns ended after this timestamp (exclusive). ISO 8601 format. (optional) + ended_at_before = '2026-12-31T23:59:59Z' # datetime | Include campaigns ended before this timestamp (exclusive). ISO 8601 format. (optional) + stopped_at_after = '2026-01-01T00:00:00Z' # datetime | Include campaigns stopped after this timestamp (exclusive). ISO 8601 format. (optional) + stopped_at_before = '2026-12-31T23:59:59Z' # datetime | Include campaigns stopped before this timestamp (exclusive). ISO 8601 format. (optional) + + try: + api_response = api_instance.get_campaigns(cursor=cursor, page_size=page_size, name=name, status=status, created_at_after=created_at_after, created_at_before=created_at_before, started_at_after=started_at_after, started_at_before=started_at_before, ended_at_after=ended_at_after, ended_at_before=ended_at_before, stopped_at_after=stopped_at_after, stopped_at_before=stopped_at_before) + print("The response of CampaignsApi->get_campaigns:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CampaignsApi->get_campaigns: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cursor** | **str**| The pagination cursor value. | [optional] + **page_size** | **int**| Number of results to return per page. Default is 200. | [optional] + **name** | **str**| Campaign name to filter by. Returns campaigns whose names contain this substring (case-insensitive). | [optional] + **status** | [**CampaignStatusEnum**](.md)| Filter by campaign status. Status is derived from lifecycle timestamps and review progress. | [optional] + **created_at_after** | **datetime**| Include campaigns created after this timestamp (exclusive). ISO 8601 format. | [optional] + **created_at_before** | **datetime**| Include campaigns created before this timestamp (exclusive). ISO 8601 format. | [optional] + **started_at_after** | **datetime**| Include campaigns started after this timestamp (exclusive). ISO 8601 format. | [optional] + **started_at_before** | **datetime**| Include campaigns started before this timestamp (exclusive). ISO 8601 format. | [optional] + **ended_at_after** | **datetime**| Include campaigns ended after this timestamp (exclusive). ISO 8601 format. | [optional] + **ended_at_before** | **datetime**| Include campaigns ended before this timestamp (exclusive). ISO 8601 format. | [optional] + **stopped_at_after** | **datetime**| Include campaigns stopped after this timestamp (exclusive). ISO 8601 format. | [optional] + **stopped_at_before** | **datetime**| Include campaigns stopped before this timestamp (exclusive). ISO 8601 format. | [optional] + +### Return type + +[**PaginatedCampaignsList**](PaginatedCampaignsList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A list of campaigns for your organization. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **review_campaign_items** +> ReviewCampaignItemsResponse review_campaign_items(campaign_id, review_campaign_items_info) + +Submit campaign item review decisions + +Submits one or more review decisions for campaign item reviews assigned +to the authenticated user. Mirrors the GraphQL `reviewCampaignItems` +mutation. + +Each decision targets a `campaign_item_review_id` that must belong to +this campaign and be assigned to the caller. Supported decisions are +`APPROVED`, `REVOKED`, `CHANGE_ROLE`, and `REASSIGNED`. + +For `CHANGE_ROLE`, `access_level_remote_id` is required. For +`REASSIGNED`, either supply `new_reviewer_user_ids` (manual) or an +`assignment_source` preset (`PRINCIPAL_MANAGER` / `ASSET_ADMIN_OWNER`). +Reassignment also requires the campaign configuration flag +`allow_reviewer_reassignment` to be enabled. + +When the campaign uses `revoke_on: ACTION`, `REVOKED` decisions revoke +access immediately. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.review_campaign_items_info import ReviewCampaignItemsInfo +from opal_security.models.review_campaign_items_response import ReviewCampaignItemsResponse +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.CampaignsApi(api_client) + campaign_id = UUID('f454d283-ca87-4a8a-bdbb-df212eca5353') # UUID | The ID of the campaign. + review_campaign_items_info = opal_security.ReviewCampaignItemsInfo() # ReviewCampaignItemsInfo | + + try: + # Submit campaign item review decisions + api_response = api_instance.review_campaign_items(campaign_id, review_campaign_items_info) + print("The response of CampaignsApi->review_campaign_items:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CampaignsApi->review_campaign_items: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaign_id** | **UUID**| The ID of the campaign. | + **review_campaign_items_info** | [**ReviewCampaignItemsInfo**](ReviewCampaignItemsInfo.md)| | + +### Return type + +[**ReviewCampaignItemsResponse**](ReviewCampaignItemsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated campaign item reviews. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **start_campaign** +> Campaign start_campaign(campaign_id) + +Start campaign + +Starts a draft campaign immediately, setting `started_at` and +`started_by_user_id`. Returns 400 if the campaign is not in draft +state, or if it is a recurring template (`is_template: true`) — +templates spawn draft campaigns on their schedule and cannot be +started directly. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.campaign import Campaign +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.CampaignsApi(api_client) + campaign_id = UUID('f454d283-ca87-4a8a-bdbb-df212eca5353') # UUID | The ID of the campaign. + + try: + # Start campaign + api_response = api_instance.start_campaign(campaign_id) + print("The response of CampaignsApi->start_campaign:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CampaignsApi->start_campaign: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaign_id** | **UUID**| The ID of the campaign. | + +### Return type + +[**Campaign**](Campaign.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The started `Campaign`. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **stop_campaign** +> Campaign stop_campaign(campaign_id, stop_campaign_request=stop_campaign_request) + +Stop campaign + +Stops an ongoing campaign immediately, setting `stopped_at` and +`stopped_by_user_id`. Returns 400 if the campaign has not started or +has already stopped. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.campaign import Campaign +from opal_security.models.stop_campaign_request import StopCampaignRequest +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.CampaignsApi(api_client) + campaign_id = UUID('f454d283-ca87-4a8a-bdbb-df212eca5353') # UUID | The ID of the campaign. + stop_campaign_request = opal_security.StopCampaignRequest() # StopCampaignRequest | (optional) + + try: + # Stop campaign + api_response = api_instance.stop_campaign(campaign_id, stop_campaign_request=stop_campaign_request) + print("The response of CampaignsApi->stop_campaign:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CampaignsApi->stop_campaign: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaign_id** | **UUID**| The ID of the campaign. | + **stop_campaign_request** | [**StopCampaignRequest**](StopCampaignRequest.md)| | [optional] + +### Return type + +[**Campaign**](Campaign.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The stopped `Campaign`. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_campaign** +> Campaign update_campaign(campaign_id, update_campaign_info) + +Update campaign + +Partially updates a campaign. Omitted fields are left unchanged. +`configuration.query` and `configuration.reviewer_assignment_policy` +cannot be updated after create; including either field returns 400. +`configuration.cron_expression` and +`configuration.recurring_duration_days` may only be set on template +campaigns; setting them on a one-off campaign returns 400. +`configuration.is_template` is immutable and not accepted on update. +Configuration updates on a stopped or ended (non-template) campaign +return 400. Name-only updates are still allowed. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.campaign import Campaign +from opal_security.models.update_campaign_info import UpdateCampaignInfo +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.CampaignsApi(api_client) + campaign_id = UUID('f454d283-ca87-4a8a-bdbb-df212eca5353') # UUID | The ID of the campaign. + update_campaign_info = opal_security.UpdateCampaignInfo() # UpdateCampaignInfo | + + try: + # Update campaign + api_response = api_instance.update_campaign(campaign_id, update_campaign_info) + print("The response of CampaignsApi->update_campaign:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CampaignsApi->update_campaign: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaign_id** | **UUID**| The ID of the campaign. | + **update_campaign_info** | [**UpdateCampaignInfo**](UpdateCampaignInfo.md)| | + +### Return type + +[**Campaign**](Campaign.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated `Campaign`. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_campaign_item_reviewers** +> UpdateCampaignItemReviewersResult update_campaign_item_reviewers(campaign_id, update_campaign_item_reviewers_info) + +Update campaign item reviewers + +Atomically assigns and unassigns reviewers on campaign items in one +request. All `campaign_item_id`s must belong to `{campaign_id}`. +Existing assign pairs are ignored; missing unassign pairs are skipped. +Completed reviews (`decided_at` set) are never removed. +Requires settings-edit permission. Returns 400 if the campaign has ended. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.update_campaign_item_reviewers_info import UpdateCampaignItemReviewersInfo +from opal_security.models.update_campaign_item_reviewers_result import UpdateCampaignItemReviewersResult +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.CampaignsApi(api_client) + campaign_id = UUID('f454d283-ca87-4a8a-bdbb-df212eca5353') # UUID | The ID of the campaign. + update_campaign_item_reviewers_info = opal_security.UpdateCampaignItemReviewersInfo() # UpdateCampaignItemReviewersInfo | + + try: + # Update campaign item reviewers + api_response = api_instance.update_campaign_item_reviewers(campaign_id, update_campaign_item_reviewers_info) + print("The response of CampaignsApi->update_campaign_item_reviewers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CampaignsApi->update_campaign_item_reviewers: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaign_id** | **UUID**| The ID of the campaign. | + **update_campaign_item_reviewers_info** | [**UpdateCampaignItemReviewersInfo**](UpdateCampaignItemReviewersInfo.md)| | + +### Return type + +[**UpdateCampaignItemReviewersResult**](UpdateCampaignItemReviewersResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Reviews for all referenced items after the update. | - | +**400** | Invalid input, items not in this campaign, campaign ended, or self-review violation. | - | +**403** | Missing settings-edit permission. | - | +**404** | Campaign or one or more campaign items not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CancelRequestRequest.md b/docs/CancelRequestRequest.md new file mode 100644 index 0000000..029d4b0 --- /dev/null +++ b/docs/CancelRequestRequest.md @@ -0,0 +1,29 @@ +# CancelRequestRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**acting_user_id** | **UUID** | Cancel as this Opal user instead of the caller. Only for service users an admin has allowed to act for users, in organizations with the feature enabled. The user must be active in the identity provider and be an Opal admin or the request's requester, target or initiated_by user. Unknown body fields are ignored, so a misspelled field cancels as the caller. | [optional] + +## Example + +```python +from opal_security.models.cancel_request_request import CancelRequestRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CancelRequestRequest from a JSON string +cancel_request_request_instance = CancelRequestRequest.from_json(json) +# print the JSON string representation of the object +print(CancelRequestRequest.to_json()) + +# convert the object into a dict +cancel_request_request_dict = cancel_request_request_instance.to_dict() +# create an instance of CancelRequestRequest from a dict +cancel_request_request_from_dict = CancelRequestRequest.from_dict(cancel_request_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Condition.md b/docs/Condition.md index 96cdedc..bdfeda2 100644 --- a/docs/Condition.md +++ b/docs/Condition.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **group_ids** | **List[UUID]** | The list of group IDs to match. | [optional] **role_remote_ids** | **List[str]** | The list of role remote IDs to match. | [optional] +**opal_script_id** | **UUID** | The ID of a `REQUEST_CONFIGURATION_CONDITION` OpalScript that decides whether this request configuration applies. Cannot be combined with `group_ids` or `role_remote_ids`. | [optional] ## Example diff --git a/docs/ConfigurationTemplate.md b/docs/ConfigurationTemplate.md index 749d708..02f4c7a 100644 --- a/docs/ConfigurationTemplate.md +++ b/docs/ConfigurationTemplate.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **break_glass_user_ids** | **List[UUID]** | The IDs of the break glass users linked to the configuration template. | [optional] **require_mfa_to_approve** | **bool** | A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template. | [optional] **require_mfa_to_connect** | **bool** | A bool representing whether or not to require MFA to connect to resources associated with this configuration template. | [optional] +**requires_forfeit_reason** | **bool** | A bool representing whether or not a reason is required when forfeiting access to resources or groups using this configuration template. | [optional] **ticket_propagation** | [**TicketPropagationConfiguration**](TicketPropagationConfiguration.md) | | [optional] **custom_request_notification** | **str** | Custom request notification sent upon request approval for this configuration template. | [optional] diff --git a/docs/CreateAppInfo.md b/docs/CreateAppInfo.md new file mode 100644 index 0000000..c83270c --- /dev/null +++ b/docs/CreateAppInfo.md @@ -0,0 +1,37 @@ +# CreateAppInfo + +Information needed to create an app. Currently supports only Push-only apps (`CUSTOM`) and Custom Connector apps (`CUSTOM_CONNECTOR`). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the app. | +**description** | **str** | A description of the app. | +**admin_owner_id** | **UUID** | The ID of the owner of the app. | +**app_type** | [**AppTypeEnum**](AppTypeEnum.md) | The type of the app. Must be `CUSTOM` (Push-only App) or `CUSTOM_CONNECTOR`. | +**visibility** | [**VisibilityTypeEnum**](VisibilityTypeEnum.md) | The visibility of the app. Defaults to `GLOBAL` when omitted. Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`: set visibility after creation via the sub-endpoint instead of on create. Still fully functional and validated on this surface. | [optional] +**visibility_group_ids** | **List[UUID]** | The IDs of groups that can see this app when visibility is `LIMITED`. Must be empty when visibility is `GLOBAL`; the server returns `400` otherwise. Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`. | [optional] +**import_visibility** | [**VisibilityTypeEnum**](VisibilityTypeEnum.md) | The visibility of imported items. Defaults to `GLOBAL` when omitted. Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`. | [optional] +**custom_connector** | [**CreateCustomConnectorInfo**](CreateCustomConnectorInfo.md) | Required when `app_type` is `CUSTOM_CONNECTOR`. Must not be set when `app_type` is `CUSTOM`. | [optional] + +## Example + +```python +from opal_security.models.create_app_info import CreateAppInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateAppInfo from a JSON string +create_app_info_instance = CreateAppInfo.from_json(json) +# print the JSON string representation of the object +print(CreateAppInfo.to_json()) + +# convert the object into a dict +create_app_info_dict = create_app_info_instance.to_dict() +# create an instance of CreateAppInfo from a dict +create_app_info_from_dict = CreateAppInfo.from_dict(create_app_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateCampaignConfigurationInfo.md b/docs/CreateCampaignConfigurationInfo.md new file mode 100644 index 0000000..d72a622 --- /dev/null +++ b/docs/CreateCampaignConfigurationInfo.md @@ -0,0 +1,50 @@ +# CreateCampaignConfigurationInfo + +Configuration to apply when creating a campaign. `query` is required; other omitted fields use defaults. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**query** | [**OpalAccessPathQueryBody**](OpalAccessPathQueryBody.md) | Access-path query defining the scope of access to review. Required. Uses the same principalFilter / entitlementFilter shape as ACCESS OpalQuery. Must include at least one of principalFilter or entitlementFilter. Campaign scope only supports direct access edges: `edgeFilter.directOnly` defaults to `true`, is always stored as `true`, and passing `false` returns 400. | +**reviewer_assignment_policy** | [**UARReviewerAssignmentPolicyEnum**](UARReviewerAssignmentPolicyEnum.md) | | [optional] +**allow_self_review** | **bool** | Whether reviewers can review their own access. | [optional] +**send_reviewer_assignment_notification** | **bool** | Whether to notify reviewers upon assignment. | [optional] +**allow_reviewer_reassignment** | **bool** | Whether reviewers may reassign their reviews to another user. | [optional] +**allow_reviewers_to_reduce_expiration** | **bool** | Whether reviewers can shorten an item's access expiration. They cannot extend it. | [optional] +**start_date** | **datetime** | Scheduled start date of the campaign. | [optional] +**end_date** | **datetime** | Scheduled end date of the campaign. | [optional] +**timezone** | **str** | IANA timezone used to interpret campaign deadlines (e.g. America/Los_Angeles). | [optional] +**revoke_on** | [**CampaignRevokeOnEnum**](CampaignRevokeOnEnum.md) | | [optional] +**reminder_schedule** | **List[int]** | Days before end date to send reminder notifications. | [optional] +**reminder_include_manager** | **bool** | Whether to include the reviewer's manager in reminders. | [optional] +**require_reason_on_denial** | **bool** | Whether reviewers must provide a reason when denying (revoking) access. | [optional] +**auto_stop_when_complete** | **bool** | Whether the campaign stops automatically once every review item is complete. Stopping locks further reviews so admins can review the decisions or end the campaign to generate the report. | [optional] +**hide_ai_suggestions** | **bool** | Whether AI suggestions are hidden from reviewers. | [optional] +**custom_start_message** | **str** | Optional custom message included when notifying reviewers that the campaign started. | [optional] +**group_asset_visibility_policy** | [**CampaignGroupAssetVisibilityPolicyEnum**](CampaignGroupAssetVisibilityPolicyEnum.md) | | [optional] +**is_template** | **bool** | Whether this configuration is a recurring schedule template. | [optional] +**cron_expression** | **str** | Cron expression driving the recurring schedule. Null for one-off campaigns. | [optional] +**recurring_duration_days** | **int** | Deadline window in days applied to each draft generated from this template. | [optional] +**excluded_role_assignment_ids** | **List[UUID]** | Role assignment IDs to exclude from the campaign scope during population. | [optional] + +## Example + +```python +from opal_security.models.create_campaign_configuration_info import CreateCampaignConfigurationInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCampaignConfigurationInfo from a JSON string +create_campaign_configuration_info_instance = CreateCampaignConfigurationInfo.from_json(json) +# print the JSON string representation of the object +print(CreateCampaignConfigurationInfo.to_json()) + +# convert the object into a dict +create_campaign_configuration_info_dict = create_campaign_configuration_info_instance.to_dict() +# create an instance of CreateCampaignConfigurationInfo from a dict +create_campaign_configuration_info_from_dict = CreateCampaignConfigurationInfo.from_dict(create_campaign_configuration_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateCampaignInfo.md b/docs/CreateCampaignInfo.md new file mode 100644 index 0000000..e7a1851 --- /dev/null +++ b/docs/CreateCampaignInfo.md @@ -0,0 +1,31 @@ +# CreateCampaignInfo + +# CreateCampaignInfo Object ### Description The `CreateCampaignInfo` object is used to create a campaign. ### Usage Example Use in the `POST Campaigns` endpoint. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the campaign. | +**configuration** | [**CreateCampaignConfigurationInfo**](CreateCampaignConfigurationInfo.md) | Configuration for the campaign. Required; must include a query. Other omitted fields use defaults. | + +## Example + +```python +from opal_security.models.create_campaign_info import CreateCampaignInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCampaignInfo from a JSON string +create_campaign_info_instance = CreateCampaignInfo.from_json(json) +# print the JSON string representation of the object +print(CreateCampaignInfo.to_json()) + +# convert the object into a dict +create_campaign_info_dict = create_campaign_info_instance.to_dict() +# create an instance of CreateCampaignInfo from a dict +create_campaign_info_from_dict = CreateCampaignInfo.from_dict(create_campaign_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateConfigurationTemplateInfo.md b/docs/CreateConfigurationTemplateInfo.md index b041f65..abdff9d 100644 --- a/docs/CreateConfigurationTemplateInfo.md +++ b/docs/CreateConfigurationTemplateInfo.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **break_glass_user_ids** | **List[UUID]** | The IDs of the break glass users linked to the configuration template. | [optional] **require_mfa_to_approve** | **bool** | A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template. | **require_mfa_to_connect** | **bool** | A bool representing whether or not to require MFA to connect to resources associated with this configuration template. | +**requires_forfeit_reason** | **bool** | A bool representing whether or not a reason is required when forfeiting access to resources or groups using this configuration template. | [optional] **name** | **str** | The name of the configuration template. | **request_configurations** | [**List[RequestConfiguration]**](RequestConfiguration.md) | The request configuration list of the configuration template. If not provided, the default request configuration will be used. | [optional] **request_configuration_list** | [**CreateRequestConfigurationInfoList**](CreateRequestConfigurationInfoList.md) | The request configuration list of the configuration template. If not provided, the default request configuration will be used. Deprecated in favor of `request_configurations`. | [optional] diff --git a/docs/CreateCustomConnectorInfo.md b/docs/CreateCustomConnectorInfo.md new file mode 100644 index 0000000..30c4270 --- /dev/null +++ b/docs/CreateCustomConnectorInfo.md @@ -0,0 +1,40 @@ +# CreateCustomConnectorInfo + +Information needed to create a Custom Connector app. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | The identifier of the Custom Connector. | +**base_url** | **str** | The base URL of the Custom Connector. | +**signing_secret** | **str** | The signing secret used to authenticate requests to the Custom Connector. Write-only; never returned by the API. | +**tls_mode** | **bool** | Whether TLS verification is enabled. Defaults to `true` when omitted. | [optional] +**tls_ca_cert_content** | **str** | Optional PEM-encoded CA certificate content for TLS. | [optional] +**supports_groups** | **bool** | Whether the Custom Connector supports groups. Defaults to `false`. | [optional] +**supports_nested_resources** | **bool** | Whether the Custom Connector supports nested resources. Defaults to `false`. | [optional] +**supports_nested_groups** | **bool** | Whether the Custom Connector supports nested groups. Defaults to `false`. | [optional] +**supports_event_ingestion** | **bool** | Whether the Custom Connector supports event ingestion. Defaults to `false`. | [optional] +**supports_idp** | **bool** | Whether the Custom Connector can be connected as an upstream user directory. Defaults to `false`. | [optional] +**idp_protocol** | [**CustomConnectorIdpProtocolEnum**](CustomConnectorIdpProtocolEnum.md) | | [optional] + +## Example + +```python +from opal_security.models.create_custom_connector_info import CreateCustomConnectorInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCustomConnectorInfo from a JSON string +create_custom_connector_info_instance = CreateCustomConnectorInfo.from_json(json) +# print the JSON string representation of the object +print(CreateCustomConnectorInfo.to_json()) + +# convert the object into a dict +create_custom_connector_info_dict = create_custom_connector_info_instance.to_dict() +# create an instance of CreateCustomConnectorInfo from a dict +create_custom_connector_info_from_dict = CreateCustomConnectorInfo.from_dict(create_custom_connector_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGroupInfo.md b/docs/CreateGroupInfo.md index 28c71d7..c679748 100644 --- a/docs/CreateGroupInfo.md +++ b/docs/CreateGroupInfo.md @@ -14,7 +14,14 @@ Name | Type | Description | Notes **remote_group_id** | **str** | Deprecated - use remote_info instead. The ID of the group on the remote system. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field. | [optional] **metadata** | **str** | Deprecated - use remote_info instead. JSON metadata about the remote group. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field. The required format is dependent on group_type and should have the following schema: <style type=\"text/css\"> code {max-height:300px !important} </style> ```json { \"$schema\": \"http://json-schema.org/draft-04/schema#\", \"title\": \"Group Metadata\", \"properties\": { \"ad_group\": { \"properties\": { \"object_guid\": { \"type\": \"string\" } }, \"required\": [\"object_guid\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Active Directory Group\" }, \"duo_group\": { \"properties\": { \"group_id\": { \"type\": \"string\" } }, \"required\": [\"group_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Duo Group\" }, \"git_hub_team\": { \"properties\": { \"org_name\": { \"type\": \"string\" }, \"team_slug\": { \"type\": \"string\" } }, \"required\": [\"org_name\", \"team_slug\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GitHub Team\" }, \"google_groups_group\": { \"properties\": { \"group_id\": { \"type\": \"string\" } }, \"required\": [\"group_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Google Groups Group\" }, \"ldap_group\": { \"properties\": { \"group_uid\": { \"type\": \"string\" } }, \"required\": [\"group_uid\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"LDAP Group\" }, \"okta_directory_group\": { \"properties\": { \"group_id\": { \"type\": \"string\" } }, \"required\": [\"group_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Okta Directory Group\" } }, \"additionalProperties\": false, \"minProperties\": 1, \"maxProperties\": 1, \"type\": \"object\" } ``` | [optional] **custom_request_notification** | **str** | Custom request notification sent upon request approval. | [optional] +**max_direct_users_allowed** | **int** | The maximum number of direct users allowed for this group at once. Set to null to remove the limit. | [optional] **risk_sensitivity_override** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | | [optional] +**match_remote_name** | **bool** | A bool representing whether or not the group's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. Defaults to false. | [optional] +**match_remote_description** | **bool** | A bool representing whether or not the group's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. Defaults to false. | [optional] +**requires_forfeit_reason** | **bool** | A bool representing whether or not a reason is required when forfeiting access to this group. | [optional] +**handle** | **str** | Slack user group mention name, without the @. Optional; Slack assigns one if omitted. | [optional] +**team_id** | **str** | Slack workspace ID. Required when the Slack connection spans multiple workspaces. | [optional] +**initial_user_ids** | **List[UUID]** | Opal user IDs to add as the group's initial members. Required when creating a Slack user group. | [optional] ## Example diff --git a/docs/CreateOpalScriptInfo.md b/docs/CreateOpalScriptInfo.md new file mode 100644 index 0000000..3c1a614 --- /dev/null +++ b/docs/CreateOpalScriptInfo.md @@ -0,0 +1,33 @@ +# CreateOpalScriptInfo + +Information for creating an OpalScript. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the OpalScript. | +**script_type** | [**OpalScriptTypeEnum**](OpalScriptTypeEnum.md) | | +**script** | **str** | The source of the OpalScript. | +**owner_id** | **UUID** | The owner of the service user Opal provisions for a `REQUEST_REVIEW` script. Required for that script type and ignored for the others, which have no reviewer identity. | [optional] + +## Example + +```python +from opal_security.models.create_opal_script_info import CreateOpalScriptInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateOpalScriptInfo from a JSON string +create_opal_script_info_instance = CreateOpalScriptInfo.from_json(json) +# print the JSON string representation of the object +print(CreateOpalScriptInfo.to_json()) + +# convert the object into a dict +create_opal_script_info_dict = create_opal_script_info_instance.to_dict() +# create an instance of CreateOpalScriptInfo from a dict +create_opal_script_info_from_dict = CreateOpalScriptInfo.from_dict(create_opal_script_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreatePaladinContextSourceInfo.md b/docs/CreatePaladinContextSourceInfo.md new file mode 100644 index 0000000..522982e --- /dev/null +++ b/docs/CreatePaladinContextSourceInfo.md @@ -0,0 +1,34 @@ +# CreatePaladinContextSourceInfo + +Information for adding a context source to a Paladin. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source_kind** | [**PaladinContextSourceKind**](PaladinContextSourceKind.md) | | +**third_party_provider** | [**PaladinContextSourceProvider**](PaladinContextSourceProvider.md) | | +**remote_id** | **str** | The provider's identifier for the source. The Slack channel ID for a channel, or the Notion/Confluence page ID or numeric Freshservice article ID for a document. | +**name** | **str** | An optional human-readable name for the source. | [optional] +**url** | **str** | An optional link to the source. | [optional] + +## Example + +```python +from opal_security.models.create_paladin_context_source_info import CreatePaladinContextSourceInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of CreatePaladinContextSourceInfo from a JSON string +create_paladin_context_source_info_instance = CreatePaladinContextSourceInfo.from_json(json) +# print the JSON string representation of the object +print(CreatePaladinContextSourceInfo.to_json()) + +# convert the object into a dict +create_paladin_context_source_info_dict = create_paladin_context_source_info_instance.to_dict() +# create an instance of CreatePaladinContextSourceInfo from a dict +create_paladin_context_source_info_from_dict = CreatePaladinContextSourceInfo.from_dict(create_paladin_context_source_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreatePaladinInfo.md b/docs/CreatePaladinInfo.md new file mode 100644 index 0000000..1454695 --- /dev/null +++ b/docs/CreatePaladinInfo.md @@ -0,0 +1,35 @@ +# CreatePaladinInfo + +Information for creating a Paladin. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the Paladin. | +**owner_id** | **UUID** | The ID of the owner of the Paladin. | +**monitor_mode** | **bool** | When true, the Paladin reasons about requests but takes no action. Defaults to true. | [optional] [default to True] +**admin_view_only** | **bool** | When true, recommendations are visible only to admins. Only meaningful when monitor_mode is true. Defaults to false. | [optional] [default to False] +**enabled_connectors** | [**List[PaladinConnector]**](PaladinConnector.md) | The connectors the Paladin is allowed to use. | [optional] +**instructions** | **str** | The free-form instructions that guide the Paladin's decisions. Optional; if omitted the Paladin is created without instructions. | [optional] + +## Example + +```python +from opal_security.models.create_paladin_info import CreatePaladinInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of CreatePaladinInfo from a JSON string +create_paladin_info_instance = CreatePaladinInfo.from_json(json) +# print the JSON string representation of the object +print(CreatePaladinInfo.to_json()) + +# convert the object into a dict +create_paladin_info_dict = create_paladin_info_instance.to_dict() +# create an instance of CreatePaladinInfo from a dict +create_paladin_info_from_dict = CreatePaladinInfo.from_dict(create_paladin_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateRequestCommentRequest.md b/docs/CreateRequestCommentRequest.md index ff7517b..6aacc1d 100644 --- a/docs/CreateRequestCommentRequest.md +++ b/docs/CreateRequestCommentRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**acting_user_id** | **UUID** | Comment as this Opal user instead of the caller. Only for service users an admin has allowed to act for users, in organizations with the feature enabled. The user must be active in the identity provider and be the request's requester, target or initiated_by user, an admin, or a reviewer who can act on or has acted on the request. | [optional] **comment** | **str** | comment | ## Example diff --git a/docs/CreateRequestInfo.md b/docs/CreateRequestInfo.md index 013a85a..3839371 100644 --- a/docs/CreateRequestInfo.md +++ b/docs/CreateRequestInfo.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **groups** | [**List[CreateRequestInfoGroupsInner]**](CreateRequestInfoGroupsInner.md) | | **target_user_id** | **UUID** | The ID of the user to be granted access. Should not be specified if target_group_id is specified. | [optional] **target_group_id** | **UUID** | The ID of the group the request is for. Should not be specified if target_user_id is specified. | [optional] +**initiated_by_user_id** | **UUID** | The ID of the user who asked for this access, for callers filing a request on someone else's behalf. Opal records this claim as given and does not verify it, so it never affects authorization, reviewer routing, or who may cancel the request; the authenticated caller remains the requester. Must be a user of your organization. Only accepted from a service user for which an Opal admin has enabled \"Let this service user record who asked for access\" under Settings on the service user's page; any other caller receives a 403 when this field is set. | [optional] **reason** | **str** | | **support_ticket** | [**CreateRequestInfoSupportTicket**](CreateRequestInfoSupportTicket.md) | | [optional] **duration_minutes** | **int** | The duration of the request in minutes. -1 represents an indefinite duration | diff --git a/docs/CreateRequestTemplateInfo.md b/docs/CreateRequestTemplateInfo.md new file mode 100644 index 0000000..73d7189 --- /dev/null +++ b/docs/CreateRequestTemplateInfo.md @@ -0,0 +1,31 @@ +# CreateRequestTemplateInfo + +Information for creating a request template. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the request template. | +**custom_fields** | [**List[RequestTemplateCustomFieldInput]**](RequestTemplateCustomFieldInput.md) | The fields to put on the template, in the order they are shown. | [optional] + +## Example + +```python +from opal_security.models.create_request_template_info import CreateRequestTemplateInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateRequestTemplateInfo from a JSON string +create_request_template_info_instance = CreateRequestTemplateInfo.from_json(json) +# print the JSON string representation of the object +print(CreateRequestTemplateInfo.to_json()) + +# convert the object into a dict +create_request_template_info_dict = create_request_template_info_instance.to_dict() +# create an instance of CreateRequestTemplateInfo from a dict +create_request_template_info_from_dict = CreateRequestTemplateInfo.from_dict(create_request_template_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateResourceCustomAccessLevelInfo.md b/docs/CreateResourceCustomAccessLevelInfo.md new file mode 100644 index 0000000..2bbdfd6 --- /dev/null +++ b/docs/CreateResourceCustomAccessLevelInfo.md @@ -0,0 +1,33 @@ +# CreateResourceCustomAccessLevelInfo + +Info for creating a custom access level. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | | +**policy** | **str** | The policy document. | [optional] +**requestable_by_default** | **bool** | Whether the role is requestable. Defaults to false. | [optional] +**stackable_sensitivity_index** | **int** | The sensitivity index. Null to leave unranked. | [optional] + +## Example + +```python +from opal_security.models.create_resource_custom_access_level_info import CreateResourceCustomAccessLevelInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateResourceCustomAccessLevelInfo from a JSON string +create_resource_custom_access_level_info_instance = CreateResourceCustomAccessLevelInfo.from_json(json) +# print the JSON string representation of the object +print(CreateResourceCustomAccessLevelInfo.to_json()) + +# convert the object into a dict +create_resource_custom_access_level_info_dict = create_resource_custom_access_level_info_instance.to_dict() +# create an instance of CreateResourceCustomAccessLevelInfo from a dict +create_resource_custom_access_level_info_from_dict = CreateResourceCustomAccessLevelInfo.from_dict(create_resource_custom_access_level_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateResourceInfo.md b/docs/CreateResourceInfo.md index 6d0e662..bf92f90 100644 --- a/docs/CreateResourceInfo.md +++ b/docs/CreateResourceInfo.md @@ -14,7 +14,11 @@ Name | Type | Description | Notes **remote_resource_id** | **str** | Deprecated - use remote_info instead. The ID of the resource on the remote system. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field. | [optional] **metadata** | **str** | Deprecated - use remote_info instead. JSON metadata about the remote resource. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field. The required format is dependent on resource_type and should have the following schema: <style type=\"text/css\"> code {max-height:300px !important} </style> ```json { \"$schema\": \"http://json-schema.org/draft-04/schema#\", \"title\": \"Resource Metadata\", \"properties\": { \"aws_ec2_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"region\": { \"type\": \"string\" } }, \"required\": [\"instance_id\", \"region\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS EC2 Instance\" }, \"aws_eks_cluster\": { \"properties\": { \"cluster_name\": { \"type\": \"string\" }, \"cluster_region\": { \"type\": \"string\" }, \"cluster_arn\": { \"type\": \"string\" } }, \"required\": [\"cluster_name\", \"cluster_region\", \"cluster_arn\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS EKS Cluster\" }, \"aws_rds_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"engine\": { \"type\": \"string\" }, \"region\": { \"type\": \"string\" }, \"resource_id\": { \"type\": \"string\" }, \"database_name\": { \"type\": \"string\" } }, \"required\": [ \"instance_id\", \"engine\", \"region\", \"resource_id\", \"database_name\" ], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS RDS Instance\" }, \"aws_role\": { \"properties\": { \"arn\": { \"type\": \"string\" }, \"name\": { \"type\": \"string\" } }, \"required\": [\"arn\", \"name\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS Role\" }, \"gcp_bucket\": { \"properties\": { \"bucket_id\": { \"type\": \"string\" } }, \"required\": [\"bucket_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Bucket\" }, \"gcp_compute_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"project_id\": { \"type\": \"string\" }, \"zone\": { \"type\": \"string\" } }, \"required\": [\"instance_id\", \"project_id\", \"zone\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Compute Instance\" }, \"gcp_folder\": { \"properties\": { \"folder_id\": { \"type\": \"string\" } }, \"required\": [\"folder_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Folder\" }, \"gcp_gke_cluster\": { \"properties\": { \"cluster_name\": { \"type\": \"string\" } }, \"required\": [\"cluster_name\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP GKE Cluster\" }, \"gcp_project\": { \"properties\": { \"project_id\": { \"type\": \"string\" } }, \"required\": [\"project_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Project\" }, \"gcp_sql_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"project_id\": { \"type\": \"string\" } }, \"required\": [\"instance_id\", \"project_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP SQL Instance\" }, \"git_hub_repo\": { \"properties\": { \"org_name\": { \"type\": \"string\" }, \"repo_name\": { \"type\": \"string\" } }, \"required\": [\"org_name\", \"repo_name\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GitHub Repo\" }, \"okta_directory_app\": { \"properties\": { \"app_id\": { \"type\": \"string\" }, \"logo_url\": { \"type\": \"string\" } }, \"required\": [\"app_id\", \"logo_url\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Okta Directory App\" }, \"okta_directory_role\": { \"properties\": { \"role_type\": { \"type\": \"string\" }, \"role_id\": { \"type\": \"string\" } }, \"required\": [\"role_type\", \"role_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Okta Directory Role\" }, \"salesforce_profile\": { \"properties\": { \"user_license\": { \"type\": \"string\" } }, \"required\": [\"user_license\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Salesforce Profile\" } }, \"additionalProperties\": false, \"minProperties\": 1, \"maxProperties\": 1, \"type\": \"object\" } ``` | [optional] **custom_request_notification** | **str** | Custom request notification sent upon request approval. | [optional] +**max_direct_users_allowed** | **int** | The maximum number of direct users allowed for this resource at once. Set to null to remove the limit. | [optional] **risk_sensitivity_override** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | | [optional] +**match_remote_name** | **bool** | A bool representing whether or not the resource's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. Defaults to false. | [optional] +**match_remote_description** | **bool** | A bool representing whether or not the resource's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. Defaults to false. | [optional] +**requires_forfeit_reason** | **bool** | A bool representing whether or not a reason is required when forfeiting access to this resource. | [optional] ## Example diff --git a/docs/CreateServiceUserRequest.md b/docs/CreateServiceUserRequest.md new file mode 100644 index 0000000..db44f8b --- /dev/null +++ b/docs/CreateServiceUserRequest.md @@ -0,0 +1,31 @@ +# CreateServiceUserRequest + +Request body for `POST /service-users`. Intentionally minimal: only the two fields that uniquely identify a new service user. Role grants are a separate resource managed through `/role-assignments`, which keeps each grant independently addressable and avoids silent drift when grants are added or revoked through another code path. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The display name of the service user. | +**owner_id** | **UUID** | The ID of the owner (team of record) that owns the service user. Must reference an existing owner in the caller's organization. | + +## Example + +```python +from opal_security.models.create_service_user_request import CreateServiceUserRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateServiceUserRequest from a JSON string +create_service_user_request_instance = CreateServiceUserRequest.from_json(json) +# print the JSON string representation of the object +print(CreateServiceUserRequest.to_json()) + +# convert the object into a dict +create_service_user_request_dict = create_service_user_request_instance.to_dict() +# create an instance of CreateServiceUserRequest from a dict +create_service_user_request_from_dict = CreateServiceUserRequest.from_dict(create_service_user_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateTokenInfo.md b/docs/CreateTokenInfo.md new file mode 100644 index 0000000..dc763db --- /dev/null +++ b/docs/CreateTokenInfo.md @@ -0,0 +1,33 @@ +# CreateTokenInfo + +Information needed to create a first-party API token. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token_label** | **str** | A human-readable label for the token. | +**access_level** | [**ApiAccessLevelEnum**](ApiAccessLevelEnum.md) | | +**user_id** | **UUID** | The ID of the user the token should authenticate as. Omit or set to the caller's ID to create a personal token. Set to a service user's ID to mint a token for that service user. | [optional] +**expires_at** | **datetime** | Optional expiration time for the token. | [optional] + +## Example + +```python +from opal_security.models.create_token_info import CreateTokenInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTokenInfo from a JSON string +create_token_info_instance = CreateTokenInfo.from_json(json) +# print the JSON string representation of the object +print(CreateTokenInfo.to_json()) + +# convert the object into a dict +create_token_info_dict = create_token_info_instance.to_dict() +# create an instance of CreateTokenInfo from a dict +create_token_info_from_dict = CreateTokenInfo.from_dict(create_token_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateTokenResponse.md b/docs/CreateTokenResponse.md new file mode 100644 index 0000000..7ff56af --- /dev/null +++ b/docs/CreateTokenResponse.md @@ -0,0 +1,31 @@ +# CreateTokenResponse + +The created API token. `signed_token` is the secret credential and is only returned once at creation time. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | [**Token**](Token.md) | | +**signed_token** | **str** | The secret token string. Store this securely; it is only returned once at creation time. | + +## Example + +```python +from opal_security.models.create_token_response import CreateTokenResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTokenResponse from a JSON string +create_token_response_instance = CreateTokenResponse.from_json(json) +# print the JSON string representation of the object +print(CreateTokenResponse.to_json()) + +# convert the object into a dict +create_token_response_dict = create_token_response_instance.to_dict() +# create an instance of CreateTokenResponse from a dict +create_token_response_from_dict = CreateTokenResponse.from_dict(create_token_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CustomConnectorAppConfig.md b/docs/CustomConnectorAppConfig.md new file mode 100644 index 0000000..a0e4ebd --- /dev/null +++ b/docs/CustomConnectorAppConfig.md @@ -0,0 +1,39 @@ +# CustomConnectorAppConfig + +Configuration for a Custom Connector app. Does not include the signing secret; secrets are write-only and never returned by the API. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | The identifier of the Custom Connector. | +**base_url** | **str** | The base URL of the Custom Connector. | +**tls_mode** | **bool** | Whether TLS verification is enabled for the Custom Connector. | +**tls_ca_cert_content** | **str** | Optional PEM-encoded CA certificate content for TLS. | [optional] +**supports_groups** | **bool** | Whether the Custom Connector supports groups. | +**supports_nested_resources** | **bool** | Whether the Custom Connector supports nested resources. | +**supports_nested_groups** | **bool** | Whether the Custom Connector supports nested groups. | +**supports_event_ingestion** | **bool** | Whether the Custom Connector supports event ingestion. | +**supports_idp** | **bool** | Whether the Custom Connector can be connected as an upstream user directory. | +**idp_protocol** | [**CustomConnectorIdpProtocolEnum**](CustomConnectorIdpProtocolEnum.md) | | + +## Example + +```python +from opal_security.models.custom_connector_app_config import CustomConnectorAppConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomConnectorAppConfig from a JSON string +custom_connector_app_config_instance = CustomConnectorAppConfig.from_json(json) +# print the JSON string representation of the object +print(CustomConnectorAppConfig.to_json()) + +# convert the object into a dict +custom_connector_app_config_dict = custom_connector_app_config_instance.to_dict() +# create an instance of CustomConnectorAppConfig from a dict +custom_connector_app_config_from_dict = CustomConnectorAppConfig.from_dict(custom_connector_app_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CustomConnectorIdpProtocolEnum.md b/docs/CustomConnectorIdpProtocolEnum.md new file mode 100644 index 0000000..6f133f3 --- /dev/null +++ b/docs/CustomConnectorIdpProtocolEnum.md @@ -0,0 +1,13 @@ +# CustomConnectorIdpProtocolEnum + +How Opal reads users from the Custom Connector when it is an upstream directory: `OPAL` for Opal's custom connector API, or `SCIM` for a SCIM 2.0 server, authenticated with the signing secret as a bearer token. Defaults to `OPAL`. + +## Enum + +* `OPAL` (value: `'OPAL'`) + +* `SCIM` (value: `'SCIM'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DenyRequestRequest.md b/docs/DenyRequestRequest.md index 4a87b6a..6469f9a 100644 --- a/docs/DenyRequestRequest.md +++ b/docs/DenyRequestRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**acting_user_id** | **UUID** | Deny as this Opal user instead of the caller. Only for service users an admin has allowed to act for users, in organizations with the feature enabled. The user must be active in the identity provider and be a reviewer on the request's current stage and not the request's target; the decision counts as theirs. ADMIN level is rejected. | [optional] **comment** | **str** | Comment for the denial | **level** | [**RequestApprovalEnum**](RequestApprovalEnum.md) | | [optional] diff --git a/docs/EntityAdminFilter.md b/docs/EntityAdminFilter.md new file mode 100644 index 0000000..9f7931d --- /dev/null +++ b/docs/EntityAdminFilter.md @@ -0,0 +1,31 @@ +# EntityAdminFilter + +Filters GROUP and RESOURCE entities by their admin owner. USER entities never match, in either polarity. `not` inverts the match within the resource/group domain (self-negating, like IdpStatusFilter): omit it (or false) to include entities owned by the given owners, set it true to exclude them. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**owner_ids** | **List[UUID]** | The owner (group) UUIDs to match entities against. | +**var_not** | **bool** | Invert the match — return resources/groups NOT owned by the given owners. | [optional] + +## Example + +```python +from opal_security.models.entity_admin_filter import EntityAdminFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of EntityAdminFilter from a JSON string +entity_admin_filter_instance = EntityAdminFilter.from_json(json) +# print the JSON string representation of the object +print(EntityAdminFilter.to_json()) + +# convert the object into a dict +entity_admin_filter_dict = entity_admin_filter_instance.to_dict() +# create an instance of EntityAdminFilter from a dict +entity_admin_filter_from_dict = EntityAdminFilter.from_dict(entity_admin_filter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EntityDescriptionFilter.md b/docs/EntityDescriptionFilter.md new file mode 100644 index 0000000..7682f93 --- /dev/null +++ b/docs/EntityDescriptionFilter.md @@ -0,0 +1,31 @@ +# EntityDescriptionFilter + +Filters GROUP and RESOURCE entities by a case-insensitive substring of their description (\"contains\"). USER entities have no description and never match, in either polarity. `not` inverts the match within the resource/group domain (\"does NOT contain\"), so it still returns only resources/groups rather than sweeping in users. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**string** | **str** | The substring to match against the entity description. | +**var_not** | **bool** | Invert the match — return resources/groups whose description does NOT contain the substring. | [optional] + +## Example + +```python +from opal_security.models.entity_description_filter import EntityDescriptionFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of EntityDescriptionFilter from a JSON string +entity_description_filter_instance = EntityDescriptionFilter.from_json(json) +# print the JSON string representation of the object +print(EntityDescriptionFilter.to_json()) + +# convert the object into a dict +entity_description_filter_dict = entity_description_filter_instance.to_dict() +# create an instance of EntityDescriptionFilter from a dict +entity_description_filter_from_dict = EntityDescriptionFilter.from_dict(entity_description_filter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EntityItemTypeEnum.md b/docs/EntityItemTypeEnum.md index 63e8d34..93b0661 100644 --- a/docs/EntityItemTypeEnum.md +++ b/docs/EntityItemTypeEnum.md @@ -68,6 +68,12 @@ Granular subtype of an entity. * `AWS_SSO_PERMISSION_SET` (value: `'AWS_SSO_PERMISSION_SET'`) +* `AWS_AGENTCORE_GATEWAY` (value: `'AWS_AGENTCORE_GATEWAY'`) + +* `AWS_AGENTCORE_GATEWAY_TARGET` (value: `'AWS_AGENTCORE_GATEWAY_TARGET'`) + +* `AWS_AGENTCORE_GATEWAY_TOOL` (value: `'AWS_AGENTCORE_GATEWAY_TOOL'`) + * `AZURE_MANAGEMENT_GROUP` (value: `'AZURE_MANAGEMENT_GROUP'`) * `AZURE_RESOURCE_GROUP` (value: `'AZURE_RESOURCE_GROUP'`) @@ -120,6 +126,8 @@ Granular subtype of an entity. * `GCP_SERVICE_ACCOUNT` (value: `'GCP_SERVICE_ACCOUNT'`) +* `GCP_BILLING_ACCOUNT` (value: `'GCP_BILLING_ACCOUNT'`) + * `GIT_HUB_REPO` (value: `'GIT_HUB_REPO'`) * `GIT_HUB_ORG_ROLE` (value: `'GIT_HUB_ORG_ROLE'`) @@ -172,6 +180,20 @@ Granular subtype of an entity. * `ILEVEL_ADVANCED_ROLE` (value: `'ILEVEL_ADVANCED_ROLE'`) +* `DATABRICKS_CATALOG` (value: `'DATABRICKS_CATALOG'`) + +* `DATABRICKS_SCHEMA` (value: `'DATABRICKS_SCHEMA'`) + +* `DATABRICKS_VOLUME` (value: `'DATABRICKS_VOLUME'`) + +* `DATABRICKS_FUNCTION` (value: `'DATABRICKS_FUNCTION'`) + +* `DATABRICKS_MODEL` (value: `'DATABRICKS_MODEL'`) + +* `DATABRICKS_SERVICE` (value: `'DATABRICKS_SERVICE'`) + +* `DATABRICKS_MCP_SERVER` (value: `'DATABRICKS_MCP_SERVER'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EntityTagFilter.md b/docs/EntityTagFilter.md index f481abb..7e0fbf0 100644 --- a/docs/EntityTagFilter.md +++ b/docs/EntityTagFilter.md @@ -7,7 +7,7 @@ Filters entities by a tag key/value pair, optionally scoped to a connection. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **key** | **str** | The tag key to filter by. | -**value** | **str** | The tag value to filter by. If omitted, matches any value for the given key. | [optional] +**value** | **str** | The tag value to filter by. If omitted, matches only tags with no value; use entityTagKey to match any value for a key. | [optional] **connection_id** | **UUID** | If specified, filters by tags associated with this connection. | [optional] ## Example diff --git a/docs/EntityTagKeyFilter.md b/docs/EntityTagKeyFilter.md new file mode 100644 index 0000000..a26c9a1 --- /dev/null +++ b/docs/EntityTagKeyFilter.md @@ -0,0 +1,30 @@ +# EntityTagKeyFilter + +Filters entities that have a tag whose key is one of `keys`, whatever its value (including no value). Keys match exactly and case-sensitively. An empty list matches nothing. AGENT entities carry no tags, so they never match; under `not`, every agent matches, as with entityTag. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**keys** | **List[str]** | The tag keys to match. | + +## Example + +```python +from opal_security.models.entity_tag_key_filter import EntityTagKeyFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of EntityTagKeyFilter from a JSON string +entity_tag_key_filter_instance = EntityTagKeyFilter.from_json(json) +# print the JSON string representation of the object +print(EntityTagKeyFilter.to_json()) + +# convert the object into a dict +entity_tag_key_filter_dict = entity_tag_key_filter_instance.to_dict() +# create an instance of EntityTagKeyFilter from a dict +entity_tag_key_filter_from_dict = EntityTagKeyFilter.from_dict(entity_tag_key_filter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EscalateRequest200Response.md b/docs/EscalateRequest200Response.md new file mode 100644 index 0000000..05c24f0 --- /dev/null +++ b/docs/EscalateRequest200Response.md @@ -0,0 +1,29 @@ +# EscalateRequest200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | + +## Example + +```python +from opal_security.models.escalate_request200_response import EscalateRequest200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of EscalateRequest200Response from a JSON string +escalate_request200_response_instance = EscalateRequest200Response.from_json(json) +# print the JSON string representation of the object +print(EscalateRequest200Response.to_json()) + +# convert the object into a dict +escalate_request200_response_dict = escalate_request200_response_instance.to_dict() +# create an instance of EscalateRequest200Response from a dict +escalate_request200_response_from_dict = EscalateRequest200Response.from_dict(escalate_request200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Group.md b/docs/Group.md index 45928d5..bef4e99 100644 --- a/docs/Group.md +++ b/docs/Group.md @@ -21,19 +21,23 @@ Name | Type | Description | Notes **require_manager_approval** | **bool** | A bool representing whether or not access requests to the group require manager approval. | [optional] **require_support_ticket** | **bool** | A bool representing whether or not access requests to the group require an access ticket. | [optional] **require_mfa_to_approve** | **bool** | A bool representing whether or not to require MFA for reviewers to approve requests for this group. | [optional] +**requires_forfeit_reason** | **bool** | A bool representing whether or not a reason is required when forfeiting access to this group. | [optional] **require_mfa_to_request** | **bool** | A bool representing whether or not to require MFA for requesting access to this group. | [optional] **auto_approval** | **bool** | A bool representing whether or not to automatically approve requests to this group. | [optional] **request_template_id** | **UUID** | The ID of the associated request template. | [optional] **configuration_template_id** | **UUID** | The ID of the associated configuration template. | [optional] **group_binding_id** | **UUID** | The ID of the associated group binding. | [optional] -**is_requestable** | **bool** | A bool representing whether or not to allow access requests to this group. | [optional] +**is_requestable** | **bool** | A bool representing whether or not to allow access requests to this group. Deprecated in favor of `request_configurations`. | [optional] **request_configurations** | [**List[RequestConfiguration]**](RequestConfiguration.md) | A list of request configurations for this group. | [optional] **request_configuration_list** | [**List[RequestConfiguration]**](RequestConfiguration.md) | A list of request configurations for this group. Deprecated in favor of `request_configurations`. | [optional] **metadata** | **str** | JSON metadata about the remote group. Only set for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details. | [optional] **remote_info** | [**GroupRemoteInfo**](GroupRemoteInfo.md) | | [optional] **custom_request_notification** | **str** | Custom request notification sent to the requester when the request is approved. | [optional] +**max_direct_users_allowed** | **int** | The maximum number of direct users allowed for this group at once. Set to null to remove the limit. | [optional] **risk_sensitivity** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | The risk sensitivity level for the group. When an override is set, this field will match that. | [optional] [readonly] **risk_sensitivity_override** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | | [optional] +**match_remote_name** | **bool** | A bool representing whether or not the group's name is synced from the end system. When true, the name is overwritten with the remote name on each sync. Defaults to false. | [optional] +**match_remote_description** | **bool** | A bool representing whether or not the group's description is synced from the end system. When true, the description is overwritten with the remote description on each sync. Defaults to false. | [optional] **last_successful_sync** | [**SyncTask**](SyncTask.md) | Information about the last successful sync of this group. | [optional] [readonly] ## Example diff --git a/docs/GroupAccessLevelList.md b/docs/GroupAccessLevelList.md new file mode 100644 index 0000000..15b4f3a --- /dev/null +++ b/docs/GroupAccessLevelList.md @@ -0,0 +1,30 @@ +# GroupAccessLevelList + +A list of access levels defined for a group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[GroupAccessLevel]**](GroupAccessLevel.md) | | [optional] + +## Example + +```python +from opal_security.models.group_access_level_list import GroupAccessLevelList + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupAccessLevelList from a JSON string +group_access_level_list_instance = GroupAccessLevelList.from_json(json) +# print the JSON string representation of the object +print(GroupAccessLevelList.to_json()) + +# convert the object into a dict +group_access_level_list_dict = group_access_level_list_instance.to_dict() +# create an instance of GroupAccessLevelList from a dict +group_access_level_list_from_dict = GroupAccessLevelList.from_dict(group_access_level_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupConfigurationTemplate.md b/docs/GroupConfigurationTemplate.md new file mode 100644 index 0000000..ad47c64 --- /dev/null +++ b/docs/GroupConfigurationTemplate.md @@ -0,0 +1,30 @@ +# GroupConfigurationTemplate + +A reference, by ID only, to the configuration template a group is linked to. This schema does not include any of the template's own fields (name, description, request configurations, visibility, etc.) — to read or modify those, use the `/configuration-templates` endpoints with the ID carried here. A `null` `configuration_template_id` indicates that the group is not linked to a configuration template and uses its own private configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**configuration_template_id** | **UUID** | The ID of the configuration template that the group is linked to, or `null` if the group is not linked to a configuration template. Only the ID is exposed here; the template's own fields are managed through the `/configuration-templates` endpoints. | + +## Example + +```python +from opal_security.models.group_configuration_template import GroupConfigurationTemplate + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupConfigurationTemplate from a JSON string +group_configuration_template_instance = GroupConfigurationTemplate.from_json(json) +# print the JSON string representation of the object +print(GroupConfigurationTemplate.to_json()) + +# convert the object into a dict +group_configuration_template_dict = group_configuration_template_instance.to_dict() +# create an instance of GroupConfigurationTemplate from a dict +group_configuration_template_from_dict = GroupConfigurationTemplate.from_dict(group_configuration_template_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupMemberGroup.md b/docs/GroupMemberGroup.md new file mode 100644 index 0000000..d79ca29 --- /dev/null +++ b/docs/GroupMemberGroup.md @@ -0,0 +1,30 @@ +# GroupMemberGroup + +# GroupMemberGroup Object ### Description The `GroupMemberGroup` object is used to represent a group that is nested directly in another group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**member_group_id** | **UUID** | The ID of the member group. | + +## Example + +```python +from opal_security.models.group_member_group import GroupMemberGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupMemberGroup from a JSON string +group_member_group_instance = GroupMemberGroup.from_json(json) +# print the JSON string representation of the object +print(GroupMemberGroup.to_json()) + +# convert the object into a dict +group_member_group_dict = group_member_group_instance.to_dict() +# create an instance of GroupMemberGroup from a dict +group_member_group_from_dict = GroupMemberGroup.from_dict(group_member_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupMemberGroupList.md b/docs/GroupMemberGroupList.md new file mode 100644 index 0000000..d11a558 --- /dev/null +++ b/docs/GroupMemberGroupList.md @@ -0,0 +1,29 @@ +# GroupMemberGroupList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**member_groups** | [**List[GroupMemberGroup]**](GroupMemberGroup.md) | | + +## Example + +```python +from opal_security.models.group_member_group_list import GroupMemberGroupList + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupMemberGroupList from a JSON string +group_member_group_list_instance = GroupMemberGroupList.from_json(json) +# print the JSON string representation of the object +print(GroupMemberGroupList.to_json()) + +# convert the object into a dict +group_member_group_list_dict = group_member_group_list_instance.to_dict() +# create an instance of GroupMemberGroupList from a dict +group_member_group_list_from_dict = GroupMemberGroupList.from_dict(group_member_group_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfo.md b/docs/GroupRemoteInfo.md index d96154d..c40d4f1 100644 --- a/docs/GroupRemoteInfo.md +++ b/docs/GroupRemoteInfo.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active_directory_group** | [**GroupRemoteInfoActiveDirectoryGroup**](GroupRemoteInfoActiveDirectoryGroup.md) | | [optional] **tailscale_group** | [**GroupRemoteInfoTailscaleGroup**](GroupRemoteInfoTailscaleGroup.md) | | [optional] +**cursor_group** | [**GroupRemoteInfoCursorGroup**](GroupRemoteInfoCursorGroup.md) | | [optional] **twingate_group** | [**GroupRemoteInfoTwingateGroup**](GroupRemoteInfoTwingateGroup.md) | | [optional] **twingate_group_synced** | [**GroupRemoteInfoTwingateGroupSynced**](GroupRemoteInfoTwingateGroupSynced.md) | | [optional] **aws_sso_group** | [**GroupRemoteInfoAwsSsoGroup**](GroupRemoteInfoAwsSsoGroup.md) | | [optional] @@ -28,6 +29,7 @@ Name | Type | Description | Notes **pagerduty_on_call_schedule** | [**GroupRemoteInfoPagerdutyOnCallSchedule**](GroupRemoteInfoPagerdutyOnCallSchedule.md) | | [optional] **incidentio_on_call_schedule** | [**GroupRemoteInfoIncidentioOnCallSchedule**](GroupRemoteInfoIncidentioOnCallSchedule.md) | | [optional] **rootly_on_call_schedule** | [**GroupRemoteInfoRootlyOnCallSchedule**](GroupRemoteInfoRootlyOnCallSchedule.md) | | [optional] +**datadog_on_call_schedule** | [**GroupRemoteInfoDatadogOnCallSchedule**](GroupRemoteInfoDatadogOnCallSchedule.md) | | [optional] **devin_group** | [**GroupRemoteInfoDevinGroup**](GroupRemoteInfoDevinGroup.md) | | [optional] **clickhouse_role** | [**GroupRemoteInfoClickhouseRole**](GroupRemoteInfoClickhouseRole.md) | | [optional] **grafana_team** | [**GroupRemoteInfoGrafanaTeam**](GroupRemoteInfoGrafanaTeam.md) | | [optional] @@ -35,6 +37,29 @@ Name | Type | Description | Notes **slack_user_group** | [**GroupRemoteInfoSlackUserGroup**](GroupRemoteInfoSlackUserGroup.md) | | [optional] **zendesk_organization** | [**GroupRemoteInfoZendeskOrganization**](GroupRemoteInfoZendeskOrganization.md) | | [optional] **hubspot_team** | [**GroupRemoteInfoHubspotTeam**](GroupRemoteInfoHubspotTeam.md) | | [optional] +**tableau_group** | [**GroupRemoteInfoTableauGroup**](GroupRemoteInfoTableauGroup.md) | | [optional] +**confluence_group** | [**GroupRemoteInfoConfluenceGroup**](GroupRemoteInfoConfluenceGroup.md) | | [optional] +**jira_group** | [**GroupRemoteInfoJiraGroup**](GroupRemoteInfoJiraGroup.md) | | [optional] +**docusign_group** | [**GroupRemoteInfoDocusignGroup**](GroupRemoteInfoDocusignGroup.md) | | [optional] +**zoom_group** | [**GroupRemoteInfoZoomGroup**](GroupRemoteInfoZoomGroup.md) | | [optional] +**ramp_department** | [**GroupRemoteInfoRampDepartment**](GroupRemoteInfoRampDepartment.md) | | [optional] +**ramp_location** | [**GroupRemoteInfoRampLocation**](GroupRemoteInfoRampLocation.md) | | [optional] +**wrike_group** | [**GroupRemoteInfoWrikeGroup**](GroupRemoteInfoWrikeGroup.md) | | [optional] +**axiom_group** | [**GroupRemoteInfoAxiomGroup**](GroupRemoteInfoAxiomGroup.md) | | [optional] +**docusign_signing_group** | [**GroupRemoteInfoDocusignSigningGroup**](GroupRemoteInfoDocusignSigningGroup.md) | | [optional] +**linear_team** | [**GroupRemoteInfoLinearTeam**](GroupRemoteInfoLinearTeam.md) | | [optional] +**box_group** | [**GroupRemoteInfoBoxGroup**](GroupRemoteInfoBoxGroup.md) | | [optional] +**activecampaign_group** | [**GroupRemoteInfoActivecampaignGroup**](GroupRemoteInfoActivecampaignGroup.md) | | [optional] +**aha_team** | [**GroupRemoteInfoAhaTeam**](GroupRemoteInfoAhaTeam.md) | | [optional] +**asana_team** | [**GroupRemoteInfoAsanaTeam**](GroupRemoteInfoAsanaTeam.md) | | [optional] +**bitwarden_group** | [**GroupRemoteInfoBitwardenGroup**](GroupRemoteInfoBitwardenGroup.md) | | [optional] +**calendly_group** | [**GroupRemoteInfoCalendlyGroup**](GroupRemoteInfoCalendlyGroup.md) | | [optional] +**onelogin_role** | [**GroupRemoteInfoOneloginRole**](GroupRemoteInfoOneloginRole.md) | | [optional] +**onelogin_group** | [**GroupRemoteInfoOneloginGroup**](GroupRemoteInfoOneloginGroup.md) | | [optional] +**square_location** | [**GroupRemoteInfoSquareLocation**](GroupRemoteInfoSquareLocation.md) | | [optional] +**square_job** | [**GroupRemoteInfoSquareJob**](GroupRemoteInfoSquareJob.md) | | [optional] +**rippling_team** | [**GroupRemoteInfoRipplingTeam**](GroupRemoteInfoRipplingTeam.md) | | [optional] +**rippling_supergroup** | [**GroupRemoteInfoRipplingSupergroup**](GroupRemoteInfoRipplingSupergroup.md) | | [optional] ## Example diff --git a/docs/GroupRemoteInfoActivecampaignGroup.md b/docs/GroupRemoteInfoActivecampaignGroup.md new file mode 100644 index 0000000..b9801ca --- /dev/null +++ b/docs/GroupRemoteInfoActivecampaignGroup.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoActivecampaignGroup + +Remote info for ActiveCampaign Group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The group id of the ActiveCampaign Group. | + +## Example + +```python +from opal_security.models.group_remote_info_activecampaign_group import GroupRemoteInfoActivecampaignGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoActivecampaignGroup from a JSON string +group_remote_info_activecampaign_group_instance = GroupRemoteInfoActivecampaignGroup.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoActivecampaignGroup.to_json()) + +# convert the object into a dict +group_remote_info_activecampaign_group_dict = group_remote_info_activecampaign_group_instance.to_dict() +# create an instance of GroupRemoteInfoActivecampaignGroup from a dict +group_remote_info_activecampaign_group_from_dict = GroupRemoteInfoActivecampaignGroup.from_dict(group_remote_info_activecampaign_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoAhaTeam.md b/docs/GroupRemoteInfoAhaTeam.md new file mode 100644 index 0000000..ced0c99 --- /dev/null +++ b/docs/GroupRemoteInfoAhaTeam.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoAhaTeam + +Remote info for Aha Team. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The group id of the Aha Team. | + +## Example + +```python +from opal_security.models.group_remote_info_aha_team import GroupRemoteInfoAhaTeam + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoAhaTeam from a JSON string +group_remote_info_aha_team_instance = GroupRemoteInfoAhaTeam.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoAhaTeam.to_json()) + +# convert the object into a dict +group_remote_info_aha_team_dict = group_remote_info_aha_team_instance.to_dict() +# create an instance of GroupRemoteInfoAhaTeam from a dict +group_remote_info_aha_team_from_dict = GroupRemoteInfoAhaTeam.from_dict(group_remote_info_aha_team_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoAsanaTeam.md b/docs/GroupRemoteInfoAsanaTeam.md new file mode 100644 index 0000000..4b797c2 --- /dev/null +++ b/docs/GroupRemoteInfoAsanaTeam.md @@ -0,0 +1,31 @@ +# GroupRemoteInfoAsanaTeam + +Remote info for Asana Team. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**team_gid** | **str** | The team gid of the Asana Team. | +**workspace_gid** | **str** | The workspace gid of the Asana Team. | [optional] + +## Example + +```python +from opal_security.models.group_remote_info_asana_team import GroupRemoteInfoAsanaTeam + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoAsanaTeam from a JSON string +group_remote_info_asana_team_instance = GroupRemoteInfoAsanaTeam.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoAsanaTeam.to_json()) + +# convert the object into a dict +group_remote_info_asana_team_dict = group_remote_info_asana_team_instance.to_dict() +# create an instance of GroupRemoteInfoAsanaTeam from a dict +group_remote_info_asana_team_from_dict = GroupRemoteInfoAsanaTeam.from_dict(group_remote_info_asana_team_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoAxiomGroup.md b/docs/GroupRemoteInfoAxiomGroup.md new file mode 100644 index 0000000..316a15c --- /dev/null +++ b/docs/GroupRemoteInfoAxiomGroup.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoAxiomGroup + +Remote info for Axiom RBAC group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The ID of the Axiom group. | + +## Example + +```python +from opal_security.models.group_remote_info_axiom_group import GroupRemoteInfoAxiomGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoAxiomGroup from a JSON string +group_remote_info_axiom_group_instance = GroupRemoteInfoAxiomGroup.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoAxiomGroup.to_json()) + +# convert the object into a dict +group_remote_info_axiom_group_dict = group_remote_info_axiom_group_instance.to_dict() +# create an instance of GroupRemoteInfoAxiomGroup from a dict +group_remote_info_axiom_group_from_dict = GroupRemoteInfoAxiomGroup.from_dict(group_remote_info_axiom_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoBitwardenGroup.md b/docs/GroupRemoteInfoBitwardenGroup.md new file mode 100644 index 0000000..53bac6f --- /dev/null +++ b/docs/GroupRemoteInfoBitwardenGroup.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoBitwardenGroup + +Remote info for Bitwarden Group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The group id of the Bitwarden Group. | + +## Example + +```python +from opal_security.models.group_remote_info_bitwarden_group import GroupRemoteInfoBitwardenGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoBitwardenGroup from a JSON string +group_remote_info_bitwarden_group_instance = GroupRemoteInfoBitwardenGroup.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoBitwardenGroup.to_json()) + +# convert the object into a dict +group_remote_info_bitwarden_group_dict = group_remote_info_bitwarden_group_instance.to_dict() +# create an instance of GroupRemoteInfoBitwardenGroup from a dict +group_remote_info_bitwarden_group_from_dict = GroupRemoteInfoBitwardenGroup.from_dict(group_remote_info_bitwarden_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoBoxGroup.md b/docs/GroupRemoteInfoBoxGroup.md new file mode 100644 index 0000000..827a2ae --- /dev/null +++ b/docs/GroupRemoteInfoBoxGroup.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoBoxGroup + +Remote info for Box Group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The group id of the Box Group. | + +## Example + +```python +from opal_security.models.group_remote_info_box_group import GroupRemoteInfoBoxGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoBoxGroup from a JSON string +group_remote_info_box_group_instance = GroupRemoteInfoBoxGroup.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoBoxGroup.to_json()) + +# convert the object into a dict +group_remote_info_box_group_dict = group_remote_info_box_group_instance.to_dict() +# create an instance of GroupRemoteInfoBoxGroup from a dict +group_remote_info_box_group_from_dict = GroupRemoteInfoBoxGroup.from_dict(group_remote_info_box_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoCalendlyGroup.md b/docs/GroupRemoteInfoCalendlyGroup.md new file mode 100644 index 0000000..17fff04 --- /dev/null +++ b/docs/GroupRemoteInfoCalendlyGroup.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoCalendlyGroup + +Remote info for Calendly Group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The group id of the Calendly Group. | + +## Example + +```python +from opal_security.models.group_remote_info_calendly_group import GroupRemoteInfoCalendlyGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoCalendlyGroup from a JSON string +group_remote_info_calendly_group_instance = GroupRemoteInfoCalendlyGroup.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoCalendlyGroup.to_json()) + +# convert the object into a dict +group_remote_info_calendly_group_dict = group_remote_info_calendly_group_instance.to_dict() +# create an instance of GroupRemoteInfoCalendlyGroup from a dict +group_remote_info_calendly_group_from_dict = GroupRemoteInfoCalendlyGroup.from_dict(group_remote_info_calendly_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoConfluenceGroup.md b/docs/GroupRemoteInfoConfluenceGroup.md new file mode 100644 index 0000000..e9bff88 --- /dev/null +++ b/docs/GroupRemoteInfoConfluenceGroup.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoConfluenceGroup + +Remote info for Confluence group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The ID of the Confluence group. | + +## Example + +```python +from opal_security.models.group_remote_info_confluence_group import GroupRemoteInfoConfluenceGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoConfluenceGroup from a JSON string +group_remote_info_confluence_group_instance = GroupRemoteInfoConfluenceGroup.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoConfluenceGroup.to_json()) + +# convert the object into a dict +group_remote_info_confluence_group_dict = group_remote_info_confluence_group_instance.to_dict() +# create an instance of GroupRemoteInfoConfluenceGroup from a dict +group_remote_info_confluence_group_from_dict = GroupRemoteInfoConfluenceGroup.from_dict(group_remote_info_confluence_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoCursorGroup.md b/docs/GroupRemoteInfoCursorGroup.md new file mode 100644 index 0000000..1130871 --- /dev/null +++ b/docs/GroupRemoteInfoCursorGroup.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoCursorGroup + +Remote info for a Cursor group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The id of the Cursor group, or team:members / team:admins for the owning team's built-in groups. | + +## Example + +```python +from opal_security.models.group_remote_info_cursor_group import GroupRemoteInfoCursorGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoCursorGroup from a JSON string +group_remote_info_cursor_group_instance = GroupRemoteInfoCursorGroup.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoCursorGroup.to_json()) + +# convert the object into a dict +group_remote_info_cursor_group_dict = group_remote_info_cursor_group_instance.to_dict() +# create an instance of GroupRemoteInfoCursorGroup from a dict +group_remote_info_cursor_group_from_dict = GroupRemoteInfoCursorGroup.from_dict(group_remote_info_cursor_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoDatadogOnCallSchedule.md b/docs/GroupRemoteInfoDatadogOnCallSchedule.md new file mode 100644 index 0000000..cd2c6eb --- /dev/null +++ b/docs/GroupRemoteInfoDatadogOnCallSchedule.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoDatadogOnCallSchedule + +Remote info for Datadog on-call schedule group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**schedule_id** | **str** | The id of the Datadog on-call schedule. | + +## Example + +```python +from opal_security.models.group_remote_info_datadog_on_call_schedule import GroupRemoteInfoDatadogOnCallSchedule + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoDatadogOnCallSchedule from a JSON string +group_remote_info_datadog_on_call_schedule_instance = GroupRemoteInfoDatadogOnCallSchedule.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoDatadogOnCallSchedule.to_json()) + +# convert the object into a dict +group_remote_info_datadog_on_call_schedule_dict = group_remote_info_datadog_on_call_schedule_instance.to_dict() +# create an instance of GroupRemoteInfoDatadogOnCallSchedule from a dict +group_remote_info_datadog_on_call_schedule_from_dict = GroupRemoteInfoDatadogOnCallSchedule.from_dict(group_remote_info_datadog_on_call_schedule_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoDocusignGroup.md b/docs/GroupRemoteInfoDocusignGroup.md new file mode 100644 index 0000000..23131d4 --- /dev/null +++ b/docs/GroupRemoteInfoDocusignGroup.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoDocusignGroup + +Remote info for Docusign group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The ID of the Docusign group. | + +## Example + +```python +from opal_security.models.group_remote_info_docusign_group import GroupRemoteInfoDocusignGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoDocusignGroup from a JSON string +group_remote_info_docusign_group_instance = GroupRemoteInfoDocusignGroup.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoDocusignGroup.to_json()) + +# convert the object into a dict +group_remote_info_docusign_group_dict = group_remote_info_docusign_group_instance.to_dict() +# create an instance of GroupRemoteInfoDocusignGroup from a dict +group_remote_info_docusign_group_from_dict = GroupRemoteInfoDocusignGroup.from_dict(group_remote_info_docusign_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoDocusignSigningGroup.md b/docs/GroupRemoteInfoDocusignSigningGroup.md new file mode 100644 index 0000000..b2d7442 --- /dev/null +++ b/docs/GroupRemoteInfoDocusignSigningGroup.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoDocusignSigningGroup + +Remote info for Docusign signing group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**signing_group_id** | **str** | The ID of the Docusign signing group. | + +## Example + +```python +from opal_security.models.group_remote_info_docusign_signing_group import GroupRemoteInfoDocusignSigningGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoDocusignSigningGroup from a JSON string +group_remote_info_docusign_signing_group_instance = GroupRemoteInfoDocusignSigningGroup.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoDocusignSigningGroup.to_json()) + +# convert the object into a dict +group_remote_info_docusign_signing_group_dict = group_remote_info_docusign_signing_group_instance.to_dict() +# create an instance of GroupRemoteInfoDocusignSigningGroup from a dict +group_remote_info_docusign_signing_group_from_dict = GroupRemoteInfoDocusignSigningGroup.from_dict(group_remote_info_docusign_signing_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoJiraGroup.md b/docs/GroupRemoteInfoJiraGroup.md new file mode 100644 index 0000000..50d171d --- /dev/null +++ b/docs/GroupRemoteInfoJiraGroup.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoJiraGroup + +Remote info for Jira group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The ID of the Jira group. | + +## Example + +```python +from opal_security.models.group_remote_info_jira_group import GroupRemoteInfoJiraGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoJiraGroup from a JSON string +group_remote_info_jira_group_instance = GroupRemoteInfoJiraGroup.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoJiraGroup.to_json()) + +# convert the object into a dict +group_remote_info_jira_group_dict = group_remote_info_jira_group_instance.to_dict() +# create an instance of GroupRemoteInfoJiraGroup from a dict +group_remote_info_jira_group_from_dict = GroupRemoteInfoJiraGroup.from_dict(group_remote_info_jira_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoLinearTeam.md b/docs/GroupRemoteInfoLinearTeam.md new file mode 100644 index 0000000..59fba72 --- /dev/null +++ b/docs/GroupRemoteInfoLinearTeam.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoLinearTeam + +Remote info for Linear team. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**team_id** | **str** | The ID of the Linear team. | + +## Example + +```python +from opal_security.models.group_remote_info_linear_team import GroupRemoteInfoLinearTeam + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoLinearTeam from a JSON string +group_remote_info_linear_team_instance = GroupRemoteInfoLinearTeam.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoLinearTeam.to_json()) + +# convert the object into a dict +group_remote_info_linear_team_dict = group_remote_info_linear_team_instance.to_dict() +# create an instance of GroupRemoteInfoLinearTeam from a dict +group_remote_info_linear_team_from_dict = GroupRemoteInfoLinearTeam.from_dict(group_remote_info_linear_team_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoOneloginGroup.md b/docs/GroupRemoteInfoOneloginGroup.md new file mode 100644 index 0000000..83d96dd --- /dev/null +++ b/docs/GroupRemoteInfoOneloginGroup.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoOneloginGroup + +Remote info for OneLogin Group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The group id of the OneLogin Group. | + +## Example + +```python +from opal_security.models.group_remote_info_onelogin_group import GroupRemoteInfoOneloginGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoOneloginGroup from a JSON string +group_remote_info_onelogin_group_instance = GroupRemoteInfoOneloginGroup.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoOneloginGroup.to_json()) + +# convert the object into a dict +group_remote_info_onelogin_group_dict = group_remote_info_onelogin_group_instance.to_dict() +# create an instance of GroupRemoteInfoOneloginGroup from a dict +group_remote_info_onelogin_group_from_dict = GroupRemoteInfoOneloginGroup.from_dict(group_remote_info_onelogin_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoOneloginRole.md b/docs/GroupRemoteInfoOneloginRole.md new file mode 100644 index 0000000..5993278 --- /dev/null +++ b/docs/GroupRemoteInfoOneloginRole.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoOneloginRole + +Remote info for OneLogin Role. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The group id of the OneLogin Role. | + +## Example + +```python +from opal_security.models.group_remote_info_onelogin_role import GroupRemoteInfoOneloginRole + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoOneloginRole from a JSON string +group_remote_info_onelogin_role_instance = GroupRemoteInfoOneloginRole.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoOneloginRole.to_json()) + +# convert the object into a dict +group_remote_info_onelogin_role_dict = group_remote_info_onelogin_role_instance.to_dict() +# create an instance of GroupRemoteInfoOneloginRole from a dict +group_remote_info_onelogin_role_from_dict = GroupRemoteInfoOneloginRole.from_dict(group_remote_info_onelogin_role_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoRampDepartment.md b/docs/GroupRemoteInfoRampDepartment.md new file mode 100644 index 0000000..6e412a2 --- /dev/null +++ b/docs/GroupRemoteInfoRampDepartment.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoRampDepartment + +Remote info for Ramp department. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**department_id** | **str** | The ID of the Ramp department. | + +## Example + +```python +from opal_security.models.group_remote_info_ramp_department import GroupRemoteInfoRampDepartment + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoRampDepartment from a JSON string +group_remote_info_ramp_department_instance = GroupRemoteInfoRampDepartment.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoRampDepartment.to_json()) + +# convert the object into a dict +group_remote_info_ramp_department_dict = group_remote_info_ramp_department_instance.to_dict() +# create an instance of GroupRemoteInfoRampDepartment from a dict +group_remote_info_ramp_department_from_dict = GroupRemoteInfoRampDepartment.from_dict(group_remote_info_ramp_department_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoRampLocation.md b/docs/GroupRemoteInfoRampLocation.md new file mode 100644 index 0000000..ad1649b --- /dev/null +++ b/docs/GroupRemoteInfoRampLocation.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoRampLocation + +Remote info for Ramp location. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**location_id** | **str** | The ID of the Ramp location. | + +## Example + +```python +from opal_security.models.group_remote_info_ramp_location import GroupRemoteInfoRampLocation + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoRampLocation from a JSON string +group_remote_info_ramp_location_instance = GroupRemoteInfoRampLocation.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoRampLocation.to_json()) + +# convert the object into a dict +group_remote_info_ramp_location_dict = group_remote_info_ramp_location_instance.to_dict() +# create an instance of GroupRemoteInfoRampLocation from a dict +group_remote_info_ramp_location_from_dict = GroupRemoteInfoRampLocation.from_dict(group_remote_info_ramp_location_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoRipplingSupergroup.md b/docs/GroupRemoteInfoRipplingSupergroup.md new file mode 100644 index 0000000..281fac3 --- /dev/null +++ b/docs/GroupRemoteInfoRipplingSupergroup.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoRipplingSupergroup + +Remote info for Rippling supergroup. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**supergroup_id** | **str** | The ID of the Rippling supergroup. | + +## Example + +```python +from opal_security.models.group_remote_info_rippling_supergroup import GroupRemoteInfoRipplingSupergroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoRipplingSupergroup from a JSON string +group_remote_info_rippling_supergroup_instance = GroupRemoteInfoRipplingSupergroup.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoRipplingSupergroup.to_json()) + +# convert the object into a dict +group_remote_info_rippling_supergroup_dict = group_remote_info_rippling_supergroup_instance.to_dict() +# create an instance of GroupRemoteInfoRipplingSupergroup from a dict +group_remote_info_rippling_supergroup_from_dict = GroupRemoteInfoRipplingSupergroup.from_dict(group_remote_info_rippling_supergroup_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoRipplingTeam.md b/docs/GroupRemoteInfoRipplingTeam.md new file mode 100644 index 0000000..cad059c --- /dev/null +++ b/docs/GroupRemoteInfoRipplingTeam.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoRipplingTeam + +Remote info for Rippling team. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**team_id** | **str** | The ID of the Rippling team. | + +## Example + +```python +from opal_security.models.group_remote_info_rippling_team import GroupRemoteInfoRipplingTeam + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoRipplingTeam from a JSON string +group_remote_info_rippling_team_instance = GroupRemoteInfoRipplingTeam.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoRipplingTeam.to_json()) + +# convert the object into a dict +group_remote_info_rippling_team_dict = group_remote_info_rippling_team_instance.to_dict() +# create an instance of GroupRemoteInfoRipplingTeam from a dict +group_remote_info_rippling_team_from_dict = GroupRemoteInfoRipplingTeam.from_dict(group_remote_info_rippling_team_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoSquareJob.md b/docs/GroupRemoteInfoSquareJob.md new file mode 100644 index 0000000..4b606ca --- /dev/null +++ b/docs/GroupRemoteInfoSquareJob.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoSquareJob + +Remote info for Square Job. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The group id of the Square Job. | + +## Example + +```python +from opal_security.models.group_remote_info_square_job import GroupRemoteInfoSquareJob + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoSquareJob from a JSON string +group_remote_info_square_job_instance = GroupRemoteInfoSquareJob.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoSquareJob.to_json()) + +# convert the object into a dict +group_remote_info_square_job_dict = group_remote_info_square_job_instance.to_dict() +# create an instance of GroupRemoteInfoSquareJob from a dict +group_remote_info_square_job_from_dict = GroupRemoteInfoSquareJob.from_dict(group_remote_info_square_job_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoSquareLocation.md b/docs/GroupRemoteInfoSquareLocation.md new file mode 100644 index 0000000..1056ca6 --- /dev/null +++ b/docs/GroupRemoteInfoSquareLocation.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoSquareLocation + +Remote info for Square Location. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The group id of the Square Location. | + +## Example + +```python +from opal_security.models.group_remote_info_square_location import GroupRemoteInfoSquareLocation + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoSquareLocation from a JSON string +group_remote_info_square_location_instance = GroupRemoteInfoSquareLocation.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoSquareLocation.to_json()) + +# convert the object into a dict +group_remote_info_square_location_dict = group_remote_info_square_location_instance.to_dict() +# create an instance of GroupRemoteInfoSquareLocation from a dict +group_remote_info_square_location_from_dict = GroupRemoteInfoSquareLocation.from_dict(group_remote_info_square_location_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoTableauGroup.md b/docs/GroupRemoteInfoTableauGroup.md new file mode 100644 index 0000000..3c70278 --- /dev/null +++ b/docs/GroupRemoteInfoTableauGroup.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoTableauGroup + +Remote info for Tableau group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The ID of the Tableau group. | + +## Example + +```python +from opal_security.models.group_remote_info_tableau_group import GroupRemoteInfoTableauGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoTableauGroup from a JSON string +group_remote_info_tableau_group_instance = GroupRemoteInfoTableauGroup.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoTableauGroup.to_json()) + +# convert the object into a dict +group_remote_info_tableau_group_dict = group_remote_info_tableau_group_instance.to_dict() +# create an instance of GroupRemoteInfoTableauGroup from a dict +group_remote_info_tableau_group_from_dict = GroupRemoteInfoTableauGroup.from_dict(group_remote_info_tableau_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoWrikeGroup.md b/docs/GroupRemoteInfoWrikeGroup.md new file mode 100644 index 0000000..d1b019a --- /dev/null +++ b/docs/GroupRemoteInfoWrikeGroup.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoWrikeGroup + +Remote info for Wrike group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The ID of the Wrike group. | + +## Example + +```python +from opal_security.models.group_remote_info_wrike_group import GroupRemoteInfoWrikeGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoWrikeGroup from a JSON string +group_remote_info_wrike_group_instance = GroupRemoteInfoWrikeGroup.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoWrikeGroup.to_json()) + +# convert the object into a dict +group_remote_info_wrike_group_dict = group_remote_info_wrike_group_instance.to_dict() +# create an instance of GroupRemoteInfoWrikeGroup from a dict +group_remote_info_wrike_group_from_dict = GroupRemoteInfoWrikeGroup.from_dict(group_remote_info_wrike_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupRemoteInfoZoomGroup.md b/docs/GroupRemoteInfoZoomGroup.md new file mode 100644 index 0000000..e238fc1 --- /dev/null +++ b/docs/GroupRemoteInfoZoomGroup.md @@ -0,0 +1,30 @@ +# GroupRemoteInfoZoomGroup + +Remote info for Zoom group. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | The ID of the Zoom group. | + +## Example + +```python +from opal_security.models.group_remote_info_zoom_group import GroupRemoteInfoZoomGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupRemoteInfoZoomGroup from a JSON string +group_remote_info_zoom_group_instance = GroupRemoteInfoZoomGroup.from_json(json) +# print the JSON string representation of the object +print(GroupRemoteInfoZoomGroup.to_json()) + +# convert the object into a dict +group_remote_info_zoom_group_dict = group_remote_info_zoom_group_instance.to_dict() +# create an instance of GroupRemoteInfoZoomGroup from a dict +group_remote_info_zoom_group_from_dict = GroupRemoteInfoZoomGroup.from_dict(group_remote_info_zoom_group_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupTypeEnum.md b/docs/GroupTypeEnum.md index ca6fdbf..47ca400 100644 --- a/docs/GroupTypeEnum.md +++ b/docs/GroupTypeEnum.md @@ -48,6 +48,8 @@ The type of the group. * `ROOTLY_ON_CALL_SCHEDULE` (value: `'ROOTLY_ON_CALL_SCHEDULE'`) +* `DATADOG_ON_CALL_SCHEDULE` (value: `'DATADOG_ON_CALL_SCHEDULE'`) + * `DEVIN_GROUP` (value: `'DEVIN_GROUP'`) * `GIT_HUB_ENTERPRISE_TEAM` (value: `'GIT_HUB_ENTERPRISE_TEAM'`) @@ -58,6 +60,8 @@ The type of the group. * `SLACK_USER_GROUP` (value: `'SLACK_USER_GROUP'`) +* `CURSOR_GROUP` (value: `'CURSOR_GROUP'`) + * `TWINGATE_GROUP` (value: `'TWINGATE_GROUP'`) * `TWINGATE_GROUP_SYNCED` (value: `'TWINGATE_GROUP_SYNCED'`) @@ -68,6 +72,50 @@ The type of the group. * `HUBSPOT_TEAM` (value: `'HUBSPOT_TEAM'`) +* `TABLEAU_GROUP` (value: `'TABLEAU_GROUP'`) + +* `CONFLUENCE_GROUP` (value: `'CONFLUENCE_GROUP'`) + +* `JIRA_GROUP` (value: `'JIRA_GROUP'`) + +* `DOCUSIGN_GROUP` (value: `'DOCUSIGN_GROUP'`) + +* `ZOOM_GROUP` (value: `'ZOOM_GROUP'`) + +* `LINEAR_TEAM` (value: `'LINEAR_TEAM'`) + +* `RAMP_DEPARTMENT` (value: `'RAMP_DEPARTMENT'`) + +* `RAMP_LOCATION` (value: `'RAMP_LOCATION'`) + +* `WRIKE_GROUP` (value: `'WRIKE_GROUP'`) + +* `AXIOM_GROUP` (value: `'AXIOM_GROUP'`) + +* `BOX_GROUP` (value: `'BOX_GROUP'`) + +* `ACTIVECAMPAIGN_GROUP` (value: `'ACTIVECAMPAIGN_GROUP'`) + +* `AHA_TEAM` (value: `'AHA_TEAM'`) + +* `ASANA_TEAM` (value: `'ASANA_TEAM'`) + +* `BITWARDEN_GROUP` (value: `'BITWARDEN_GROUP'`) + +* `CALENDLY_GROUP` (value: `'CALENDLY_GROUP'`) + +* `ONELOGIN_ROLE` (value: `'ONELOGIN_ROLE'`) + +* `ONELOGIN_GROUP` (value: `'ONELOGIN_GROUP'`) + +* `SQUARE_LOCATION` (value: `'SQUARE_LOCATION'`) + +* `SQUARE_JOB` (value: `'SQUARE_JOB'`) + +* `RIPPLING_TEAM` (value: `'RIPPLING_TEAM'`) + +* `RIPPLING_SUPERGROUP` (value: `'RIPPLING_SUPERGROUP'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupsApi.md b/docs/GroupsApi.md index d311da4..e5b2535 100644 --- a/docs/GroupsApi.md +++ b/docs/GroupsApi.md @@ -11,8 +11,11 @@ Method | HTTP request | Description [**delete_group**](GroupsApi.md#delete_group) | **DELETE** /groups/{group_id} | [**delete_group_user**](GroupsApi.md#delete_group_user) | **DELETE** /groups/{group_id}/users/{user_id} | [**get_group**](GroupsApi.md#get_group) | **GET** /groups/{group_id} | Get group by ID +[**get_group_access_levels**](GroupsApi.md#get_group_access_levels) | **GET** /groups/{group_id}/access_levels | Get group access levels +[**get_group_configuration_template**](GroupsApi.md#get_group_configuration_template) | **GET** /groups/{group_id}/configuration-template | Get the ID of the configuration template linked to a group [**get_group_containing_group**](GroupsApi.md#get_group_containing_group) | **GET** /groups/{group_id}/containing-groups/{containing_group_id} | Get nested group by ID [**get_group_containing_groups**](GroupsApi.md#get_group_containing_groups) | **GET** /groups/{group_id}/containing-groups | Get nested groups +[**get_group_groups**](GroupsApi.md#get_group_groups) | **GET** /groups/{group_id}/groups | Get member groups [**get_group_message_channels**](GroupsApi.md#get_group_message_channels) | **GET** /groups/{group_id}/message-channels | [**get_group_on_call_schedules**](GroupsApi.md#get_group_on_call_schedules) | **GET** /groups/{group_id}/on-call-schedules | [**get_group_resources**](GroupsApi.md#get_group_resources) | **GET** /groups/{group_id}/resources | @@ -30,6 +33,7 @@ Method | HTTP request | Description [**set_group_reviewer_stages**](GroupsApi.md#set_group_reviewer_stages) | **PUT** /groups/{group_id}/reviewer-stages | [**set_group_reviewers**](GroupsApi.md#set_group_reviewers) | **PUT** /groups/{group_id}/reviewers | [**set_group_visibility**](GroupsApi.md#set_group_visibility) | **PUT** /groups/{group_id}/visibility | +[**update_group_configuration_template**](GroupsApi.md#update_group_configuration_template) | **PUT** /groups/{group_id}/configuration-template | Set the ID of the configuration template linked to a group [**update_group_user**](GroupsApi.md#update_group_user) | **PUT** /groups/{group_id}/users/{user_id} | [**update_groups**](GroupsApi.md#update_groups) | **PUT** /groups | @@ -593,6 +597,182 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_group_access_levels** +> GroupAccessLevelList get_group_access_levels(group_id) + +Get group access levels + +Returns the list of access levels defined for the group. Groups that only offer default (unnamed) access return an empty list. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.group_access_level_list import GroupAccessLevelList +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.GroupsApi(api_client) + group_id = UUID('4baf8423-db0a-4037-a4cf-f79c60cb67a5') # UUID | The ID of the group whose access levels to return. + + try: + # Get group access levels + api_response = api_instance.get_group_access_levels(group_id) + print("The response of GroupsApi->get_group_access_levels:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GroupsApi->get_group_access_levels: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | **UUID**| The ID of the group whose access levels to return. | + +### Return type + +[**GroupAccessLevelList**](GroupAccessLevelList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The access levels defined for the group. | - | +**404** | Group not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_group_configuration_template** +> GroupConfigurationTemplate get_group_configuration_template(group_id) + +Get the ID of the configuration template linked to a group + +Returns the ID of the configuration template that the group is currently +linked to. The response body is +`{"configuration_template_id": "" | null}`: + + * `` is the ID of the configuration template the group is linked to. + * `null` means the group is not linked to any configuration template + and uses its own private configuration. + +This endpoint only exposes the link between a group and a configuration +template — it does not return the template's own fields (name, +description, request configurations, visibility, etc.). To read those, +call `GET /configuration-templates/{configuration_template_id}` with the +ID returned here. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.group_configuration_template import GroupConfigurationTemplate +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.GroupsApi(api_client) + group_id = UUID('4baf8423-db0a-4037-a4cf-f79c60cb67a5') # UUID | The ID of the group whose configuration template link is being read. + + try: + # Get the ID of the configuration template linked to a group + api_response = api_instance.get_group_configuration_template(group_id) + print("The response of GroupsApi->get_group_configuration_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GroupsApi->get_group_configuration_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | **UUID**| The ID of the group whose configuration template link is being read. | + +### Return type + +[**GroupConfigurationTemplate**](GroupConfigurationTemplate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The ID of the configuration template currently linked to the group, or `null` if the group uses its own private configuration. | - | +**403** | The caller is not authorized to view this group. | - | +**404** | The group was not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_group_containing_group** > GroupContainingGroup get_group_containing_group(group_id, containing_group_id) @@ -757,6 +937,88 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_group_groups** +> GroupMemberGroupList get_group_groups(group_id) + +Get member groups + +Gets the list of groups that are nested directly in the group (its member groups). + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.group_member_group_list import GroupMemberGroupList +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.GroupsApi(api_client) + group_id = UUID('4baf8423-db0a-4037-a4cf-f79c60cb67a5') # UUID | The ID of the group. + + try: + # Get member groups + api_response = api_instance.get_group_groups(group_id) + print("The response of GroupsApi->get_group_groups:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GroupsApi->get_group_groups: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | **UUID**| The ID of the group. | + +### Return type + +[**GroupMemberGroupList**](GroupMemberGroupList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The groups nested directly in the group. | - | +**403** | The caller is not authorized to view this group. | - | +**404** | The group was not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_group_message_channels** > MessageChannelList get_group_message_channels(group_id) @@ -1257,7 +1519,7 @@ with opal_security.ApiClient(configuration) as api_client: api_instance = opal_security.GroupsApi(api_client) group_id = UUID('4baf8423-db0a-4037-a4cf-f79c60cb67a5') # UUID | The ID of the group. cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional) - page_size = 200 # int | Number of results to return per page. Default is 200. (optional) + page_size = 200 # int | Number of results to return per page, up to 1000. When set (or when a cursor is provided), the response contains a single page of results and a `next` cursor; the default page size is 200. When both page_size and cursor are omitted, the entire group membership is returned in one response with no `next` cursor. For large groups, prefer setting page_size and following `next`. (optional) try: api_response = api_instance.get_group_users(group_id, cursor=cursor, page_size=page_size) @@ -1276,7 +1538,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **group_id** | **UUID**| The ID of the group. | **cursor** | **str**| The pagination cursor value. | [optional] - **page_size** | **int**| Number of results to return per page. Default is 200. | [optional] + **page_size** | **int**| Number of results to return per page, up to 1000. When set (or when a cursor is provided), the response contains a single page of results and a `next` cursor; the default page size is 200. When both page_size and cursor are omitted, the entire group membership is returned in one response with no `next` cursor. For large groups, prefer setting page_size and following `next`. | [optional] ### Return type @@ -1373,11 +1635,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | The visibility info of this group. | - | +**403** | The caller is not authorized to view this group's visibility. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_groups** -> PaginatedGroupsList get_groups(cursor=cursor, page_size=page_size, group_type_filter=group_type_filter, group_ids=group_ids, group_name=group_name, tag_ids=tag_ids) +> PaginatedGroupsList get_groups(cursor=cursor, page_size=page_size, group_type_filter=group_type_filter, group_ids=group_ids, group_name=group_name, group_name_match=group_name_match, remote_id=remote_id, tag_ids=tag_ids, requestable=requestable) Get groups @@ -1390,6 +1653,7 @@ Returns a list of groups for your organization. ```python import opal_security from opal_security.models.group_type_enum import GroupTypeEnum +from opal_security.models.name_match_type import NameMatchType from opal_security.models.paginated_groups_list import PaginatedGroupsList from opal_security.rest import ApiException from pprint import pprint @@ -1418,14 +1682,17 @@ with opal_security.ApiClient(configuration) as api_client: api_instance = opal_security.GroupsApi(api_client) cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional) page_size = 200 # int | Number of results to return per page. Default is 200. (optional) - group_type_filter = opal_security.GroupTypeEnum() # GroupTypeEnum | The group type to filter by. (optional) + group_type_filter = opal_security.GroupTypeEnum() # GroupTypeEnum | The group type to filter by. Required when remote_id is provided. (optional) group_ids = [["4baf8423-db0a-4037-a4cf-f79c60cb67a5","1b978423-db0a-4037-a4cf-f79c60cb67b3"]] # List[UUID] | The group ids to filter by. (optional) - group_name = 'example-name' # str | Group name. (optional) + group_name = 'example-name' # str | Filter groups by name. Matches against both `name` and `remote_name`. Matching is case-insensitive. Use `group_name_match` to choose the match type; when omitted, CONTAINS (substring) is used. (optional) + group_name_match = opal_security.NameMatchType() # NameMatchType | How to apply `group_name`. Requires `group_name` to be set. Defaults to CONTAINS when `group_name` is provided without this parameter. (optional) + remote_id = 'remote_id_example' # str | Filter groups by their remote id. Returns groups whose remote id matches the provided value exactly. Requires group_type_filter. Remote ids are only unique within a connection, so groups from different connections can share a remote id and more than one group may be returned. Unmanaged groups are not returned. (optional) tag_ids = None # List[UUID] | The IDs of the tags to filter by. Returns only groups that have any of these tags applied. (optional) + requestable = true # bool | If true, only return groups that allow access requests. Does not check whether the caller is permitted to request the group. (optional) try: # Get groups - api_response = api_instance.get_groups(cursor=cursor, page_size=page_size, group_type_filter=group_type_filter, group_ids=group_ids, group_name=group_name, tag_ids=tag_ids) + api_response = api_instance.get_groups(cursor=cursor, page_size=page_size, group_type_filter=group_type_filter, group_ids=group_ids, group_name=group_name, group_name_match=group_name_match, remote_id=remote_id, tag_ids=tag_ids, requestable=requestable) print("The response of GroupsApi->get_groups:\n") pprint(api_response) except Exception as e: @@ -1441,10 +1708,13 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **cursor** | **str**| The pagination cursor value. | [optional] **page_size** | **int**| Number of results to return per page. Default is 200. | [optional] - **group_type_filter** | [**GroupTypeEnum**](.md)| The group type to filter by. | [optional] + **group_type_filter** | [**GroupTypeEnum**](.md)| The group type to filter by. Required when remote_id is provided. | [optional] **group_ids** | [**List[UUID]**](UUID.md)| The group ids to filter by. | [optional] - **group_name** | **str**| Group name. | [optional] + **group_name** | **str**| Filter groups by name. Matches against both `name` and `remote_name`. Matching is case-insensitive. Use `group_name_match` to choose the match type; when omitted, CONTAINS (substring) is used. | [optional] + **group_name_match** | [**NameMatchType**](.md)| How to apply `group_name`. Requires `group_name` to be set. Defaults to CONTAINS when `group_name` is provided without this parameter. | [optional] + **remote_id** | **str**| Filter groups by their remote id. Returns groups whose remote id matches the provided value exactly. Requires group_type_filter. Remote ids are only unique within a connection, so groups from different connections can share a remote id and more than one group may be returned. Unmanaged groups are not returned. | [optional] **tag_ids** | [**List[UUID]**](UUID.md)| The IDs of the tags to filter by. Returns only groups that have any of these tags applied. | [optional] + **requestable** | **bool**| If true, only return groups that allow access requests. Does not check whether the caller is permitted to request the group. | [optional] ### Return type @@ -2099,6 +2369,118 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **update_group_configuration_template** +> GroupConfigurationTemplate update_group_configuration_template(group_id, group_configuration_template) + +Set the ID of the configuration template linked to a group + +Attaches, repoints, or detaches the configuration template linked to a +group. This endpoint only manages the link (by ID) between a group and +an existing configuration template — it does not create, modify, or +delete the template itself. To manage a template's own fields (name, +description, request configurations, visibility, etc.), use the +`/configuration-templates` endpoints. + +The request body is `{"configuration_template_id": "" | null}`: + + * A `` value links the group to the configuration template with + that ID. If the group was previously linked to a different + template, the group is repointed in place. + * `null` detaches the group from its current configuration template. + The template is deep-copied into a new private configuration with + the same settings so the group's current behaviour is preserved, + and the group is repointed at the fork. + +The `configuration_template_id` field is required. Sending `{}` or any +body in which the field is omitted is rejected with `400`. + +The call is idempotent: if the request body matches the group's current +link, no changes are made and no audit events are emitted. + +This endpoint is the preferred, Terraform-friendly surface for linking +and unlinking configuration templates on groups. The equivalent +`configuration_template_id` field on `PUT /groups` remains available +but is deprecated for this purpose. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.group_configuration_template import GroupConfigurationTemplate +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.GroupsApi(api_client) + group_id = UUID('4baf8423-db0a-4037-a4cf-f79c60cb67a5') # UUID | The ID of the group whose configuration template link is being set. + group_configuration_template = opal_security.GroupConfigurationTemplate() # GroupConfigurationTemplate | + + try: + # Set the ID of the configuration template linked to a group + api_response = api_instance.update_group_configuration_template(group_id, group_configuration_template) + print("The response of GroupsApi->update_group_configuration_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GroupsApi->update_group_configuration_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | **UUID**| The ID of the group whose configuration template link is being set. | + **group_configuration_template** | [**GroupConfigurationTemplate**](GroupConfigurationTemplate.md)| | + +### Return type + +[**GroupConfigurationTemplate**](GroupConfigurationTemplate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The ID of the configuration template now linked to the group, or `null` if the group was detached. | - | +**400** | The request body was malformed, the required `configuration_template_id` field was omitted, or the target `configuration_template_id` does not reference a configuration template. | - | +**403** | The caller is not authorized to update this group. | - | +**404** | The group was not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **update_group_user** > GroupUser update_group_user(group_id, user_id, update_group_user_request) diff --git a/docs/IdpStatusFilter.md b/docs/IdpStatusFilter.md new file mode 100644 index 0000000..b4b76ae --- /dev/null +++ b/docs/IdpStatusFilter.md @@ -0,0 +1,31 @@ +# IdpStatusFilter + +Filters USER entities by their HR/IDP lifecycle status. Only applies to USER entities; GROUP and RESOURCE entities never match, in either polarity. `statuses` combine with OR. `not` inverts the match within the user domain (e.g. \"IDP status is NOT active\"), so it still returns only users rather than sweeping in groups/resources. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**statuses** | [**List[UserHrIdpStatusEnum]**](UserHrIdpStatusEnum.md) | Match users whose HR/IDP status is one of these values. | [optional] +**var_not** | **bool** | Invert the match within the user domain (e.g. \"IDP status is NOT active\"). | [optional] + +## Example + +```python +from opal_security.models.idp_status_filter import IdpStatusFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of IdpStatusFilter from a JSON string +idp_status_filter_instance = IdpStatusFilter.from_json(json) +# print the JSON string representation of the object +print(IdpStatusFilter.to_json()) + +# convert the object into a dict +idp_status_filter_dict = idp_status_filter_instance.to_dict() +# create an instance of IdpStatusFilter from a dict +idp_status_filter_from_dict = IdpStatusFilter.from_dict(idp_status_filter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteUserInfo.md b/docs/InviteUserInfo.md new file mode 100644 index 0000000..79574a9 --- /dev/null +++ b/docs/InviteUserInfo.md @@ -0,0 +1,33 @@ +# InviteUserInfo + +The information required to invite a user. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**first_name** | **str** | | +**last_name** | **str** | | +**role** | [**UserProductRoleEnum**](UserProductRoleEnum.md) | | + +## Example + +```python +from opal_security.models.invite_user_info import InviteUserInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteUserInfo from a JSON string +invite_user_info_instance = InviteUserInfo.from_json(json) +# print the JSON string representation of the object +print(InviteUserInfo.to_json()) + +# convert the object into a dict +invite_user_info_dict = invite_user_info_instance.to_dict() +# create an instance of InviteUserInfo from a dict +invite_user_info_from_dict = InviteUserInfo.from_dict(invite_user_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/McpConfigPermission.md b/docs/McpConfigPermission.md new file mode 100644 index 0000000..09ae140 --- /dev/null +++ b/docs/McpConfigPermission.md @@ -0,0 +1,32 @@ +# McpConfigPermission + +# McpConfigPermission Object ### Description One permission rule or default mode of one settings source. The kit masks secrets in a rule with the same redaction it uses for conversation content, and Opal masks it again. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source** | **str** | `managed`, `user`, `project` or `local`. | [optional] +**kind** | **str** | `allow`, `ask`, `deny` or `default_mode`. | +**value** | **str** | The rule, such as `Bash(npm run test *)`, or the mode, such as `acceptEdits`. | + +## Example + +```python +from opal_security.models.mcp_config_permission import McpConfigPermission + +# TODO update the JSON string below +json = "{}" +# create an instance of McpConfigPermission from a JSON string +mcp_config_permission_instance = McpConfigPermission.from_json(json) +# print the JSON string representation of the object +print(McpConfigPermission.to_json()) + +# convert the object into a dict +mcp_config_permission_dict = mcp_config_permission_instance.to_dict() +# create an instance of McpConfigPermission from a dict +mcp_config_permission_from_dict = McpConfigPermission.from_dict(mcp_config_permission_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/McpConfigPlugin.md b/docs/McpConfigPlugin.md new file mode 100644 index 0000000..cc66bdf --- /dev/null +++ b/docs/McpConfigPlugin.md @@ -0,0 +1,33 @@ +# McpConfigPlugin + +# McpConfigPlugin Object ### Description A Claude Code plugin the machine's settings enable. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**marketplace** | **str** | | [optional] +**version** | **str** | The installed version, when the kit could read it. | [optional] +**scope** | **str** | The settings source that enables it: `managed`, `user`, `project` or `local`. | [optional] + +## Example + +```python +from opal_security.models.mcp_config_plugin import McpConfigPlugin + +# TODO update the JSON string below +json = "{}" +# create an instance of McpConfigPlugin from a JSON string +mcp_config_plugin_instance = McpConfigPlugin.from_json(json) +# print the JSON string representation of the object +print(McpConfigPlugin.to_json()) + +# convert the object into a dict +mcp_config_plugin_dict = mcp_config_plugin_instance.to_dict() +# create an instance of McpConfigPlugin from a dict +mcp_config_plugin_from_dict = McpConfigPlugin.from_dict(mcp_config_plugin_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/McpConfigReport.md b/docs/McpConfigReport.md new file mode 100644 index 0000000..26b6d6a --- /dev/null +++ b/docs/McpConfigReport.md @@ -0,0 +1,35 @@ +# McpConfigReport + +# McpConfigReport Object ### Description The MCP servers configured in Claude Code on one machine, and what else its configuration lets Claude Code reach: enabled plugins, skills, custom subagents and permission rules. Each of those four lists is optional; a kit that does not send one leaves what Opal has of that kind as it is, and an empty list says the machine has none. Each holds at most 200 entries. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**servers** | [**List[McpConfigServer]**](McpConfigServer.md) | | +**reporter** | [**McpConfigReporter**](McpConfigReporter.md) | | [optional] +**plugins** | [**List[McpConfigPlugin]**](McpConfigPlugin.md) | | [optional] +**skills** | [**List[McpConfigSkill]**](McpConfigSkill.md) | | [optional] +**subagents** | [**List[McpConfigSubagent]**](McpConfigSubagent.md) | | [optional] +**permissions** | [**List[McpConfigPermission]**](McpConfigPermission.md) | | [optional] + +## Example + +```python +from opal_security.models.mcp_config_report import McpConfigReport + +# TODO update the JSON string below +json = "{}" +# create an instance of McpConfigReport from a JSON string +mcp_config_report_instance = McpConfigReport.from_json(json) +# print the JSON string representation of the object +print(McpConfigReport.to_json()) + +# convert the object into a dict +mcp_config_report_dict = mcp_config_report_instance.to_dict() +# create an instance of McpConfigReport from a dict +mcp_config_report_from_dict = McpConfigReport.from_dict(mcp_config_report_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/McpConfigReportResult.md b/docs/McpConfigReportResult.md new file mode 100644 index 0000000..6360d38 --- /dev/null +++ b/docs/McpConfigReportResult.md @@ -0,0 +1,31 @@ +# McpConfigReportResult + +# McpConfigReportResult Object ### Description What one configuration report did. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**received** | **int** | Servers in the report. | +**recorded** | **int** | Servers recorded in the registry. Lower than `received` when an entry had neither a name Opal could use nor a URL or command hash. | + +## Example + +```python +from opal_security.models.mcp_config_report_result import McpConfigReportResult + +# TODO update the JSON string below +json = "{}" +# create an instance of McpConfigReportResult from a JSON string +mcp_config_report_result_instance = McpConfigReportResult.from_json(json) +# print the JSON string representation of the object +print(McpConfigReportResult.to_json()) + +# convert the object into a dict +mcp_config_report_result_dict = mcp_config_report_result_instance.to_dict() +# create an instance of McpConfigReportResult from a dict +mcp_config_report_result_from_dict = McpConfigReportResult.from_dict(mcp_config_report_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/McpConfigReporter.md b/docs/McpConfigReporter.md new file mode 100644 index 0000000..7611538 --- /dev/null +++ b/docs/McpConfigReporter.md @@ -0,0 +1,33 @@ +# McpConfigReporter + +# McpConfigReporter Object ### Description Who the reporting machine says it belongs to. Unverified, like `X-Opal-Actor`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**configured_email** | **str** | | [optional] +**claude_account_email** | **str** | | [optional] +**git_email** | **str** | | [optional] +**os_user** | **str** | | [optional] + +## Example + +```python +from opal_security.models.mcp_config_reporter import McpConfigReporter + +# TODO update the JSON string below +json = "{}" +# create an instance of McpConfigReporter from a JSON string +mcp_config_reporter_instance = McpConfigReporter.from_json(json) +# print the JSON string representation of the object +print(McpConfigReporter.to_json()) + +# convert the object into a dict +mcp_config_reporter_dict = mcp_config_reporter_instance.to_dict() +# create an instance of McpConfigReporter from a dict +mcp_config_reporter_from_dict = McpConfigReporter.from_dict(mcp_config_reporter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/McpConfigServer.md b/docs/McpConfigServer.md new file mode 100644 index 0000000..a900ff8 --- /dev/null +++ b/docs/McpConfigServer.md @@ -0,0 +1,34 @@ +# McpConfigServer + +# McpConfigServer Object ### Description One MCP server in a machine's Claude Code configuration. Exactly what the hook kit sends: no environment values, headers or command arguments. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The server's name in the configuration. | +**scope** | **str** | `user`, `project`, `local`, `managed` or `plugin`. | [optional] +**transport** | **str** | `http`, `sse` or `stdio`. | [optional] +**url** | **str** | The server's URL, for an `http` or `sse` server. | [optional] +**command_hash** | **str** | For a `stdio` server, a SHA-256 of its command's shape, in hex. | [optional] + +## Example + +```python +from opal_security.models.mcp_config_server import McpConfigServer + +# TODO update the JSON string below +json = "{}" +# create an instance of McpConfigServer from a JSON string +mcp_config_server_instance = McpConfigServer.from_json(json) +# print the JSON string representation of the object +print(McpConfigServer.to_json()) + +# convert the object into a dict +mcp_config_server_dict = mcp_config_server_instance.to_dict() +# create an instance of McpConfigServer from a dict +mcp_config_server_from_dict = McpConfigServer.from_dict(mcp_config_server_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/McpConfigSkill.md b/docs/McpConfigSkill.md new file mode 100644 index 0000000..d031444 --- /dev/null +++ b/docs/McpConfigSkill.md @@ -0,0 +1,31 @@ +# McpConfigSkill + +# McpConfigSkill Object ### Description A skill (or legacy command) Claude Code loads on the machine. A plugin's is named `:`. Only its name is sent, never the file. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**source** | **str** | `user`, `project`, `plugin` or `managed`. | [optional] + +## Example + +```python +from opal_security.models.mcp_config_skill import McpConfigSkill + +# TODO update the JSON string below +json = "{}" +# create an instance of McpConfigSkill from a JSON string +mcp_config_skill_instance = McpConfigSkill.from_json(json) +# print the JSON string representation of the object +print(McpConfigSkill.to_json()) + +# convert the object into a dict +mcp_config_skill_dict = mcp_config_skill_instance.to_dict() +# create an instance of McpConfigSkill from a dict +mcp_config_skill_from_dict = McpConfigSkill.from_dict(mcp_config_skill_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/McpConfigSubagent.md b/docs/McpConfigSubagent.md new file mode 100644 index 0000000..061240a --- /dev/null +++ b/docs/McpConfigSubagent.md @@ -0,0 +1,32 @@ +# McpConfigSubagent + +# McpConfigSubagent Object ### Description A custom subagent defined on the machine. A plugin's is named `:`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**scope** | **str** | `user`, `project`, `plugin` or `managed`. | [optional] +**tools** | **List[str]** | The tools its file lists. Absent when the file lists none, which lets the subagent use every tool of the session, MCP tools included. | [optional] + +## Example + +```python +from opal_security.models.mcp_config_subagent import McpConfigSubagent + +# TODO update the JSON string below +json = "{}" +# create an instance of McpConfigSubagent from a JSON string +mcp_config_subagent_instance = McpConfigSubagent.from_json(json) +# print the JSON string representation of the object +print(McpConfigSubagent.to_json()) + +# convert the object into a dict +mcp_config_subagent_dict = mcp_config_subagent_instance.to_dict() +# create an instance of McpConfigSubagent from a dict +mcp_config_subagent_from_dict = McpConfigSubagent.from_dict(mcp_config_subagent_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NameMatchType.md b/docs/NameMatchType.md new file mode 100644 index 0000000..d438bcd --- /dev/null +++ b/docs/NameMatchType.md @@ -0,0 +1,17 @@ +# NameMatchType + +How to match a free-text name filter on list endpoints. All match types are case-insensitive. When omitted, CONTAINS is used. REGEX is not supported here — use POST /queries/run for regular-expression matching. + +## Enum + +* `CONTAINS` (value: `'CONTAINS'`) + +* `EQUALS` (value: `'EQUALS'`) + +* `STARTS_WITH` (value: `'STARTS_WITH'`) + +* `ENDS_WITH` (value: `'ENDS_WITH'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpalAccessPathDetail.md b/docs/OpalAccessPathDetail.md new file mode 100644 index 0000000..3b4834d --- /dev/null +++ b/docs/OpalAccessPathDetail.md @@ -0,0 +1,31 @@ +# OpalAccessPathDetail + +A single access path within an ACCESS result. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **List[UUID]** | Entity IDs along the path from principal to entitlement. | +**expiration** | **datetime** | This path's expiration, if any. | [optional] + +## Example + +```python +from opal_security.models.opal_access_path_detail import OpalAccessPathDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of OpalAccessPathDetail from a JSON string +opal_access_path_detail_instance = OpalAccessPathDetail.from_json(json) +# print the JSON string representation of the object +print(OpalAccessPathDetail.to_json()) + +# convert the object into a dict +opal_access_path_detail_dict = opal_access_path_detail_instance.to_dict() +# create an instance of OpalAccessPathDetail from a dict +opal_access_path_detail_from_dict = OpalAccessPathDetail.from_dict(opal_access_path_detail_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpalAccessPathEdgeFilter.md b/docs/OpalAccessPathEdgeFilter.md new file mode 100644 index 0000000..b0b9620 --- /dev/null +++ b/docs/OpalAccessPathEdgeFilter.md @@ -0,0 +1,31 @@ +# OpalAccessPathEdgeFilter + +Constraints on the access path edges themselves. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**direct_only** | **bool** | When true, only return direct (depth-1) principal-to-entitlement edges. | [optional] +**access_duration_type** | **str** | Constrain results by whether the terminal access expires. | [optional] + +## Example + +```python +from opal_security.models.opal_access_path_edge_filter import OpalAccessPathEdgeFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of OpalAccessPathEdgeFilter from a JSON string +opal_access_path_edge_filter_instance = OpalAccessPathEdgeFilter.from_json(json) +# print the JSON string representation of the object +print(OpalAccessPathEdgeFilter.to_json()) + +# convert the object into a dict +opal_access_path_edge_filter_dict = opal_access_path_edge_filter_instance.to_dict() +# create an instance of OpalAccessPathEdgeFilter from a dict +opal_access_path_edge_filter_from_dict = OpalAccessPathEdgeFilter.from_dict(opal_access_path_edge_filter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpalAccessPathQueryBody.md b/docs/OpalAccessPathQueryBody.md new file mode 100644 index 0000000..36bbef7 --- /dev/null +++ b/docs/OpalAccessPathQueryBody.md @@ -0,0 +1,36 @@ +# OpalAccessPathQueryBody + +Edge-query filters for an ACCESS OpalQuery. At least one of principalFilter or entitlementFilter is required. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**principal_filter** | [**AccessEntityFilters**](AccessEntityFilters.md) | | [optional] +**entitlement_filter** | [**AccessEntityFilters**](AccessEntityFilters.md) | | [optional] +**principal_access_filters** | [**AccessRelationshipFilters**](AccessRelationshipFilters.md) | Advanced access filter on the principal side of each path. Restricts results to principals that additionally satisfy these access-edge constraints: `hasAccessTo` keeps only principals that also have access to a matching entity; `isAccessibleBy` keeps only principals that are also accessible by a matching entity. Only takes effect when `principalFilter` is also supplied (it refines that filter); on its own it has no effect. | [optional] +**entitlement_access_filters** | [**AccessRelationshipFilters**](AccessRelationshipFilters.md) | Advanced access filter on the entitlement side of each path. Restricts results to entitlements that additionally satisfy these access-edge constraints: `hasAccessTo` keeps only entitlements that also have access to a matching entity; `isAccessibleBy` keeps only entitlements that are also accessible by a matching entity. Only takes effect when `entitlementFilter` is also supplied (it refines that filter); on its own it has no effect. | [optional] +**access_level_remote_ids** | **List[str]** | Filter by access-level remote IDs on the terminal edge. | [optional] +**access_level_names** | **List[str]** | Filter by access-level display names on the terminal edge. | [optional] +**edge_filter** | [**OpalAccessPathEdgeFilter**](OpalAccessPathEdgeFilter.md) | | [optional] + +## Example + +```python +from opal_security.models.opal_access_path_query_body import OpalAccessPathQueryBody + +# TODO update the JSON string below +json = "{}" +# create an instance of OpalAccessPathQueryBody from a JSON string +opal_access_path_query_body_instance = OpalAccessPathQueryBody.from_json(json) +# print the JSON string representation of the object +print(OpalAccessPathQueryBody.to_json()) + +# convert the object into a dict +opal_access_path_query_body_dict = opal_access_path_query_body_instance.to_dict() +# create an instance of OpalAccessPathQueryBody from a dict +opal_access_path_query_body_from_dict = OpalAccessPathQueryBody.from_dict(opal_access_path_query_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpalAccessQuery.md b/docs/OpalAccessQuery.md new file mode 100644 index 0000000..c655719 --- /dev/null +++ b/docs/OpalAccessQuery.md @@ -0,0 +1,33 @@ +# OpalAccessQuery + +Use an Access query to retrieve access grants between principals (users or groups) and their entitlements (resources or groups), with one result per (principal, entitlement, access level). Every access path reaching that grant is returned as metadata on the result. Uses the same filters as an Access Path query; results are paginated. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**query** | [**OpalAccessPathQueryBody**](OpalAccessPathQueryBody.md) | | [optional] +**first** | **int** | Maximum number of results to return. Defaults to 200. | [optional] +**after** | **str** | Opaque cursor from a previous ACCESS response to fetch the next page of results. | [optional] + +## Example + +```python +from opal_security.models.opal_access_query import OpalAccessQuery + +# TODO update the JSON string below +json = "{}" +# create an instance of OpalAccessQuery from a JSON string +opal_access_query_instance = OpalAccessQuery.from_json(json) +# print the JSON string representation of the object +print(OpalAccessQuery.to_json()) + +# convert the object into a dict +opal_access_query_dict = opal_access_query_instance.to_dict() +# create an instance of OpalAccessQuery from a dict +opal_access_query_from_dict = OpalAccessQuery.from_dict(opal_access_query_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpalAccessQueryResults.md b/docs/OpalAccessQueryResults.md new file mode 100644 index 0000000..8d36280 --- /dev/null +++ b/docs/OpalAccessQueryResults.md @@ -0,0 +1,32 @@ +# OpalAccessQueryResults + +Paginated results of an ACCESS-type OpalQuery — one edge per matched (principal, entitlement, access level) grant. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**edges** | [**List[OpalAccessResultEdge]**](OpalAccessResultEdge.md) | List of matched access grants. | +**page_info** | [**PageInfo**](PageInfo.md) | | + +## Example + +```python +from opal_security.models.opal_access_query_results import OpalAccessQueryResults + +# TODO update the JSON string below +json = "{}" +# create an instance of OpalAccessQueryResults from a JSON string +opal_access_query_results_instance = OpalAccessQueryResults.from_json(json) +# print the JSON string representation of the object +print(OpalAccessQueryResults.to_json()) + +# convert the object into a dict +opal_access_query_results_dict = opal_access_query_results_instance.to_dict() +# create an instance of OpalAccessQueryResults from a dict +opal_access_query_results_from_dict = OpalAccessQueryResults.from_dict(opal_access_query_results_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpalAccessResultEdge.md b/docs/OpalAccessResultEdge.md new file mode 100644 index 0000000..972f940 --- /dev/null +++ b/docs/OpalAccessResultEdge.md @@ -0,0 +1,31 @@ +# OpalAccessResultEdge + +A single ACCESS result edge containing the matched access grant and its pagination cursor. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**node** | [**OpalAccessResultNode**](OpalAccessResultNode.md) | | +**cursor** | **str** | Opaque cursor for this grant, used for pagination. | + +## Example + +```python +from opal_security.models.opal_access_result_edge import OpalAccessResultEdge + +# TODO update the JSON string below +json = "{}" +# create an instance of OpalAccessResultEdge from a JSON string +opal_access_result_edge_instance = OpalAccessResultEdge.from_json(json) +# print the JSON string representation of the object +print(OpalAccessResultEdge.to_json()) + +# convert the object into a dict +opal_access_result_edge_dict = opal_access_result_edge_instance.to_dict() +# create an instance of OpalAccessResultEdge from a dict +opal_access_result_edge_from_dict = OpalAccessResultEdge.from_dict(opal_access_result_edge_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpalAccessResultNode.md b/docs/OpalAccessResultNode.md new file mode 100644 index 0000000..1b1daac --- /dev/null +++ b/docs/OpalAccessResultNode.md @@ -0,0 +1,36 @@ +# OpalAccessResultNode + +A matched access grant from an ACCESS OpalQuery — one per (principal, entitlement, access level), with every access path as metadata. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**principal_id** | **UUID** | The principal entity ID. | +**entitlement_id** | **UUID** | The entitlement entity ID. | +**access_level_remote_id** | **str** | Remote ID of the access level. | [optional] +**access_level_name** | **str** | Display name of the access level. | [optional] +**effective_expiration** | **datetime** | The expiration in effect across all paths (the latest-expiring; a permanent path wins). Null means access never expires. | [optional] +**is_direct** | **bool** | True when any path is a direct grant. | +**paths** | [**List[OpalAccessPathDetail]**](OpalAccessPathDetail.md) | Every access path reaching this grant. | + +## Example + +```python +from opal_security.models.opal_access_result_node import OpalAccessResultNode + +# TODO update the JSON string below +json = "{}" +# create an instance of OpalAccessResultNode from a JSON string +opal_access_result_node_instance = OpalAccessResultNode.from_json(json) +# print the JSON string representation of the object +print(OpalAccessResultNode.to_json()) + +# convert the object into a dict +opal_access_result_node_dict = opal_access_result_node_instance.to_dict() +# create an instance of OpalAccessResultNode from a dict +opal_access_result_node_from_dict = OpalAccessResultNode.from_dict(opal_access_result_node_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpalNodeQuery.md b/docs/OpalNodeQuery.md index 7ed645d..5319de9 100644 --- a/docs/OpalNodeQuery.md +++ b/docs/OpalNodeQuery.md @@ -1,6 +1,6 @@ # OpalNodeQuery -Request body for a NODE-type OpalQuery. Returns entities (users, resources, groups) matching the given filters. +Use a Node query to retrieve entities — users, resources, or groups — that match a set of filters. You can filter by entity type, tags, and access relationships. Results are paginated and returned as a list of entity edges. ## Properties diff --git a/docs/OpalQueriesApi.md b/docs/OpalQueriesApi.md index 3be1004..f36ffe8 100644 --- a/docs/OpalQueriesApi.md +++ b/docs/OpalQueriesApi.md @@ -8,11 +8,14 @@ Method | HTTP request | Description # **run_opal_query** -> OpalNodeQueryResults run_opal_query(body) +> OpalQueryResults run_opal_query(run_opal_query_request) Run an ad-hoc OpalQuery -Runs an ad-hoc OpalQuery and returns the results. Currently supports NODE queries (users, resources, groups). This endpoint is only available to our OpalQuery beta group. Please contact Opal support if you'd like to be added to the beta. +Executes an ad-hoc OpalQuery and returns paginated results. Two query types are supported: a **Node** query filters and returns entities (users, resources, or groups); an **Access** query returns the access grants between principals and their entitlements, one per (principal, entitlement, access level). Set `type` to `NODE` or `ACCESS` in the request body to select the query type. + +This endpoint is available to OpalQuery beta participants. To request access, contact Opal support. + ### Example @@ -20,8 +23,8 @@ Runs an ad-hoc OpalQuery and returns the results. Currently supports NODE querie ```python import opal_security -from opal_security.models.opal_node_query import OpalNodeQuery -from opal_security.models.opal_node_query_results import OpalNodeQueryResults +from opal_security.models.opal_query_results import OpalQueryResults +from opal_security.models.run_opal_query_request import RunOpalQueryRequest from opal_security.rest import ApiException from pprint import pprint @@ -47,11 +50,11 @@ configuration = opal.Configuration( with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = opal_security.OpalQueriesApi(api_client) - body = opal_security.OpalNodeQuery() # OpalNodeQuery | + run_opal_query_request = opal_security.RunOpalQueryRequest() # RunOpalQueryRequest | try: # Run an ad-hoc OpalQuery - api_response = api_instance.run_opal_query(body) + api_response = api_instance.run_opal_query(run_opal_query_request) print("The response of OpalQueriesApi->run_opal_query:\n") pprint(api_response) except Exception as e: @@ -65,11 +68,11 @@ with opal_security.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | **OpalNodeQuery**| | + **run_opal_query_request** | [**RunOpalQueryRequest**](RunOpalQueryRequest.md)| | ### Return type -[**OpalNodeQueryResults**](OpalNodeQueryResults.md) +[**OpalQueryResults**](OpalQueryResults.md) ### Authorization diff --git a/docs/OpalQueryResults.md b/docs/OpalQueryResults.md new file mode 100644 index 0000000..c9a309d --- /dev/null +++ b/docs/OpalQueryResults.md @@ -0,0 +1,32 @@ +# OpalQueryResults + +Paginated results of an OpalQuery. The `type` field discriminates which result schema applies and mirrors the `type` field on the request. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**edges** | [**List[OpalAccessResultEdge]**](OpalAccessResultEdge.md) | List of matched access grants. | +**page_info** | [**PageInfo**](PageInfo.md) | | + +## Example + +```python +from opal_security.models.opal_query_results import OpalQueryResults + +# TODO update the JSON string below +json = "{}" +# create an instance of OpalQueryResults from a JSON string +opal_query_results_instance = OpalQueryResults.from_json(json) +# print the JSON string representation of the object +print(OpalQueryResults.to_json()) + +# convert the object into a dict +opal_query_results_dict = opal_query_results_instance.to_dict() +# create an instance of OpalQueryResults from a dict +opal_query_results_from_dict = OpalQueryResults.from_dict(opal_query_results_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpalScript.md b/docs/OpalScript.md new file mode 100644 index 0000000..aad0788 --- /dev/null +++ b/docs/OpalScript.md @@ -0,0 +1,35 @@ +# OpalScript + +# OpalScript Object ### Description The `OpalScript` object represents an OpalScript: a Starlark script that automates part of Opal's access lifecycle. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**opal_script_id** | **UUID** | The ID of the OpalScript. | +**name** | **str** | The name of the OpalScript. | +**script_type** | [**OpalScriptTypeEnum**](OpalScriptTypeEnum.md) | | +**script** | **str** | The source of the OpalScript's latest version. | +**version** | **int** | The version number of the OpalScript's latest version. | +**updated_at** | **datetime** | The date the OpalScript was last updated. | [optional] + +## Example + +```python +from opal_security.models.opal_script import OpalScript + +# TODO update the JSON string below +json = "{}" +# create an instance of OpalScript from a JSON string +opal_script_instance = OpalScript.from_json(json) +# print the JSON string representation of the object +print(OpalScript.to_json()) + +# convert the object into a dict +opal_script_dict = opal_script_instance.to_dict() +# create an instance of OpalScript from a dict +opal_script_from_dict = OpalScript.from_dict(opal_script_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpalScriptList.md b/docs/OpalScriptList.md new file mode 100644 index 0000000..68a6cef --- /dev/null +++ b/docs/OpalScriptList.md @@ -0,0 +1,30 @@ +# OpalScriptList + +# OpalScriptList Object ### Description A list of `OpalScript` objects. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[OpalScript]**](OpalScript.md) | | + +## Example + +```python +from opal_security.models.opal_script_list import OpalScriptList + +# TODO update the JSON string below +json = "{}" +# create an instance of OpalScriptList from a JSON string +opal_script_list_instance = OpalScriptList.from_json(json) +# print the JSON string representation of the object +print(OpalScriptList.to_json()) + +# convert the object into a dict +opal_script_list_dict = opal_script_list_instance.to_dict() +# create an instance of OpalScriptList from a dict +opal_script_list_from_dict = OpalScriptList.from_dict(opal_script_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpalScriptTypeEnum.md b/docs/OpalScriptTypeEnum.md new file mode 100644 index 0000000..e425fc2 --- /dev/null +++ b/docs/OpalScriptTypeEnum.md @@ -0,0 +1,17 @@ +# OpalScriptTypeEnum + +The kind of automation an OpalScript performs. + +## Enum + +* `REQUEST_REVIEW` (value: `'REQUEST_REVIEW'`) + +* `REQUEST_DELEGATION_CONDITION` (value: `'REQUEST_DELEGATION_CONDITION'`) + +* `CONTEXT_PROVIDER` (value: `'CONTEXT_PROVIDER'`) + +* `REQUEST_CONFIGURATION_CONDITION` (value: `'REQUEST_CONFIGURATION_CONDITION'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpalScriptsApi.md b/docs/OpalScriptsApi.md new file mode 100644 index 0000000..a9ac884 --- /dev/null +++ b/docs/OpalScriptsApi.md @@ -0,0 +1,491 @@ +# opal_security.OpalScriptsApi + +All URIs are relative to *https://api.opal.dev/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_opal_script**](OpalScriptsApi.md#create_opal_script) | **POST** /opal-scripts | Create OpalScript +[**delete_opal_script**](OpalScriptsApi.md#delete_opal_script) | **DELETE** /opal-scripts/{opal_script_id} | Delete OpalScript +[**get_opal_script**](OpalScriptsApi.md#get_opal_script) | **GET** /opal-scripts/{opal_script_id} | Get OpalScript by ID +[**get_opal_script_from_name**](OpalScriptsApi.md#get_opal_script_from_name) | **GET** /opal-scripts/name/{opal_script_name} | Get OpalScript by name +[**get_opal_scripts**](OpalScriptsApi.md#get_opal_scripts) | **GET** /opal-scripts | List OpalScripts +[**update_opal_script**](OpalScriptsApi.md#update_opal_script) | **PUT** /opal-scripts/{opal_script_id} | Update OpalScript + + +# **create_opal_script** +> OpalScript create_opal_script(create_opal_script_info) + +Create OpalScript + +Creates a new `OpalScript`. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.create_opal_script_info import CreateOpalScriptInfo +from opal_security.models.opal_script import OpalScript +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.OpalScriptsApi(api_client) + create_opal_script_info = opal_security.CreateOpalScriptInfo() # CreateOpalScriptInfo | + + try: + # Create OpalScript + api_response = api_instance.create_opal_script(create_opal_script_info) + print("The response of OpalScriptsApi->create_opal_script:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OpalScriptsApi->create_opal_script: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_opal_script_info** | [**CreateOpalScriptInfo**](CreateOpalScriptInfo.md)| | + +### Return type + +[**OpalScript**](OpalScript.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The created OpalScript. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_opal_script** +> delete_opal_script(opal_script_id) + +Delete OpalScript + +Deletes an `OpalScript`, along with the service user that backs it. A script that is still named as a reviewer, or referenced by a delegation, is rejected until those references are removed. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.OpalScriptsApi(api_client) + opal_script_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the OpalScript. + + try: + # Delete OpalScript + api_instance.delete_opal_script(opal_script_id) + except Exception as e: + print("Exception when calling OpalScriptsApi->delete_opal_script: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **opal_script_id** | **UUID**| The ID of the OpalScript. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The OpalScript was deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_opal_script** +> OpalScript get_opal_script(opal_script_id) + +Get OpalScript by ID + +Returns an `OpalScript` object. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.opal_script import OpalScript +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.OpalScriptsApi(api_client) + opal_script_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the OpalScript. + + try: + # Get OpalScript by ID + api_response = api_instance.get_opal_script(opal_script_id) + print("The response of OpalScriptsApi->get_opal_script:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OpalScriptsApi->get_opal_script: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **opal_script_id** | **UUID**| The ID of the OpalScript. | + +### Return type + +[**OpalScript**](OpalScript.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The OpalScript associated with the passed-in ID. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_opal_script_from_name** +> OpalScript get_opal_script_from_name(opal_script_name) + +Get OpalScript by name + +Returns the `OpalScript` whose name exactly matches the given name. OpalScript names are not unique; when more than one script matches, the request fails and the script must be referenced by ID instead. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.opal_script import OpalScript +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.OpalScriptsApi(api_client) + opal_script_name = 'MFA check' # str | The name of the OpalScript. + + try: + # Get OpalScript by name + api_response = api_instance.get_opal_script_from_name(opal_script_name) + print("The response of OpalScriptsApi->get_opal_script_from_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OpalScriptsApi->get_opal_script_from_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **opal_script_name** | **str**| The name of the OpalScript. | + +### Return type + +[**OpalScript**](OpalScript.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The OpalScript associated with the passed-in name. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_opal_scripts** +> OpalScriptList get_opal_scripts() + +List OpalScripts + +Returns the `OpalScript` objects in the caller's organization. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.opal_script_list import OpalScriptList +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.OpalScriptsApi(api_client) + + try: + # List OpalScripts + api_response = api_instance.get_opal_scripts() + print("The response of OpalScriptsApi->get_opal_scripts:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OpalScriptsApi->get_opal_scripts: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**OpalScriptList**](OpalScriptList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The OpalScripts in the organization. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_opal_script** +> OpalScript update_opal_script(opal_script_id, update_opal_script_info) + +Update OpalScript + +Updates an `OpalScript` object. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.opal_script import OpalScript +from opal_security.models.update_opal_script_info import UpdateOpalScriptInfo +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.OpalScriptsApi(api_client) + opal_script_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the OpalScript. + update_opal_script_info = opal_security.UpdateOpalScriptInfo() # UpdateOpalScriptInfo | + + try: + # Update OpalScript + api_response = api_instance.update_opal_script(opal_script_id, update_opal_script_info) + print("The response of OpalScriptsApi->update_opal_script:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OpalScriptsApi->update_opal_script: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **opal_script_id** | **UUID**| The ID of the OpalScript. | + **update_opal_script_info** | [**UpdateOpalScriptInfo**](UpdateOpalScriptInfo.md)| | + +### Return type + +[**OpalScript**](OpalScript.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated OpalScript. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/PaginatedCampaignItemsList.md b/docs/PaginatedCampaignItemsList.md new file mode 100644 index 0000000..cc66adf --- /dev/null +++ b/docs/PaginatedCampaignItemsList.md @@ -0,0 +1,33 @@ +# PaginatedCampaignItemsList + +A paginated list of campaign items. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next** | **str** | The cursor with which to continue pagination if additional result pages exist. | [optional] +**previous** | **str** | The cursor used to obtain the current result page. | [optional] +**results** | [**List[CampaignItem]**](CampaignItem.md) | | +**total_count** | **int** | Total number of items matching the filter (across all pages). | + +## Example + +```python +from opal_security.models.paginated_campaign_items_list import PaginatedCampaignItemsList + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginatedCampaignItemsList from a JSON string +paginated_campaign_items_list_instance = PaginatedCampaignItemsList.from_json(json) +# print the JSON string representation of the object +print(PaginatedCampaignItemsList.to_json()) + +# convert the object into a dict +paginated_campaign_items_list_dict = paginated_campaign_items_list_instance.to_dict() +# create an instance of PaginatedCampaignItemsList from a dict +paginated_campaign_items_list_from_dict = PaginatedCampaignItemsList.from_dict(paginated_campaign_items_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PaginatedCampaignsList.md b/docs/PaginatedCampaignsList.md new file mode 100644 index 0000000..97bd506 --- /dev/null +++ b/docs/PaginatedCampaignsList.md @@ -0,0 +1,32 @@ +# PaginatedCampaignsList + +A list of campaigns. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next** | **str** | The cursor with which to continue pagination if additional result pages exist. | [optional] +**previous** | **str** | The cursor used to obtain the current result page. | [optional] +**results** | [**List[Campaign]**](Campaign.md) | | + +## Example + +```python +from opal_security.models.paginated_campaigns_list import PaginatedCampaignsList + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginatedCampaignsList from a JSON string +paginated_campaigns_list_instance = PaginatedCampaignsList.from_json(json) +# print the JSON string representation of the object +print(PaginatedCampaignsList.to_json()) + +# convert the object into a dict +paginated_campaigns_list_dict = paginated_campaigns_list_instance.to_dict() +# create an instance of PaginatedCampaignsList from a dict +paginated_campaigns_list_from_dict = PaginatedCampaignsList.from_dict(paginated_campaigns_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PaginatedRequestTemplateList.md b/docs/PaginatedRequestTemplateList.md new file mode 100644 index 0000000..77ca15b --- /dev/null +++ b/docs/PaginatedRequestTemplateList.md @@ -0,0 +1,31 @@ +# PaginatedRequestTemplateList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next** | **str** | The cursor with which to continue pagination if additional result pages exist. | [optional] +**previous** | **str** | The cursor used to obtain the current result page. | [optional] +**results** | [**List[RequestTemplate]**](RequestTemplate.md) | | [optional] + +## Example + +```python +from opal_security.models.paginated_request_template_list import PaginatedRequestTemplateList + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginatedRequestTemplateList from a JSON string +paginated_request_template_list_instance = PaginatedRequestTemplateList.from_json(json) +# print the JSON string representation of the object +print(PaginatedRequestTemplateList.to_json()) + +# convert the object into a dict +paginated_request_template_list_dict = paginated_request_template_list_instance.to_dict() +# create an instance of PaginatedRequestTemplateList from a dict +paginated_request_template_list_from_dict = PaginatedRequestTemplateList.from_dict(paginated_request_template_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PaginatedRoleAssignmentsList.md b/docs/PaginatedRoleAssignmentsList.md new file mode 100644 index 0000000..dc1882e --- /dev/null +++ b/docs/PaginatedRoleAssignmentsList.md @@ -0,0 +1,32 @@ +# PaginatedRoleAssignmentsList + +A paginated page of role assignments. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next** | **str** | The cursor with which to continue pagination if additional result pages exist. | [optional] +**previous** | **str** | The cursor used to obtain the current result page. | [optional] +**results** | [**List[RoleAssignment]**](RoleAssignment.md) | | + +## Example + +```python +from opal_security.models.paginated_role_assignments_list import PaginatedRoleAssignmentsList + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginatedRoleAssignmentsList from a JSON string +paginated_role_assignments_list_instance = PaginatedRoleAssignmentsList.from_json(json) +# print the JSON string representation of the object +print(PaginatedRoleAssignmentsList.to_json()) + +# convert the object into a dict +paginated_role_assignments_list_dict = paginated_role_assignments_list_instance.to_dict() +# create an instance of PaginatedRoleAssignmentsList from a dict +paginated_role_assignments_list_from_dict = PaginatedRoleAssignmentsList.from_dict(paginated_role_assignments_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PaginatedViewerCampaignItemsList.md b/docs/PaginatedViewerCampaignItemsList.md new file mode 100644 index 0000000..9815689 --- /dev/null +++ b/docs/PaginatedViewerCampaignItemsList.md @@ -0,0 +1,33 @@ +# PaginatedViewerCampaignItemsList + +A paginated list of viewer campaign items. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next** | **str** | The cursor with which to continue pagination if additional result pages exist. | [optional] +**previous** | **str** | The cursor used to obtain the current result page. | [optional] +**results** | [**List[ViewerCampaignItem]**](ViewerCampaignItem.md) | | +**total_count** | **int** | Total number of items matching the filter (across all pages). | + +## Example + +```python +from opal_security.models.paginated_viewer_campaign_items_list import PaginatedViewerCampaignItemsList + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginatedViewerCampaignItemsList from a JSON string +paginated_viewer_campaign_items_list_instance = PaginatedViewerCampaignItemsList.from_json(json) +# print the JSON string representation of the object +print(PaginatedViewerCampaignItemsList.to_json()) + +# convert the object into a dict +paginated_viewer_campaign_items_list_dict = paginated_viewer_campaign_items_list_instance.to_dict() +# create an instance of PaginatedViewerCampaignItemsList from a dict +paginated_viewer_campaign_items_list_from_dict = PaginatedViewerCampaignItemsList.from_dict(paginated_viewer_campaign_items_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Paladin.md b/docs/Paladin.md new file mode 100644 index 0000000..a29547c --- /dev/null +++ b/docs/Paladin.md @@ -0,0 +1,36 @@ +# Paladin + +# Paladin Object ### Description The `Paladin` object represents a Paladin, Opal's AI access-request reviewer. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**paladin_id** | **UUID** | The ID of the Paladin. Use this value as a reviewer in a request configuration's service_user_ids. | +**name** | **str** | The name of the Paladin. | +**owner_id** | **UUID** | The ID of the owner of the Paladin. | +**monitor_mode** | **bool** | When true, the Paladin reasons about requests but takes no action. Shown as \"Monitor mode\" in the UI. | +**admin_view_only** | **bool** | When true, the Paladin's recommendations are visible only to admins. Only meaningful when monitor_mode is true. | +**enabled_connectors** | [**List[PaladinConnector]**](PaladinConnector.md) | The connectors the Paladin is allowed to use. | +**instructions** | **str** | The free-form instructions that guide the Paladin's decisions. | + +## Example + +```python +from opal_security.models.paladin import Paladin + +# TODO update the JSON string below +json = "{}" +# create an instance of Paladin from a JSON string +paladin_instance = Paladin.from_json(json) +# print the JSON string representation of the object +print(Paladin.to_json()) + +# convert the object into a dict +paladin_dict = paladin_instance.to_dict() +# create an instance of Paladin from a dict +paladin_from_dict = Paladin.from_dict(paladin_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PaladinApi.md b/docs/PaladinApi.md new file mode 100644 index 0000000..ab00c62 --- /dev/null +++ b/docs/PaladinApi.md @@ -0,0 +1,659 @@ +# opal_security.PaladinApi + +All URIs are relative to *https://api.opal.dev/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_paladin**](PaladinApi.md#create_paladin) | **POST** /paladin | Create Paladin +[**create_paladin_context_source**](PaladinApi.md#create_paladin_context_source) | **POST** /paladin/{paladin_id}/context-sources | Add a Paladin context source +[**delete_paladin**](PaladinApi.md#delete_paladin) | **DELETE** /paladin/{paladin_id} | Delete Paladin +[**delete_paladin_context_source**](PaladinApi.md#delete_paladin_context_source) | **DELETE** /paladin/{paladin_id}/context-sources/{context_source_id} | Remove a Paladin context source +[**get_paladin**](PaladinApi.md#get_paladin) | **GET** /paladin/{paladin_id} | Get Paladin by ID +[**get_paladin_from_name**](PaladinApi.md#get_paladin_from_name) | **GET** /paladin/name/{paladin_name} | Get Paladins by name +[**list_paladin_context_sources**](PaladinApi.md#list_paladin_context_sources) | **GET** /paladin/{paladin_id}/context-sources | List Paladin context sources +[**update_paladin**](PaladinApi.md#update_paladin) | **PUT** /paladin/{paladin_id} | Update Paladin + + +# **create_paladin** +> Paladin create_paladin(create_paladin_info) + +Create Paladin + +Creates a new `Paladin`. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.create_paladin_info import CreatePaladinInfo +from opal_security.models.paladin import Paladin +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.PaladinApi(api_client) + create_paladin_info = opal_security.CreatePaladinInfo() # CreatePaladinInfo | + + try: + # Create Paladin + api_response = api_instance.create_paladin(create_paladin_info) + print("The response of PaladinApi->create_paladin:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PaladinApi->create_paladin: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_paladin_info** | [**CreatePaladinInfo**](CreatePaladinInfo.md)| | + +### Return type + +[**Paladin**](Paladin.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The created Paladin. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_paladin_context_source** +> PaladinContextSource create_paladin_context_source(paladin_id, create_paladin_context_source_info) + +Add a Paladin context source + +Configures a context source (a Slack channel or a document) for a Paladin to read. Idempotent, so re-adding an existing source returns it. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.create_paladin_context_source_info import CreatePaladinContextSourceInfo +from opal_security.models.paladin_context_source import PaladinContextSource +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.PaladinApi(api_client) + paladin_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the Paladin. + create_paladin_context_source_info = opal_security.CreatePaladinContextSourceInfo() # CreatePaladinContextSourceInfo | + + try: + # Add a Paladin context source + api_response = api_instance.create_paladin_context_source(paladin_id, create_paladin_context_source_info) + print("The response of PaladinApi->create_paladin_context_source:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PaladinApi->create_paladin_context_source: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **paladin_id** | **UUID**| The ID of the Paladin. | + **create_paladin_context_source_info** | [**CreatePaladinContextSourceInfo**](CreatePaladinContextSourceInfo.md)| | + +### Return type + +[**PaladinContextSource**](PaladinContextSource.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The configured context source. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_paladin** +> delete_paladin(paladin_id) + +Delete Paladin + +Deletes a Paladin, removing the underlying service user. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.PaladinApi(api_client) + paladin_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the Paladin. + + try: + # Delete Paladin + api_instance.delete_paladin(paladin_id) + except Exception as e: + print("Exception when calling PaladinApi->delete_paladin: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **paladin_id** | **UUID**| The ID of the Paladin. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The Paladin was deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_paladin_context_source** +> delete_paladin_context_source(paladin_id, context_source_id) + +Remove a Paladin context source + +Removes a context source from a Paladin. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.PaladinApi(api_client) + paladin_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the Paladin. + context_source_id = UUID('8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8') # UUID | The ID of the context source. + + try: + # Remove a Paladin context source + api_instance.delete_paladin_context_source(paladin_id, context_source_id) + except Exception as e: + print("Exception when calling PaladinApi->delete_paladin_context_source: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **paladin_id** | **UUID**| The ID of the Paladin. | + **context_source_id** | **UUID**| The ID of the context source. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The context source was removed. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_paladin** +> Paladin get_paladin(paladin_id) + +Get Paladin by ID + +Returns a `Paladin` object. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.paladin import Paladin +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.PaladinApi(api_client) + paladin_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the Paladin. + + try: + # Get Paladin by ID + api_response = api_instance.get_paladin(paladin_id) + print("The response of PaladinApi->get_paladin:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PaladinApi->get_paladin: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **paladin_id** | **UUID**| The ID of the Paladin. | + +### Return type + +[**Paladin**](Paladin.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The Paladin associated with the passed-in ID. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_paladin_from_name** +> PaladinList get_paladin_from_name(paladin_name) + +Get Paladins by name + +Returns all Paladins whose name exactly matches the given name. Names are not unique, so the result is a list and may be empty. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.paladin_list import PaladinList +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.PaladinApi(api_client) + paladin_name = 'paladin-agent-1' # str | The name of the Paladin. + + try: + # Get Paladins by name + api_response = api_instance.get_paladin_from_name(paladin_name) + print("The response of PaladinApi->get_paladin_from_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PaladinApi->get_paladin_from_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **paladin_name** | **str**| The name of the Paladin. | + +### Return type + +[**PaladinList**](PaladinList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The list of Paladins matching the passed-in name. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_paladin_context_sources** +> PaladinContextSourceList list_paladin_context_sources(paladin_id) + +List Paladin context sources + +Returns the context sources (Slack channels and documents) configured for a Paladin. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.paladin_context_source_list import PaladinContextSourceList +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.PaladinApi(api_client) + paladin_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the Paladin. + + try: + # List Paladin context sources + api_response = api_instance.list_paladin_context_sources(paladin_id) + print("The response of PaladinApi->list_paladin_context_sources:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PaladinApi->list_paladin_context_sources: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **paladin_id** | **UUID**| The ID of the Paladin. | + +### Return type + +[**PaladinContextSourceList**](PaladinContextSourceList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The context sources configured for the Paladin. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_paladin** +> Paladin update_paladin(paladin_id, update_paladin_info) + +Update Paladin + +Updates a `Paladin` object. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.paladin import Paladin +from opal_security.models.update_paladin_info import UpdatePaladinInfo +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.PaladinApi(api_client) + paladin_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the Paladin. + update_paladin_info = opal_security.UpdatePaladinInfo() # UpdatePaladinInfo | + + try: + # Update Paladin + api_response = api_instance.update_paladin(paladin_id, update_paladin_info) + print("The response of PaladinApi->update_paladin:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PaladinApi->update_paladin: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **paladin_id** | **UUID**| The ID of the Paladin. | + **update_paladin_info** | [**UpdatePaladinInfo**](UpdatePaladinInfo.md)| | + +### Return type + +[**Paladin**](Paladin.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated Paladin. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/PaladinConnector.md b/docs/PaladinConnector.md new file mode 100644 index 0000000..2b431e2 --- /dev/null +++ b/docs/PaladinConnector.md @@ -0,0 +1,33 @@ +# PaladinConnector + +A connector a Paladin is allowed to use. + +## Enum + +* `NOTION` (value: `'NOTION'`) + +* `JIRA` (value: `'JIRA'`) + +* `LINEAR` (value: `'LINEAR'`) + +* `SERVICE_NOW` (value: `'SERVICE_NOW'`) + +* `NOTION_TICKETS` (value: `'NOTION_TICKETS'`) + +* `FRESH_SERVICE` (value: `'FRESH_SERVICE'`) + +* `SHORTCUT` (value: `'SHORTCUT'`) + +* `SLACK` (value: `'SLACK'`) + +* `PAGER_DUTY` (value: `'PAGER_DUTY'`) + +* `CONFLUENCE` (value: `'CONFLUENCE'`) + +* `FLEET_DM` (value: `'FLEET_DM'`) + +* `FRESH_SERVICE_KNOWLEDGE` (value: `'FRESH_SERVICE_KNOWLEDGE'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PaladinContextSource.md b/docs/PaladinContextSource.md new file mode 100644 index 0000000..1969c8a --- /dev/null +++ b/docs/PaladinContextSource.md @@ -0,0 +1,36 @@ +# PaladinContextSource + +# PaladinContextSource Object ### Description A context source (a Slack channel or a document) that a Paladin is configured to read during access-request review. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **UUID** | The ID of the context source. | +**paladin_id** | **UUID** | The ID of the Paladin this source belongs to. | +**source_kind** | [**PaladinContextSourceKind**](PaladinContextSourceKind.md) | | +**third_party_provider** | [**PaladinContextSourceProvider**](PaladinContextSourceProvider.md) | | +**remote_id** | **str** | The provider's identifier for the source. The Slack channel ID for a channel, or the Notion/Confluence page ID or numeric Freshservice article ID for a document. | +**name** | **str** | A human-readable name for the source. | +**url** | **str** | A link to the source. | + +## Example + +```python +from opal_security.models.paladin_context_source import PaladinContextSource + +# TODO update the JSON string below +json = "{}" +# create an instance of PaladinContextSource from a JSON string +paladin_context_source_instance = PaladinContextSource.from_json(json) +# print the JSON string representation of the object +print(PaladinContextSource.to_json()) + +# convert the object into a dict +paladin_context_source_dict = paladin_context_source_instance.to_dict() +# create an instance of PaladinContextSource from a dict +paladin_context_source_from_dict = PaladinContextSource.from_dict(paladin_context_source_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PaladinContextSourceKind.md b/docs/PaladinContextSourceKind.md new file mode 100644 index 0000000..54bc90c --- /dev/null +++ b/docs/PaladinContextSourceKind.md @@ -0,0 +1,13 @@ +# PaladinContextSourceKind + +The kind of source a Paladin can read. A SLACK_CHANNEL is a Slack channel; a DOCUMENT is a Notion or Confluence page or a Freshservice knowledge base article. + +## Enum + +* `SLACK_CHANNEL` (value: `'SLACK_CHANNEL'`) + +* `DOCUMENT` (value: `'DOCUMENT'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PaladinContextSourceList.md b/docs/PaladinContextSourceList.md new file mode 100644 index 0000000..8be5e20 --- /dev/null +++ b/docs/PaladinContextSourceList.md @@ -0,0 +1,30 @@ +# PaladinContextSourceList + +# PaladinContextSourceList Object ### Description A list of `PaladinContextSource` objects. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[PaladinContextSource]**](PaladinContextSource.md) | | + +## Example + +```python +from opal_security.models.paladin_context_source_list import PaladinContextSourceList + +# TODO update the JSON string below +json = "{}" +# create an instance of PaladinContextSourceList from a JSON string +paladin_context_source_list_instance = PaladinContextSourceList.from_json(json) +# print the JSON string representation of the object +print(PaladinContextSourceList.to_json()) + +# convert the object into a dict +paladin_context_source_list_dict = paladin_context_source_list_instance.to_dict() +# create an instance of PaladinContextSourceList from a dict +paladin_context_source_list_from_dict = PaladinContextSourceList.from_dict(paladin_context_source_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PaladinContextSourceProvider.md b/docs/PaladinContextSourceProvider.md new file mode 100644 index 0000000..eca3999 --- /dev/null +++ b/docs/PaladinContextSourceProvider.md @@ -0,0 +1,17 @@ +# PaladinContextSourceProvider + +The integration a Paladin context source comes from. + +## Enum + +* `SLACK` (value: `'SLACK'`) + +* `NOTION` (value: `'NOTION'`) + +* `CONFLUENCE` (value: `'CONFLUENCE'`) + +* `FRESH_SERVICE` (value: `'FRESH_SERVICE'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PaladinList.md b/docs/PaladinList.md new file mode 100644 index 0000000..fc5df40 --- /dev/null +++ b/docs/PaladinList.md @@ -0,0 +1,30 @@ +# PaladinList + +# PaladinList Object ### Description A list of `Paladin` objects. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[Paladin]**](Paladin.md) | | + +## Example + +```python +from opal_security.models.paladin_list import PaladinList + +# TODO update the JSON string below +json = "{}" +# create an instance of PaladinList from a JSON string +paladin_list_instance = PaladinList.from_json(json) +# print the JSON string representation of the object +print(PaladinList.to_json()) + +# convert the object into a dict +paladin_list_dict = paladin_list_instance.to_dict() +# create an instance of PaladinList from a dict +paladin_list_from_dict = PaladinList.from_dict(paladin_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PropagationStatusEnum.md b/docs/PropagationStatusEnum.md index ded75f9..03bb1f8 100644 --- a/docs/PropagationStatusEnum.md +++ b/docs/PropagationStatusEnum.md @@ -46,6 +46,10 @@ The status of whether the user has been synced to the group or resource in the r * `ERR_REMOTE_UNRECOVERABLE_ERROR` (value: `'ERR_REMOTE_UNRECOVERABLE_ERROR'`) +* `ERR_REMOTE_TICKET_NOT_FOUND` (value: `'ERR_REMOTE_TICKET_NOT_FOUND'`) + +* `ERR_CONNECTION_VALIDATION_FAILED` (value: `'ERR_CONNECTION_VALIDATION_FAILED'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RemoveRoleAssignmentInput.md b/docs/RemoveRoleAssignmentInput.md new file mode 100644 index 0000000..b580cd8 --- /dev/null +++ b/docs/RemoveRoleAssignmentInput.md @@ -0,0 +1,34 @@ +# RemoveRoleAssignmentInput + +A single role assignment to revoke. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**entity_id** | **UUID** | The ID of the entity (resource or group) to revoke access from. | +**entity_type** | [**EntityTypeEnum**](EntityTypeEnum.md) | | +**principal_id** | **UUID** | The ID of the principal (user, group, or resource) losing access. | +**principal_type** | [**EntityTypeEnum**](EntityTypeEnum.md) | | +**access_level_remote_id** | **str** | Remote ID of the specific access-level grant to revoke. The lookup is exact-match on this value against stored grants. Required when the entity has access levels defined (the server returns 422 if omitted or sent as `null`/empty for such an entity). Must be omitted or `null` for entities with no access-level catalog (group memberships and resources that have no defined access levels); supplying a value in that case also returns 422. These rules mirror those of `POST /v1/role-assignments`. A specified value that does not match any stored grant for this `(entity_id, principal_id)` pair is a successful idempotent no-op: HTTP 200 is returned and the entry is absent from `entries`. | [optional] + +## Example + +```python +from opal_security.models.remove_role_assignment_input import RemoveRoleAssignmentInput + +# TODO update the JSON string below +json = "{}" +# create an instance of RemoveRoleAssignmentInput from a JSON string +remove_role_assignment_input_instance = RemoveRoleAssignmentInput.from_json(json) +# print the JSON string representation of the object +print(RemoveRoleAssignmentInput.to_json()) + +# convert the object into a dict +remove_role_assignment_input_dict = remove_role_assignment_input_instance.to_dict() +# create an instance of RemoveRoleAssignmentInput from a dict +remove_role_assignment_input_from_dict = RemoveRoleAssignmentInput.from_dict(remove_role_assignment_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemoveRoleAssignmentsEntry.md b/docs/RemoveRoleAssignmentsEntry.md new file mode 100644 index 0000000..83c2a98 --- /dev/null +++ b/docs/RemoveRoleAssignmentsEntry.md @@ -0,0 +1,30 @@ +# RemoveRoleAssignmentsEntry + +A single revoked role assignment in a `RemoveRoleAssignmentsResponse`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_assignment** | [**RoleAssignment**](RoleAssignment.md) | | + +## Example + +```python +from opal_security.models.remove_role_assignments_entry import RemoveRoleAssignmentsEntry + +# TODO update the JSON string below +json = "{}" +# create an instance of RemoveRoleAssignmentsEntry from a JSON string +remove_role_assignments_entry_instance = RemoveRoleAssignmentsEntry.from_json(json) +# print the JSON string representation of the object +print(RemoveRoleAssignmentsEntry.to_json()) + +# convert the object into a dict +remove_role_assignments_entry_dict = remove_role_assignments_entry_instance.to_dict() +# create an instance of RemoveRoleAssignmentsEntry from a dict +remove_role_assignments_entry_from_dict = RemoveRoleAssignmentsEntry.from_dict(remove_role_assignments_entry_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemoveRoleAssignmentsRequest.md b/docs/RemoveRoleAssignmentsRequest.md new file mode 100644 index 0000000..c771a02 --- /dev/null +++ b/docs/RemoveRoleAssignmentsRequest.md @@ -0,0 +1,30 @@ +# RemoveRoleAssignmentsRequest + +Request body for `DELETE /role-assignments`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_assignments** | [**List[RemoveRoleAssignmentInput]**](RemoveRoleAssignmentInput.md) | | + +## Example + +```python +from opal_security.models.remove_role_assignments_request import RemoveRoleAssignmentsRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RemoveRoleAssignmentsRequest from a JSON string +remove_role_assignments_request_instance = RemoveRoleAssignmentsRequest.from_json(json) +# print the JSON string representation of the object +print(RemoveRoleAssignmentsRequest.to_json()) + +# convert the object into a dict +remove_role_assignments_request_dict = remove_role_assignments_request_instance.to_dict() +# create an instance of RemoveRoleAssignmentsRequest from a dict +remove_role_assignments_request_from_dict = RemoveRoleAssignmentsRequest.from_dict(remove_role_assignments_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemoveRoleAssignmentsResponse.md b/docs/RemoveRoleAssignmentsResponse.md new file mode 100644 index 0000000..020e9f7 --- /dev/null +++ b/docs/RemoveRoleAssignmentsResponse.md @@ -0,0 +1,31 @@ +# RemoveRoleAssignmentsResponse + +Response body for `DELETE /role-assignments`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**task_ids** | **List[str]** | Opaque identifiers for the push tasks enqueued to propagate the revocation to the end system. Encoded identically to the `PushTaskId` scalar in the GraphQL API (base64 of the underlying protobuf). One ID per deferred revocation (today, resource/user grants are always deferred); empty when every revocation completed inline (resource/group, group/user, group/group). | +**entries** | [**List[RemoveRoleAssignmentsEntry]**](RemoveRoleAssignmentsEntry.md) | One entry per role assignment that was removed inline. Shorter than the request when some assignments did not exist (idempotent), and empty when every revocation in the batch was deferred to an async propagation task — in that case `task_ids` carries one ID per deferred revocation and `entries` is empty. Resource/user grants are currently always deferred; the other `(entity, principal)` combinations complete inline and populate `entries`. | + +## Example + +```python +from opal_security.models.remove_role_assignments_response import RemoveRoleAssignmentsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RemoveRoleAssignmentsResponse from a JSON string +remove_role_assignments_response_instance = RemoveRoleAssignmentsResponse.from_json(json) +# print the JSON string representation of the object +print(RemoveRoleAssignmentsResponse.to_json()) + +# convert the object into a dict +remove_role_assignments_response_dict = remove_role_assignments_response_instance.to_dict() +# create an instance of RemoveRoleAssignmentsResponse from a dict +remove_role_assignments_response_from_dict = RemoveRoleAssignmentsResponse.from_dict(remove_role_assignments_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Request.md b/docs/Request.md index dc5f9c9..19c2d78 100644 --- a/docs/Request.md +++ b/docs/Request.md @@ -10,9 +10,11 @@ Name | Type | Description | Notes **created_at** | **datetime** | The date and time the request was created. | **updated_at** | **datetime** | The date and time the request was last updated. | **requester_id** | **UUID** | The unique identifier of the user who created the request. | +**initiated_by_user_id** | **UUID** | The unique identifier of the user the caller asserted asked for this access. Unverified - Opal records the claim as given. Absent unless the caller supplied it. | [optional] **target_user_id** | **UUID** | The unique identifier of the user who is the target of the request. | [optional] **target_group_id** | **UUID** | The unique identifier of the group who is the target of the request. | [optional] **status** | [**RequestStatusEnum**](RequestStatusEnum.md) | The status of the request. | +**source** | **str** | The channel that created the request. Omitted when the source was not recorded. MCP counts only OAuth sessions. An agent using an API token or a person's credentials is counted as API, CLI, or WEB. | [optional] **reason** | **str** | The reason for the request. | **duration_minutes** | **int** | The duration of the request in minutes. | [optional] **requested_items_list** | [**List[RequestedItem]**](RequestedItem.md) | The list of targets for the request. | [optional] diff --git a/docs/RequestConfiguration.md b/docs/RequestConfiguration.md index 5af185d..8ee0671 100644 --- a/docs/RequestConfiguration.md +++ b/docs/RequestConfiguration.md @@ -10,9 +10,10 @@ Name | Type | Description | Notes **allow_requests** | **bool** | A bool representing whether or not to allow requests for this resource. | **auto_approval** | **bool** | A bool representing whether or not to automatically approve requests for this resource. | **require_mfa_to_request** | **bool** | A bool representing whether or not to require MFA for requesting access to this resource. | -**max_duration_minutes** | **int** | The maximum duration for which the resource can be requested (in minutes). | [optional] +**max_duration_minutes** | **int** | The maximum duration for which the resource can be requested (in minutes). Capped at 1 year (525600) unless a longer maximum has been enabled for your organization. Use -1 for an indefinite duration. | [optional] **recommended_duration_minutes** | **int** | The recommended duration for which the resource should be requested (in minutes). -1 represents an indefinite duration. | [optional] **require_support_ticket** | **bool** | A bool representing whether or not access requests to the resource require an access ticket. | +**reason_optional** | **bool** | A bool representing whether the reason field is optional for requests. | [optional] **extensions_duration_in_minutes** | **int** | The duration for which access can be extended (in minutes). Set to 0 to disable extensions. When > 0, extensions are enabled for the specified duration. | [optional] **request_template_id** | **UUID** | The ID of the associated request template. | [optional] **reviewer_stages** | [**List[ReviewerStage]**](ReviewerStage.md) | The list of reviewer stages for the request configuration. | [optional] diff --git a/docs/RequestTemplate.md b/docs/RequestTemplate.md new file mode 100644 index 0000000..9707a43 --- /dev/null +++ b/docs/RequestTemplate.md @@ -0,0 +1,32 @@ +# RequestTemplate + +A template describing what a requester is asked when requesting access. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_template_id** | **UUID** | The ID of the request template. | +**name** | **str** | The name of the request template. | +**custom_fields** | [**List[RequestTemplateCustomField]**](RequestTemplateCustomField.md) | The fields on this template, in the order they are shown. | [optional] + +## Example + +```python +from opal_security.models.request_template import RequestTemplate + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestTemplate from a JSON string +request_template_instance = RequestTemplate.from_json(json) +# print the JSON string representation of the object +print(RequestTemplate.to_json()) + +# convert the object into a dict +request_template_dict = request_template_instance.to_dict() +# create an instance of RequestTemplate from a dict +request_template_from_dict = RequestTemplate.from_dict(request_template_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RequestTemplateCustomField.md b/docs/RequestTemplateCustomField.md new file mode 100644 index 0000000..e7d8904 --- /dev/null +++ b/docs/RequestTemplateCustomField.md @@ -0,0 +1,34 @@ +# RequestTemplateCustomField + +A field on a request template. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The label shown to the requester. `CALLOUT` fields are display-only, so their name is an internal identifier and is never displayed. | +**description** | **str** | Helper text shown beneath the field. | [optional] +**type** | [**RequestTemplateCustomFieldTypeEnum**](RequestTemplateCustomFieldTypeEnum.md) | | +**required** | **bool** | Whether the requester must answer. Always false for `CALLOUT` fields, which collect no answer. | [optional] +**metadata** | [**RequestTemplateCustomFieldMetadata**](RequestTemplateCustomFieldMetadata.md) | | [optional] + +## Example + +```python +from opal_security.models.request_template_custom_field import RequestTemplateCustomField + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestTemplateCustomField from a JSON string +request_template_custom_field_instance = RequestTemplateCustomField.from_json(json) +# print the JSON string representation of the object +print(RequestTemplateCustomField.to_json()) + +# convert the object into a dict +request_template_custom_field_dict = request_template_custom_field_instance.to_dict() +# create an instance of RequestTemplateCustomField from a dict +request_template_custom_field_from_dict = RequestTemplateCustomField.from_dict(request_template_custom_field_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RequestTemplateCustomFieldCalloutMetadata.md b/docs/RequestTemplateCustomFieldCalloutMetadata.md new file mode 100644 index 0000000..616d0b0 --- /dev/null +++ b/docs/RequestTemplateCustomFieldCalloutMetadata.md @@ -0,0 +1,31 @@ +# RequestTemplateCustomFieldCalloutMetadata + +The message shown to a requester by a `CALLOUT` field, and how prominently to show it. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**severity** | **str** | How prominently the message is shown. | +**text** | **str** | The message shown to the requester. | + +## Example + +```python +from opal_security.models.request_template_custom_field_callout_metadata import RequestTemplateCustomFieldCalloutMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestTemplateCustomFieldCalloutMetadata from a JSON string +request_template_custom_field_callout_metadata_instance = RequestTemplateCustomFieldCalloutMetadata.from_json(json) +# print the JSON string representation of the object +print(RequestTemplateCustomFieldCalloutMetadata.to_json()) + +# convert the object into a dict +request_template_custom_field_callout_metadata_dict = request_template_custom_field_callout_metadata_instance.to_dict() +# create an instance of RequestTemplateCustomFieldCalloutMetadata from a dict +request_template_custom_field_callout_metadata_from_dict = RequestTemplateCustomFieldCalloutMetadata.from_dict(request_template_custom_field_callout_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RequestTemplateCustomFieldInput.md b/docs/RequestTemplateCustomFieldInput.md new file mode 100644 index 0000000..8b40cfc --- /dev/null +++ b/docs/RequestTemplateCustomFieldInput.md @@ -0,0 +1,34 @@ +# RequestTemplateCustomFieldInput + +A field to put on a request template. Separate from `RequestTemplateCustomField` because a callout's name may be omitted on write, while a field read back always has one. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The label shown to the requester. Required for every type except `CALLOUT`, which is display-only -- its name is an internal identifier, never displayed, and is generated if omitted. | [optional] +**description** | **str** | Helper text shown beneath the field. | [optional] +**type** | [**RequestTemplateCustomFieldTypeEnum**](RequestTemplateCustomFieldTypeEnum.md) | | +**required** | **bool** | Whether the requester must answer. Ignored for `CALLOUT` fields, which collect no answer. | [optional] +**metadata** | [**RequestTemplateCustomFieldMetadata**](RequestTemplateCustomFieldMetadata.md) | | [optional] + +## Example + +```python +from opal_security.models.request_template_custom_field_input import RequestTemplateCustomFieldInput + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestTemplateCustomFieldInput from a JSON string +request_template_custom_field_input_instance = RequestTemplateCustomFieldInput.from_json(json) +# print the JSON string representation of the object +print(RequestTemplateCustomFieldInput.to_json()) + +# convert the object into a dict +request_template_custom_field_input_dict = request_template_custom_field_input_instance.to_dict() +# create an instance of RequestTemplateCustomFieldInput from a dict +request_template_custom_field_input_from_dict = RequestTemplateCustomFieldInput.from_dict(request_template_custom_field_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RequestTemplateCustomFieldMetadata.md b/docs/RequestTemplateCustomFieldMetadata.md new file mode 100644 index 0000000..6bc7429 --- /dev/null +++ b/docs/RequestTemplateCustomFieldMetadata.md @@ -0,0 +1,31 @@ +# RequestTemplateCustomFieldMetadata + +Extra configuration for field types that need it. Exactly one member is set, and which one is determined by the field's `type`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callout_data** | [**RequestTemplateCustomFieldCalloutMetadata**](RequestTemplateCustomFieldCalloutMetadata.md) | | [optional] +**multi_choice_data** | [**RequestTemplateCustomFieldMultiChoiceMetadata**](RequestTemplateCustomFieldMultiChoiceMetadata.md) | | [optional] + +## Example + +```python +from opal_security.models.request_template_custom_field_metadata import RequestTemplateCustomFieldMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestTemplateCustomFieldMetadata from a JSON string +request_template_custom_field_metadata_instance = RequestTemplateCustomFieldMetadata.from_json(json) +# print the JSON string representation of the object +print(RequestTemplateCustomFieldMetadata.to_json()) + +# convert the object into a dict +request_template_custom_field_metadata_dict = request_template_custom_field_metadata_instance.to_dict() +# create an instance of RequestTemplateCustomFieldMetadata from a dict +request_template_custom_field_metadata_from_dict = RequestTemplateCustomFieldMetadata.from_dict(request_template_custom_field_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RequestTemplateCustomFieldMultiChoiceMetadata.md b/docs/RequestTemplateCustomFieldMultiChoiceMetadata.md new file mode 100644 index 0000000..e1c164f --- /dev/null +++ b/docs/RequestTemplateCustomFieldMultiChoiceMetadata.md @@ -0,0 +1,30 @@ +# RequestTemplateCustomFieldMultiChoiceMetadata + +The options a requester can pick from in a `MULTI_CHOICE` or `MULTI_SELECT` field. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**options** | **List[str]** | | + +## Example + +```python +from opal_security.models.request_template_custom_field_multi_choice_metadata import RequestTemplateCustomFieldMultiChoiceMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of RequestTemplateCustomFieldMultiChoiceMetadata from a JSON string +request_template_custom_field_multi_choice_metadata_instance = RequestTemplateCustomFieldMultiChoiceMetadata.from_json(json) +# print the JSON string representation of the object +print(RequestTemplateCustomFieldMultiChoiceMetadata.to_json()) + +# convert the object into a dict +request_template_custom_field_multi_choice_metadata_dict = request_template_custom_field_multi_choice_metadata_instance.to_dict() +# create an instance of RequestTemplateCustomFieldMultiChoiceMetadata from a dict +request_template_custom_field_multi_choice_metadata_from_dict = RequestTemplateCustomFieldMultiChoiceMetadata.from_dict(request_template_custom_field_multi_choice_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RequestTemplateCustomFieldTypeEnum.md b/docs/RequestTemplateCustomFieldTypeEnum.md index 9a6bebc..24be109 100644 --- a/docs/RequestTemplateCustomFieldTypeEnum.md +++ b/docs/RequestTemplateCustomFieldTypeEnum.md @@ -1,6 +1,6 @@ # RequestTemplateCustomFieldTypeEnum -The type of the custom request field. +The type of the custom request field. `CALLOUT` fields are display-only -- they show a message to the requester and collect no answer, so they never appear in a request's `custom_fields`. ## Enum @@ -12,6 +12,10 @@ The type of the custom request field. * `MULTI_CHOICE` (value: `'MULTI_CHOICE'`) +* `MULTI_SELECT` (value: `'MULTI_SELECT'`) + +* `CALLOUT` (value: `'CALLOUT'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RequestTemplatesApi.md b/docs/RequestTemplatesApi.md new file mode 100644 index 0000000..fd9b478 --- /dev/null +++ b/docs/RequestTemplatesApi.md @@ -0,0 +1,393 @@ +# opal_security.RequestTemplatesApi + +All URIs are relative to *https://api.opal.dev/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_request_template**](RequestTemplatesApi.md#create_request_template) | **POST** /request-templates | +[**delete_request_template**](RequestTemplatesApi.md#delete_request_template) | **DELETE** /request-templates/{request_template_id} | +[**get_request_template**](RequestTemplatesApi.md#get_request_template) | **GET** /request-templates/{request_template_id} | +[**get_request_templates**](RequestTemplatesApi.md#get_request_templates) | **GET** /request-templates | +[**update_request_template**](RequestTemplatesApi.md#update_request_template) | **PUT** /request-templates | + + +# **create_request_template** +> RequestTemplate create_request_template(create_request_template_info) + +Creates a request template. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.create_request_template_info import CreateRequestTemplateInfo +from opal_security.models.request_template import RequestTemplate +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.RequestTemplatesApi(api_client) + create_request_template_info = opal_security.CreateRequestTemplateInfo() # CreateRequestTemplateInfo | + + try: + api_response = api_instance.create_request_template(create_request_template_info) + print("The response of RequestTemplatesApi->create_request_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RequestTemplatesApi->create_request_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_request_template_info** | [**CreateRequestTemplateInfo**](CreateRequestTemplateInfo.md)| | + +### Return type + +[**RequestTemplate**](RequestTemplate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The request template just created. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_request_template** +> delete_request_template(request_template_id) + +Deletes a request template. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.RequestTemplatesApi(api_client) + request_template_id = UUID('4baf8423-db0a-4037-a4cf-f79c60cb67a5') # UUID | The ID of the request template. + + try: + api_instance.delete_request_template(request_template_id) + except Exception as e: + print("Exception when calling RequestTemplatesApi->delete_request_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_template_id** | **UUID**| The ID of the request template. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The request template was successfully deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_request_template** +> RequestTemplate get_request_template(request_template_id) + +Returns a `RequestTemplate` object. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.request_template import RequestTemplate +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.RequestTemplatesApi(api_client) + request_template_id = UUID('4baf8423-db0a-4037-a4cf-f79c60cb67a5') # UUID | The ID of the request template. + + try: + api_response = api_instance.get_request_template(request_template_id) + print("The response of RequestTemplatesApi->get_request_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RequestTemplatesApi->get_request_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_template_id** | **UUID**| The ID of the request template. | + +### Return type + +[**RequestTemplate**](RequestTemplate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The requested request template. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_request_templates** +> PaginatedRequestTemplateList get_request_templates() + +Returns a list of `RequestTemplate` objects. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.paginated_request_template_list import PaginatedRequestTemplateList +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.RequestTemplatesApi(api_client) + + try: + api_response = api_instance.get_request_templates() + print("The response of RequestTemplatesApi->get_request_templates:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RequestTemplatesApi->get_request_templates: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**PaginatedRequestTemplateList**](PaginatedRequestTemplateList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | One page worth of request templates for your organization. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_request_template** +> RequestTemplate update_request_template(update_request_template_info) + +Updates a request template. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.request_template import RequestTemplate +from opal_security.models.update_request_template_info import UpdateRequestTemplateInfo +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.RequestTemplatesApi(api_client) + update_request_template_info = opal_security.UpdateRequestTemplateInfo() # UpdateRequestTemplateInfo | Request template to be updated + + try: + api_response = api_instance.update_request_template(update_request_template_info) + print("The response of RequestTemplatesApi->update_request_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RequestTemplatesApi->update_request_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_request_template_info** | [**UpdateRequestTemplateInfo**](UpdateRequestTemplateInfo.md)| Request template to be updated | + +### Return type + +[**RequestTemplate**](RequestTemplate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The request template just updated. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/RequestsApi.md b/docs/RequestsApi.md index 20b3a31..777ef0c 100644 --- a/docs/RequestsApi.md +++ b/docs/RequestsApi.md @@ -5,13 +5,17 @@ All URIs are relative to *https://api.opal.dev/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**approve_request**](RequestsApi.md#approve_request) | **POST** /requests/{id}/approve | +[**cancel_request**](RequestsApi.md#cancel_request) | **POST** /requests/{id}/cancel | Cancel request [**create_request**](RequestsApi.md#create_request) | **POST** /requests | [**create_request_comment**](RequestsApi.md#create_request_comment) | **POST** /requests/{id}/comments | [**deny_request**](RequestsApi.md#deny_request) | **POST** /requests/{id}/deny | +[**escalate_request**](RequestsApi.md#escalate_request) | **POST** /requests/{id}/escalate | Escalate request to skip-manager [**get_request**](RequestsApi.md#get_request) | **GET** /requests/{id} | Get request by ID [**get_request_comments**](RequestsApi.md#get_request_comments) | **GET** /requests/{id}/comments | [**get_requests**](RequestsApi.md#get_requests) | **GET** /requests | Get requests [**get_requests_relay**](RequestsApi.md#get_requests_relay) | **GET** /requests/relay | Get requests via Relay +[**remind_request**](RequestsApi.md#remind_request) | **POST** /requests/{id}/remind | Send request reminder +[**remind_request_reviewer**](RequestsApi.md#remind_request_reviewer) | **POST** /requests/{id}/reviewers/{reviewer_id}/remind | Send reminder to a reviewer # **approve_request** @@ -94,6 +98,93 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **cancel_request** +> Request cancel_request(id, cancel_request_request=cancel_request_request) + +Cancel request + +Cancels a pending access request. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.cancel_request_request import CancelRequestRequest +from opal_security.models.request import Request +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.RequestsApi(api_client) + id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | The ID of the request to cancel. + cancel_request_request = opal_security.CancelRequestRequest() # CancelRequestRequest | (optional) + + try: + # Cancel request + api_response = api_instance.cancel_request(id, cancel_request_request=cancel_request_request) + print("The response of RequestsApi->cancel_request:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RequestsApi->cancel_request: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **UUID**| The ID of the request to cancel. | + **cancel_request_request** | [**CancelRequestRequest**](CancelRequestRequest.md)| | [optional] + +### Return type + +[**Request**](Request.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The canceled request. | - | +**400** | The request body is invalid, or `acting_user_id` names a system or service user, or a user who is not active in the identity provider. | - | +**403** | The authenticated user cannot cancel this request, or is not allowed to act for users. | - | +**404** | The request, or the user named by `acting_user_id`, was not found. | - | +**409** | The request has already been actioned. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **create_request** > CreateRequest200Response create_request(create_request_info) @@ -332,6 +423,92 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **escalate_request** +> EscalateRequest200Response escalate_request(id) + +Escalate request to skip-manager + +Escalates a pending access request to the target user's skip-level manager. +Only the request's requester may call this endpoint. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.escalate_request200_response import EscalateRequest200Response +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.RequestsApi(api_client) + id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | The ID of the request to escalate. + + try: + # Escalate request to skip-manager + api_response = api_instance.escalate_request(id) + print("The response of RequestsApi->escalate_request:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RequestsApi->escalate_request: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **UUID**| The ID of the request to escalate. | + +### Return type + +[**EscalateRequest200Response**](EscalateRequest200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The request was escalated, or was already approved or denied. | - | +**400** | Unknown JSON fields in the request body, the request does not require manager approval, or the target user has no manager / skip-manager set. | - | +**403** | The authenticated user cannot escalate this request. | - | +**404** | The request was not found. | - | +**409** | The request has already been escalated, or the manager has already approved. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_request** > Request get_request(id) @@ -490,7 +667,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_requests** -> RequestList get_requests(start_date_filter=start_date_filter, end_date_filter=end_date_filter, requester_id=requester_id, target_user_id=target_user_id, resource_id=resource_id, group_id=group_id, cursor=cursor, page_size=page_size, show_pending_only=show_pending_only) +> RequestList get_requests(start_date_filter=start_date_filter, end_date_filter=end_date_filter, requester_id=requester_id, target_user_id=target_user_id, resource_id=resource_id, group_id=group_id, app_id=app_id, cursor=cursor, page_size=page_size, show_pending_only=show_pending_only) Get requests @@ -534,13 +711,14 @@ with opal_security.ApiClient(configuration) as api_client: target_user_id = UUID('37cb7e41-12ba-46da-92ff-030abe0450b1') # UUID | Filter requests by their target user ID. (optional) resource_id = UUID('37cb7e41-12ba-46da-92ff-030abe0450b1') # UUID | Filter requests by the resource ID that was requested. (optional) group_id = UUID('37cb7e41-12ba-46da-92ff-030abe0450b1') # UUID | Filter requests by the group ID that was requested. (optional) + app_id = UUID('37cb7e41-12ba-46da-92ff-030abe0450b1') # UUID | Filter requests by the ID of the app that a requested resource or group belongs to. Returns an empty page if the app does not exist or has no requests visible to the caller. (optional) cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional) page_size = 200 # int | Number of results to return per page. Default is 200. (optional) show_pending_only = True # bool | Boolean toggle for if it should only show pending requests. (optional) try: # Get requests - api_response = api_instance.get_requests(start_date_filter=start_date_filter, end_date_filter=end_date_filter, requester_id=requester_id, target_user_id=target_user_id, resource_id=resource_id, group_id=group_id, cursor=cursor, page_size=page_size, show_pending_only=show_pending_only) + api_response = api_instance.get_requests(start_date_filter=start_date_filter, end_date_filter=end_date_filter, requester_id=requester_id, target_user_id=target_user_id, resource_id=resource_id, group_id=group_id, app_id=app_id, cursor=cursor, page_size=page_size, show_pending_only=show_pending_only) print("The response of RequestsApi->get_requests:\n") pprint(api_response) except Exception as e: @@ -560,6 +738,7 @@ Name | Type | Description | Notes **target_user_id** | **UUID**| Filter requests by their target user ID. | [optional] **resource_id** | **UUID**| Filter requests by the resource ID that was requested. | [optional] **group_id** | **UUID**| Filter requests by the group ID that was requested. | [optional] + **app_id** | **UUID**| Filter requests by the ID of the app that a requested resource or group belongs to. Returns an empty page if the app does not exist or has no requests visible to the caller. | [optional] **cursor** | **str**| The pagination cursor value. | [optional] **page_size** | **int**| Number of results to return per page. Default is 200. | [optional] **show_pending_only** | **bool**| Boolean toggle for if it should only show pending requests. | [optional] @@ -678,3 +857,171 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **remind_request** +> EscalateRequest200Response remind_request(id) + +Send request reminder + +Sends a reminder to all pending reviewers of the request. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.escalate_request200_response import EscalateRequest200Response +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.RequestsApi(api_client) + id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | The ID of the request whose reviewers should be reminded. + + try: + # Send request reminder + api_response = api_instance.remind_request(id) + print("The response of RequestsApi->remind_request:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RequestsApi->remind_request: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **UUID**| The ID of the request whose reviewers should be reminded. | + +### Return type + +[**EscalateRequest200Response**](EscalateRequest200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The reminder was sent, or the request was already resolved. | - | +**400** | Unknown JSON fields in the request body. | - | +**404** | The request was not found. | - | +**429** | The reviewer reminder cooldown has not elapsed. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **remind_request_reviewer** +> EscalateRequest200Response remind_request_reviewer(id, reviewer_id) + +Send reminder to a reviewer + +Sends a reminder to one pending reviewer of the request. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.escalate_request200_response import EscalateRequest200Response +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.RequestsApi(api_client) + id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | The ID of the request whose reviewer should be reminded. + reviewer_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | The ID of the pending reviewer to remind. + + try: + # Send reminder to a reviewer + api_response = api_instance.remind_request_reviewer(id, reviewer_id) + print("The response of RequestsApi->remind_request_reviewer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RequestsApi->remind_request_reviewer: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **UUID**| The ID of the request whose reviewer should be reminded. | + **reviewer_id** | **UUID**| The ID of the pending reviewer to remind. | + +### Return type + +[**EscalateRequest200Response**](EscalateRequest200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The reminder was sent, or the request was already resolved. | - | +**400** | Unknown JSON fields, or the user is not a pending reviewer of the request. | - | +**404** | The request was not found. | - | +**429** | The reviewer reminder cooldown has not elapsed. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Resource.md b/docs/Resource.md index f87a8d0..c2588da 100644 --- a/docs/Resource.md +++ b/docs/Resource.md @@ -20,23 +20,27 @@ Name | Type | Description | Notes **require_manager_approval** | **bool** | A bool representing whether or not access requests to the resource require manager approval. | [optional] **require_support_ticket** | **bool** | A bool representing whether or not access requests to the resource require an access ticket. | [optional] **require_mfa_to_approve** | **bool** | A bool representing whether or not to require MFA for reviewers to approve requests for this resource. | [optional] +**requires_forfeit_reason** | **bool** | A bool representing whether or not a reason is required when forfeiting access to this resource. | [optional] **require_mfa_to_request** | **bool** | A bool representing whether or not to require MFA for requesting access to this resource. | [optional] **require_mfa_to_connect** | **bool** | A bool representing whether or not to require MFA to connect to this resource. | [optional] **auto_approval** | **bool** | A bool representing whether or not to automatically approve requests to this resource. | [optional] **request_template_id** | **UUID** | The ID of the associated request template. | [optional] -**is_requestable** | **bool** | A bool representing whether or not to allow access requests to this resource. | [optional] +**is_requestable** | **bool** | A bool representing whether or not to allow access requests to this resource. Deprecated in favor of `request_configurations`. | [optional] **parent_resource_id** | **UUID** | The ID of the parent resource. | [optional] **configuration_template_id** | **UUID** | The ID of the associated configuration template. | [optional] **request_configurations** | [**List[RequestConfiguration]**](RequestConfiguration.md) | A list of configurations for requests to this resource. | [optional] **request_configuration_list** | [**List[RequestConfiguration]**](RequestConfiguration.md) | A list of configurations for requests to this resource. Deprecated in favor of `request_configurations`. | [optional] **ticket_propagation** | [**TicketPropagationConfiguration**](TicketPropagationConfiguration.md) | | [optional] **custom_request_notification** | **str** | Custom request notification sent upon request approval. | [optional] +**max_direct_users_allowed** | **int** | The maximum number of direct users allowed for this resource at once. Set to null to remove the limit. | [optional] **risk_sensitivity** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | The risk sensitivity level for the resource. When an override is set, this field will match that. | [optional] [readonly] **risk_sensitivity_override** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | | [optional] **metadata** | **str** | JSON metadata about the remote resource. Only set for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details. | [optional] **remote_info** | [**ResourceRemoteInfo**](ResourceRemoteInfo.md) | | [optional] **ancestor_resource_ids** | **List[UUID]** | List of resource IDs that are ancestors of this resource. | [optional] **descendant_resource_ids** | **List[UUID]** | List of resource IDs that are descendants of this resource. | [optional] +**match_remote_name** | **bool** | A bool representing whether or not the resource's name is synced from the end system. When true, the name is overwritten with the remote name on each sync. Defaults to false. | [optional] +**match_remote_description** | **bool** | A bool representing whether or not the resource's description is synced from the end system. When true, the description is overwritten with the remote description on each sync. Defaults to false. | [optional] **last_successful_sync** | [**SyncTask**](SyncTask.md) | Information about the last successful sync of this resource. | [optional] [readonly] ## Example diff --git a/docs/ResourceAccessLevelList.md b/docs/ResourceAccessLevelList.md new file mode 100644 index 0000000..0fac1b3 --- /dev/null +++ b/docs/ResourceAccessLevelList.md @@ -0,0 +1,30 @@ +# ResourceAccessLevelList + +A list of access levels defined for a resource. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[ResourceAccessLevel]**](ResourceAccessLevel.md) | | [optional] + +## Example + +```python +from opal_security.models.resource_access_level_list import ResourceAccessLevelList + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceAccessLevelList from a JSON string +resource_access_level_list_instance = ResourceAccessLevelList.from_json(json) +# print the JSON string representation of the object +print(ResourceAccessLevelList.to_json()) + +# convert the object into a dict +resource_access_level_list_dict = resource_access_level_list_instance.to_dict() +# create an instance of ResourceAccessLevelList from a dict +resource_access_level_list_from_dict = ResourceAccessLevelList.from_dict(resource_access_level_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceConfigurationTemplate.md b/docs/ResourceConfigurationTemplate.md new file mode 100644 index 0000000..c73a9b9 --- /dev/null +++ b/docs/ResourceConfigurationTemplate.md @@ -0,0 +1,30 @@ +# ResourceConfigurationTemplate + +A reference, by ID only, to the configuration template a resource is linked to. This schema does not include any of the template's own fields (name, description, request configurations, visibility, etc.) — to read or modify those, use the `/configuration-templates` endpoints with the ID carried here. A `null` `configuration_template_id` indicates that the resource is not linked to a configuration template and uses its own private configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**configuration_template_id** | **UUID** | The ID of the configuration template that the resource is linked to, or `null` if the resource is not linked to a configuration template. Only the ID is exposed here; the template's own fields are managed through the `/configuration-templates` endpoints. | + +## Example + +```python +from opal_security.models.resource_configuration_template import ResourceConfigurationTemplate + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceConfigurationTemplate from a JSON string +resource_configuration_template_instance = ResourceConfigurationTemplate.from_json(json) +# print the JSON string representation of the object +print(ResourceConfigurationTemplate.to_json()) + +# convert the object into a dict +resource_configuration_template_dict = resource_configuration_template_instance.to_dict() +# create an instance of ResourceConfigurationTemplate from a dict +resource_configuration_template_from_dict = ResourceConfigurationTemplate.from_dict(resource_configuration_template_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceCustomAccessLevelList.md b/docs/ResourceCustomAccessLevelList.md new file mode 100644 index 0000000..b83c8a4 --- /dev/null +++ b/docs/ResourceCustomAccessLevelList.md @@ -0,0 +1,30 @@ +# ResourceCustomAccessLevelList + +A list of custom access levels. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**custom_access_levels** | [**List[ResourceCustomAccessLevelResponse]**](ResourceCustomAccessLevelResponse.md) | | + +## Example + +```python +from opal_security.models.resource_custom_access_level_list import ResourceCustomAccessLevelList + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceCustomAccessLevelList from a JSON string +resource_custom_access_level_list_instance = ResourceCustomAccessLevelList.from_json(json) +# print the JSON string representation of the object +print(ResourceCustomAccessLevelList.to_json()) + +# convert the object into a dict +resource_custom_access_level_list_dict = resource_custom_access_level_list_instance.to_dict() +# create an instance of ResourceCustomAccessLevelList from a dict +resource_custom_access_level_list_from_dict = ResourceCustomAccessLevelList.from_dict(resource_custom_access_level_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceCustomAccessLevelResponse.md b/docs/ResourceCustomAccessLevelResponse.md new file mode 100644 index 0000000..0547d73 --- /dev/null +++ b/docs/ResourceCustomAccessLevelResponse.md @@ -0,0 +1,38 @@ +# ResourceCustomAccessLevelResponse + +A custom access level for a resource. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource_custom_access_level_id** | **UUID** | The unique ID of the custom access level. | +**resource_id** | **UUID** | The resource this access level belongs to. | +**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | | +**policy** | **str** | The policy document for this access level. | [optional] +**requestable_by_default** | **bool** | Whether this role is requestable. | +**stackable_sensitivity_index** | **int** | The sensitivity index in the access hierarchy. Null if unranked. | [optional] +**member_resource_ids** | **List[UUID]** | When addressed via a parent resource, lists the child resource IDs that back this aggregated entry. | [optional] +**created_at** | **datetime** | | [optional] +**updated_at** | **datetime** | | [optional] + +## Example + +```python +from opal_security.models.resource_custom_access_level_response import ResourceCustomAccessLevelResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceCustomAccessLevelResponse from a JSON string +resource_custom_access_level_response_instance = ResourceCustomAccessLevelResponse.from_json(json) +# print the JSON string representation of the object +print(ResourceCustomAccessLevelResponse.to_json()) + +# convert the object into a dict +resource_custom_access_level_response_dict = resource_custom_access_level_response_instance.to_dict() +# create an instance of ResourceCustomAccessLevelResponse from a dict +resource_custom_access_level_response_from_dict = ResourceCustomAccessLevelResponse.from_dict(resource_custom_access_level_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfo.md b/docs/ResourceRemoteInfo.md index aad6e03..e9f923e 100644 --- a/docs/ResourceRemoteInfo.md +++ b/docs/ResourceRemoteInfo.md @@ -38,6 +38,7 @@ Name | Type | Description | Notes **gcp_gke_cluster** | [**ResourceRemoteInfoGcpGkeCluster**](ResourceRemoteInfoGcpGkeCluster.md) | | [optional] **gcp_project** | [**ResourceRemoteInfoGcpProject**](ResourceRemoteInfoGcpProject.md) | | [optional] **gcp_sql_instance** | [**ResourceRemoteInfoGcpSqlInstance**](ResourceRemoteInfoGcpSqlInstance.md) | | [optional] +**gcp_billing_account** | [**ResourceRemoteInfoGcpBillingAccount**](ResourceRemoteInfoGcpBillingAccount.md) | | [optional] **gcp_service_account** | [**ResourceRemoteInfoGcpServiceAccount**](ResourceRemoteInfoGcpServiceAccount.md) | | [optional] **google_workspace_role** | [**ResourceRemoteInfoGoogleWorkspaceRole**](ResourceRemoteInfoGoogleWorkspaceRole.md) | | [optional] **github_repo** | [**ResourceRemoteInfoGithubRepo**](ResourceRemoteInfoGithubRepo.md) | | [optional] @@ -58,26 +59,60 @@ Name | Type | Description | Notes **workday_role** | [**ResourceRemoteInfoWorkdayRole**](ResourceRemoteInfoWorkdayRole.md) | | [optional] **salesforce_permission_set** | [**ResourceRemoteInfoSalesforcePermissionSet**](ResourceRemoteInfoSalesforcePermissionSet.md) | | [optional] **salesforce_profile** | [**ResourceRemoteInfoSalesforceProfile**](ResourceRemoteInfoSalesforceProfile.md) | | [optional] +**docusign_permission_profile** | [**ResourceRemoteInfoDocusignPermissionProfile**](ResourceRemoteInfoDocusignPermissionProfile.md) | | [optional] **salesforce_role** | [**ResourceRemoteInfoSalesforceRole**](ResourceRemoteInfoSalesforceRole.md) | | [optional] **teleport_role** | [**ResourceRemoteInfoTeleportRole**](ResourceRemoteInfoTeleportRole.md) | | [optional] **datastax_astra_role** | [**ResourceRemoteInfoDatastaxAstraRole**](ResourceRemoteInfoDatastaxAstraRole.md) | | [optional] **coupa_role** | [**ResourceRemoteInfoCoupaRole**](ResourceRemoteInfoCoupaRole.md) | | [optional] **cursor_organization** | [**ResourceRemoteInfoCursorOrganization**](ResourceRemoteInfoCursorOrganization.md) | | [optional] +**cursor_origin_repository** | [**ResourceRemoteInfoCursorOriginRepository**](ResourceRemoteInfoCursorOriginRepository.md) | | [optional] **openai_platform_project** | [**ResourceRemoteInfoOpenaiPlatformProject**](ResourceRemoteInfoOpenaiPlatformProject.md) | | [optional] **openai_platform_service_account** | [**ResourceRemoteInfoOpenaiPlatformServiceAccount**](ResourceRemoteInfoOpenaiPlatformServiceAccount.md) | | [optional] **anthropic_workspace** | [**ResourceRemoteInfoAnthropicWorkspace**](ResourceRemoteInfoAnthropicWorkspace.md) | | [optional] +**slack_organization** | [**ResourceRemoteInfoSlackOrganization**](ResourceRemoteInfoSlackOrganization.md) | | [optional] **oracle_fusion_role** | [**ResourceRemoteInfoOracleFusionRole**](ResourceRemoteInfoOracleFusionRole.md) | | [optional] **devin_organization** | [**ResourceRemoteInfoDevinOrganization**](ResourceRemoteInfoDevinOrganization.md) | | [optional] **devin_role** | [**ResourceRemoteInfoDevinRole**](ResourceRemoteInfoDevinRole.md) | | [optional] **netsuite_role** | [**ResourceRemoteInfoNetsuiteRole**](ResourceRemoteInfoNetsuiteRole.md) | | [optional] **datadog_role** | [**ResourceRemoteInfoDatadogRole**](ResourceRemoteInfoDatadogRole.md) | | [optional] **clickhouse_database** | [**ResourceRemoteInfoClickhouseDatabase**](ResourceRemoteInfoClickhouseDatabase.md) | | [optional] +**clickhouse_console_role** | [**ResourceRemoteInfoClickhouseConsoleRole**](ResourceRemoteInfoClickhouseConsoleRole.md) | | [optional] **clickhouse_table** | [**ResourceRemoteInfoClickhouseTable**](ResourceRemoteInfoClickhouseTable.md) | | [optional] **grafana_folder** | [**ResourceRemoteInfoGrafanaFolder**](ResourceRemoteInfoGrafanaFolder.md) | | [optional] **grafana_dashboard** | [**ResourceRemoteInfoGrafanaDashboard**](ResourceRemoteInfoGrafanaDashboard.md) | | [optional] **grafana_role** | [**ResourceRemoteInfoGrafanaRole**](ResourceRemoteInfoGrafanaRole.md) | | [optional] **zendesk_role** | [**ResourceRemoteInfoZendeskRole**](ResourceRemoteInfoZendeskRole.md) | | [optional] **hubspot_role** | [**ResourceRemoteInfoHubspotRole**](ResourceRemoteInfoHubspotRole.md) | | [optional] +**alicloud_ram_role** | [**ResourceRemoteInfoAlicloudRamRole**](ResourceRemoteInfoAlicloudRamRole.md) | | [optional] +**alicloud_ecs_instance** | [**ResourceRemoteInfoAlicloudEcsInstance**](ResourceRemoteInfoAlicloudEcsInstance.md) | | [optional] +**zoom_role** | [**ResourceRemoteInfoZoomRole**](ResourceRemoteInfoZoomRole.md) | | [optional] +**zoom_license** | [**ResourceRemoteInfoZoomLicense**](ResourceRemoteInfoZoomLicense.md) | | [optional] +**linear_organization** | [**ResourceRemoteInfoLinearOrganization**](ResourceRemoteInfoLinearOrganization.md) | | [optional] +**linear_project** | [**ResourceRemoteInfoLinearProject**](ResourceRemoteInfoLinearProject.md) | | [optional] +**ramp_fund** | [**ResourceRemoteInfoRampFund**](ResourceRemoteInfoRampFund.md) | | [optional] +**ramp_role** | [**ResourceRemoteInfoRampRole**](ResourceRemoteInfoRampRole.md) | | [optional] +**wrike_user_type** | [**ResourceRemoteInfoWrikeUserType**](ResourceRemoteInfoWrikeUserType.md) | | [optional] +**databricks_catalog** | [**ResourceRemoteInfoDatabricksCatalog**](ResourceRemoteInfoDatabricksCatalog.md) | | [optional] +**databricks_schema** | [**ResourceRemoteInfoDatabricksSchema**](ResourceRemoteInfoDatabricksSchema.md) | | [optional] +**databricks_volume** | [**ResourceRemoteInfoDatabricksVolume**](ResourceRemoteInfoDatabricksVolume.md) | | [optional] +**databricks_function** | [**ResourceRemoteInfoDatabricksFunction**](ResourceRemoteInfoDatabricksFunction.md) | | [optional] +**databricks_model** | [**ResourceRemoteInfoDatabricksModel**](ResourceRemoteInfoDatabricksModel.md) | | [optional] +**databricks_service** | [**ResourceRemoteInfoDatabricksService**](ResourceRemoteInfoDatabricksService.md) | | [optional] +**vercel_role** | [**ResourceRemoteInfoVercelRole**](ResourceRemoteInfoVercelRole.md) | | [optional] +**vercel_project** | [**ResourceRemoteInfoVercelProject**](ResourceRemoteInfoVercelProject.md) | | [optional] +**axiom_role** | [**ResourceRemoteInfoAxiomRole**](ResourceRemoteInfoAxiomRole.md) | | [optional] +**axiom_custom_role** | [**ResourceRemoteInfoAxiomCustomRole**](ResourceRemoteInfoAxiomCustomRole.md) | | [optional] +**box_enterprise** | [**ResourceRemoteInfoBoxEnterprise**](ResourceRemoteInfoBoxEnterprise.md) | | [optional] +**box_folder** | [**ResourceRemoteInfoBoxFolder**](ResourceRemoteInfoBoxFolder.md) | | [optional] +**asana_workspace** | [**ResourceRemoteInfoAsanaWorkspace**](ResourceRemoteInfoAsanaWorkspace.md) | | [optional] +**bitwarden_organization** | [**ResourceRemoteInfoBitwardenOrganization**](ResourceRemoteInfoBitwardenOrganization.md) | | [optional] +**calendly_role** | [**ResourceRemoteInfoCalendlyRole**](ResourceRemoteInfoCalendlyRole.md) | | [optional] +**calendly_event_type** | [**ResourceRemoteInfoCalendlyEventType**](ResourceRemoteInfoCalendlyEventType.md) | | [optional] +**onelogin_app** | [**ResourceRemoteInfoOneloginApp**](ResourceRemoteInfoOneloginApp.md) | | [optional] +**tray_workspace** | [**ResourceRemoteInfoTrayWorkspace**](ResourceRemoteInfoTrayWorkspace.md) | | [optional] +**tray_organization** | [**ResourceRemoteInfoTrayOrganization**](ResourceRemoteInfoTrayOrganization.md) | | [optional] +**rippling_department** | [**ResourceRemoteInfoRipplingDepartment**](ResourceRemoteInfoRipplingDepartment.md) | | [optional] +**slack_workspace** | [**ResourceRemoteInfoSlackWorkspace**](ResourceRemoteInfoSlackWorkspace.md) | | [optional] ## Example diff --git a/docs/ResourceRemoteInfoAlicloudEcsInstance.md b/docs/ResourceRemoteInfoAlicloudEcsInstance.md new file mode 100644 index 0000000..d0a080a --- /dev/null +++ b/docs/ResourceRemoteInfoAlicloudEcsInstance.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoAlicloudEcsInstance + +Remote info for AliCloud ECS instance. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instance_id** | **str** | The ID of the ECS instance. | + +## Example + +```python +from opal_security.models.resource_remote_info_alicloud_ecs_instance import ResourceRemoteInfoAlicloudEcsInstance + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoAlicloudEcsInstance from a JSON string +resource_remote_info_alicloud_ecs_instance_instance = ResourceRemoteInfoAlicloudEcsInstance.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoAlicloudEcsInstance.to_json()) + +# convert the object into a dict +resource_remote_info_alicloud_ecs_instance_dict = resource_remote_info_alicloud_ecs_instance_instance.to_dict() +# create an instance of ResourceRemoteInfoAlicloudEcsInstance from a dict +resource_remote_info_alicloud_ecs_instance_from_dict = ResourceRemoteInfoAlicloudEcsInstance.from_dict(resource_remote_info_alicloud_ecs_instance_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoAlicloudRamRole.md b/docs/ResourceRemoteInfoAlicloudRamRole.md new file mode 100644 index 0000000..5473583 --- /dev/null +++ b/docs/ResourceRemoteInfoAlicloudRamRole.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoAlicloudRamRole + +Remote info for AliCloud RAM role. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_arn** | **str** | The ARN of the AliCloud RAM role. | + +## Example + +```python +from opal_security.models.resource_remote_info_alicloud_ram_role import ResourceRemoteInfoAlicloudRamRole + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoAlicloudRamRole from a JSON string +resource_remote_info_alicloud_ram_role_instance = ResourceRemoteInfoAlicloudRamRole.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoAlicloudRamRole.to_json()) + +# convert the object into a dict +resource_remote_info_alicloud_ram_role_dict = resource_remote_info_alicloud_ram_role_instance.to_dict() +# create an instance of ResourceRemoteInfoAlicloudRamRole from a dict +resource_remote_info_alicloud_ram_role_from_dict = ResourceRemoteInfoAlicloudRamRole.from_dict(resource_remote_info_alicloud_ram_role_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoAsanaWorkspace.md b/docs/ResourceRemoteInfoAsanaWorkspace.md new file mode 100644 index 0000000..3cffd29 --- /dev/null +++ b/docs/ResourceRemoteInfoAsanaWorkspace.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoAsanaWorkspace + +Remote info for Asana Workspace. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**workspace_gid** | **str** | The workspace gid of the Asana Workspace. | + +## Example + +```python +from opal_security.models.resource_remote_info_asana_workspace import ResourceRemoteInfoAsanaWorkspace + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoAsanaWorkspace from a JSON string +resource_remote_info_asana_workspace_instance = ResourceRemoteInfoAsanaWorkspace.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoAsanaWorkspace.to_json()) + +# convert the object into a dict +resource_remote_info_asana_workspace_dict = resource_remote_info_asana_workspace_instance.to_dict() +# create an instance of ResourceRemoteInfoAsanaWorkspace from a dict +resource_remote_info_asana_workspace_from_dict = ResourceRemoteInfoAsanaWorkspace.from_dict(resource_remote_info_asana_workspace_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoAxiomCustomRole.md b/docs/ResourceRemoteInfoAxiomCustomRole.md new file mode 100644 index 0000000..e86c531 --- /dev/null +++ b/docs/ResourceRemoteInfoAxiomCustomRole.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoAxiomCustomRole + +Remote info for Axiom custom RBAC role. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_id** | **str** | The ID of the Axiom custom role. | + +## Example + +```python +from opal_security.models.resource_remote_info_axiom_custom_role import ResourceRemoteInfoAxiomCustomRole + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoAxiomCustomRole from a JSON string +resource_remote_info_axiom_custom_role_instance = ResourceRemoteInfoAxiomCustomRole.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoAxiomCustomRole.to_json()) + +# convert the object into a dict +resource_remote_info_axiom_custom_role_dict = resource_remote_info_axiom_custom_role_instance.to_dict() +# create an instance of ResourceRemoteInfoAxiomCustomRole from a dict +resource_remote_info_axiom_custom_role_from_dict = ResourceRemoteInfoAxiomCustomRole.from_dict(resource_remote_info_axiom_custom_role_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoAxiomRole.md b/docs/ResourceRemoteInfoAxiomRole.md new file mode 100644 index 0000000..f439afb --- /dev/null +++ b/docs/ResourceRemoteInfoAxiomRole.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoAxiomRole + +Remote info for Axiom base role. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_id** | **str** | The ID of the Axiom base role. | + +## Example + +```python +from opal_security.models.resource_remote_info_axiom_role import ResourceRemoteInfoAxiomRole + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoAxiomRole from a JSON string +resource_remote_info_axiom_role_instance = ResourceRemoteInfoAxiomRole.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoAxiomRole.to_json()) + +# convert the object into a dict +resource_remote_info_axiom_role_dict = resource_remote_info_axiom_role_instance.to_dict() +# create an instance of ResourceRemoteInfoAxiomRole from a dict +resource_remote_info_axiom_role_from_dict = ResourceRemoteInfoAxiomRole.from_dict(resource_remote_info_axiom_role_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoBitwardenOrganization.md b/docs/ResourceRemoteInfoBitwardenOrganization.md new file mode 100644 index 0000000..bd0794f --- /dev/null +++ b/docs/ResourceRemoteInfoBitwardenOrganization.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoBitwardenOrganization + +Remote info for Bitwarden Organization. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_id** | **str** | The organization id of the Bitwarden Organization. | + +## Example + +```python +from opal_security.models.resource_remote_info_bitwarden_organization import ResourceRemoteInfoBitwardenOrganization + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoBitwardenOrganization from a JSON string +resource_remote_info_bitwarden_organization_instance = ResourceRemoteInfoBitwardenOrganization.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoBitwardenOrganization.to_json()) + +# convert the object into a dict +resource_remote_info_bitwarden_organization_dict = resource_remote_info_bitwarden_organization_instance.to_dict() +# create an instance of ResourceRemoteInfoBitwardenOrganization from a dict +resource_remote_info_bitwarden_organization_from_dict = ResourceRemoteInfoBitwardenOrganization.from_dict(resource_remote_info_bitwarden_organization_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoBoxEnterprise.md b/docs/ResourceRemoteInfoBoxEnterprise.md new file mode 100644 index 0000000..fabedc8 --- /dev/null +++ b/docs/ResourceRemoteInfoBoxEnterprise.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoBoxEnterprise + +Remote info for Box Enterprise. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource_id** | **str** | The resource id of the Box Enterprise. | + +## Example + +```python +from opal_security.models.resource_remote_info_box_enterprise import ResourceRemoteInfoBoxEnterprise + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoBoxEnterprise from a JSON string +resource_remote_info_box_enterprise_instance = ResourceRemoteInfoBoxEnterprise.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoBoxEnterprise.to_json()) + +# convert the object into a dict +resource_remote_info_box_enterprise_dict = resource_remote_info_box_enterprise_instance.to_dict() +# create an instance of ResourceRemoteInfoBoxEnterprise from a dict +resource_remote_info_box_enterprise_from_dict = ResourceRemoteInfoBoxEnterprise.from_dict(resource_remote_info_box_enterprise_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoBoxFolder.md b/docs/ResourceRemoteInfoBoxFolder.md new file mode 100644 index 0000000..b513a14 --- /dev/null +++ b/docs/ResourceRemoteInfoBoxFolder.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoBoxFolder + +Remote info for Box Folder. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource_id** | **str** | The resource id of the Box Folder. | + +## Example + +```python +from opal_security.models.resource_remote_info_box_folder import ResourceRemoteInfoBoxFolder + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoBoxFolder from a JSON string +resource_remote_info_box_folder_instance = ResourceRemoteInfoBoxFolder.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoBoxFolder.to_json()) + +# convert the object into a dict +resource_remote_info_box_folder_dict = resource_remote_info_box_folder_instance.to_dict() +# create an instance of ResourceRemoteInfoBoxFolder from a dict +resource_remote_info_box_folder_from_dict = ResourceRemoteInfoBoxFolder.from_dict(resource_remote_info_box_folder_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoCalendlyEventType.md b/docs/ResourceRemoteInfoCalendlyEventType.md new file mode 100644 index 0000000..ebdd725 --- /dev/null +++ b/docs/ResourceRemoteInfoCalendlyEventType.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoCalendlyEventType + +Remote info for Calendly Event Type. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource_id** | **str** | The resource id of the Calendly Event Type. | + +## Example + +```python +from opal_security.models.resource_remote_info_calendly_event_type import ResourceRemoteInfoCalendlyEventType + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoCalendlyEventType from a JSON string +resource_remote_info_calendly_event_type_instance = ResourceRemoteInfoCalendlyEventType.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoCalendlyEventType.to_json()) + +# convert the object into a dict +resource_remote_info_calendly_event_type_dict = resource_remote_info_calendly_event_type_instance.to_dict() +# create an instance of ResourceRemoteInfoCalendlyEventType from a dict +resource_remote_info_calendly_event_type_from_dict = ResourceRemoteInfoCalendlyEventType.from_dict(resource_remote_info_calendly_event_type_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoCalendlyRole.md b/docs/ResourceRemoteInfoCalendlyRole.md new file mode 100644 index 0000000..9c065fd --- /dev/null +++ b/docs/ResourceRemoteInfoCalendlyRole.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoCalendlyRole + +Remote info for Calendly Role. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource_id** | **str** | The resource id of the Calendly Role. | + +## Example + +```python +from opal_security.models.resource_remote_info_calendly_role import ResourceRemoteInfoCalendlyRole + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoCalendlyRole from a JSON string +resource_remote_info_calendly_role_instance = ResourceRemoteInfoCalendlyRole.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoCalendlyRole.to_json()) + +# convert the object into a dict +resource_remote_info_calendly_role_dict = resource_remote_info_calendly_role_instance.to_dict() +# create an instance of ResourceRemoteInfoCalendlyRole from a dict +resource_remote_info_calendly_role_from_dict = ResourceRemoteInfoCalendlyRole.from_dict(resource_remote_info_calendly_role_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoClickhouseConsoleRole.md b/docs/ResourceRemoteInfoClickhouseConsoleRole.md new file mode 100644 index 0000000..5b67994 --- /dev/null +++ b/docs/ResourceRemoteInfoClickhouseConsoleRole.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoClickhouseConsoleRole + +Remote info for ClickHouse Cloud console role. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_id** | **str** | The UUID of the ClickHouse Cloud console role. | + +## Example + +```python +from opal_security.models.resource_remote_info_clickhouse_console_role import ResourceRemoteInfoClickhouseConsoleRole + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoClickhouseConsoleRole from a JSON string +resource_remote_info_clickhouse_console_role_instance = ResourceRemoteInfoClickhouseConsoleRole.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoClickhouseConsoleRole.to_json()) + +# convert the object into a dict +resource_remote_info_clickhouse_console_role_dict = resource_remote_info_clickhouse_console_role_instance.to_dict() +# create an instance of ResourceRemoteInfoClickhouseConsoleRole from a dict +resource_remote_info_clickhouse_console_role_from_dict = ResourceRemoteInfoClickhouseConsoleRole.from_dict(resource_remote_info_clickhouse_console_role_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoCursorOriginRepository.md b/docs/ResourceRemoteInfoCursorOriginRepository.md new file mode 100644 index 0000000..a2aa1ed --- /dev/null +++ b/docs/ResourceRemoteInfoCursorOriginRepository.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoCursorOriginRepository + +Remote info for a Cursor Origin repository. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**repository_name** | **str** | The repository's owner slug and name. | + +## Example + +```python +from opal_security.models.resource_remote_info_cursor_origin_repository import ResourceRemoteInfoCursorOriginRepository + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoCursorOriginRepository from a JSON string +resource_remote_info_cursor_origin_repository_instance = ResourceRemoteInfoCursorOriginRepository.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoCursorOriginRepository.to_json()) + +# convert the object into a dict +resource_remote_info_cursor_origin_repository_dict = resource_remote_info_cursor_origin_repository_instance.to_dict() +# create an instance of ResourceRemoteInfoCursorOriginRepository from a dict +resource_remote_info_cursor_origin_repository_from_dict = ResourceRemoteInfoCursorOriginRepository.from_dict(resource_remote_info_cursor_origin_repository_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoDatabricksCatalog.md b/docs/ResourceRemoteInfoDatabricksCatalog.md new file mode 100644 index 0000000..a4f60aa --- /dev/null +++ b/docs/ResourceRemoteInfoDatabricksCatalog.md @@ -0,0 +1,31 @@ +# ResourceRemoteInfoDatabricksCatalog + +Remote info for Databricks Unity Catalog catalog. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metastore_id** | **str** | The ID of the Unity Catalog metastore the catalog belongs to. | +**full_name** | **str** | The dot-qualified full name of the catalog (e.g. \"catalog\"). | + +## Example + +```python +from opal_security.models.resource_remote_info_databricks_catalog import ResourceRemoteInfoDatabricksCatalog + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoDatabricksCatalog from a JSON string +resource_remote_info_databricks_catalog_instance = ResourceRemoteInfoDatabricksCatalog.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoDatabricksCatalog.to_json()) + +# convert the object into a dict +resource_remote_info_databricks_catalog_dict = resource_remote_info_databricks_catalog_instance.to_dict() +# create an instance of ResourceRemoteInfoDatabricksCatalog from a dict +resource_remote_info_databricks_catalog_from_dict = ResourceRemoteInfoDatabricksCatalog.from_dict(resource_remote_info_databricks_catalog_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoDatabricksFunction.md b/docs/ResourceRemoteInfoDatabricksFunction.md new file mode 100644 index 0000000..c4a45ef --- /dev/null +++ b/docs/ResourceRemoteInfoDatabricksFunction.md @@ -0,0 +1,31 @@ +# ResourceRemoteInfoDatabricksFunction + +Remote info for Databricks Unity Catalog function. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metastore_id** | **str** | The ID of the Unity Catalog metastore the function belongs to. | +**full_name** | **str** | The dot-qualified full name of the function (e.g. \"catalog.schema.function\"). | + +## Example + +```python +from opal_security.models.resource_remote_info_databricks_function import ResourceRemoteInfoDatabricksFunction + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoDatabricksFunction from a JSON string +resource_remote_info_databricks_function_instance = ResourceRemoteInfoDatabricksFunction.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoDatabricksFunction.to_json()) + +# convert the object into a dict +resource_remote_info_databricks_function_dict = resource_remote_info_databricks_function_instance.to_dict() +# create an instance of ResourceRemoteInfoDatabricksFunction from a dict +resource_remote_info_databricks_function_from_dict = ResourceRemoteInfoDatabricksFunction.from_dict(resource_remote_info_databricks_function_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoDatabricksModel.md b/docs/ResourceRemoteInfoDatabricksModel.md new file mode 100644 index 0000000..c8c1d9f --- /dev/null +++ b/docs/ResourceRemoteInfoDatabricksModel.md @@ -0,0 +1,31 @@ +# ResourceRemoteInfoDatabricksModel + +Remote info for Databricks Unity Catalog registered model. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metastore_id** | **str** | The ID of the Unity Catalog metastore the model belongs to. | +**full_name** | **str** | The dot-qualified full name of the model (e.g. \"catalog.schema.model\"). | + +## Example + +```python +from opal_security.models.resource_remote_info_databricks_model import ResourceRemoteInfoDatabricksModel + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoDatabricksModel from a JSON string +resource_remote_info_databricks_model_instance = ResourceRemoteInfoDatabricksModel.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoDatabricksModel.to_json()) + +# convert the object into a dict +resource_remote_info_databricks_model_dict = resource_remote_info_databricks_model_instance.to_dict() +# create an instance of ResourceRemoteInfoDatabricksModel from a dict +resource_remote_info_databricks_model_from_dict = ResourceRemoteInfoDatabricksModel.from_dict(resource_remote_info_databricks_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoDatabricksSchema.md b/docs/ResourceRemoteInfoDatabricksSchema.md new file mode 100644 index 0000000..d5d065a --- /dev/null +++ b/docs/ResourceRemoteInfoDatabricksSchema.md @@ -0,0 +1,31 @@ +# ResourceRemoteInfoDatabricksSchema + +Remote info for Databricks Unity Catalog schema. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metastore_id** | **str** | The ID of the Unity Catalog metastore the schema belongs to. | +**full_name** | **str** | The dot-qualified full name of the schema (e.g. \"catalog.schema\"). | + +## Example + +```python +from opal_security.models.resource_remote_info_databricks_schema import ResourceRemoteInfoDatabricksSchema + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoDatabricksSchema from a JSON string +resource_remote_info_databricks_schema_instance = ResourceRemoteInfoDatabricksSchema.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoDatabricksSchema.to_json()) + +# convert the object into a dict +resource_remote_info_databricks_schema_dict = resource_remote_info_databricks_schema_instance.to_dict() +# create an instance of ResourceRemoteInfoDatabricksSchema from a dict +resource_remote_info_databricks_schema_from_dict = ResourceRemoteInfoDatabricksSchema.from_dict(resource_remote_info_databricks_schema_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoDatabricksService.md b/docs/ResourceRemoteInfoDatabricksService.md new file mode 100644 index 0000000..bdb90f4 --- /dev/null +++ b/docs/ResourceRemoteInfoDatabricksService.md @@ -0,0 +1,31 @@ +# ResourceRemoteInfoDatabricksService + +Remote info for Databricks AI Gateway service. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metastore_id** | **str** | The ID of the Unity Catalog metastore the service belongs to. | +**full_name** | **str** | The dot-qualified full name of the service (e.g. \"catalog.schema.service\"). | + +## Example + +```python +from opal_security.models.resource_remote_info_databricks_service import ResourceRemoteInfoDatabricksService + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoDatabricksService from a JSON string +resource_remote_info_databricks_service_instance = ResourceRemoteInfoDatabricksService.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoDatabricksService.to_json()) + +# convert the object into a dict +resource_remote_info_databricks_service_dict = resource_remote_info_databricks_service_instance.to_dict() +# create an instance of ResourceRemoteInfoDatabricksService from a dict +resource_remote_info_databricks_service_from_dict = ResourceRemoteInfoDatabricksService.from_dict(resource_remote_info_databricks_service_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoDatabricksVolume.md b/docs/ResourceRemoteInfoDatabricksVolume.md new file mode 100644 index 0000000..969ddc6 --- /dev/null +++ b/docs/ResourceRemoteInfoDatabricksVolume.md @@ -0,0 +1,31 @@ +# ResourceRemoteInfoDatabricksVolume + +Remote info for Databricks Unity Catalog volume. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metastore_id** | **str** | The ID of the Unity Catalog metastore the volume belongs to. | +**full_name** | **str** | The dot-qualified full name of the volume (e.g. \"catalog.schema.volume\"). | + +## Example + +```python +from opal_security.models.resource_remote_info_databricks_volume import ResourceRemoteInfoDatabricksVolume + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoDatabricksVolume from a JSON string +resource_remote_info_databricks_volume_instance = ResourceRemoteInfoDatabricksVolume.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoDatabricksVolume.to_json()) + +# convert the object into a dict +resource_remote_info_databricks_volume_dict = resource_remote_info_databricks_volume_instance.to_dict() +# create an instance of ResourceRemoteInfoDatabricksVolume from a dict +resource_remote_info_databricks_volume_from_dict = ResourceRemoteInfoDatabricksVolume.from_dict(resource_remote_info_databricks_volume_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoDocusignPermissionProfile.md b/docs/ResourceRemoteInfoDocusignPermissionProfile.md new file mode 100644 index 0000000..4b1024a --- /dev/null +++ b/docs/ResourceRemoteInfoDocusignPermissionProfile.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoDocusignPermissionProfile + +Remote info for Docusign permission profile. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**permission_profile_id** | **str** | The ID of the Docusign permission profile. | + +## Example + +```python +from opal_security.models.resource_remote_info_docusign_permission_profile import ResourceRemoteInfoDocusignPermissionProfile + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoDocusignPermissionProfile from a JSON string +resource_remote_info_docusign_permission_profile_instance = ResourceRemoteInfoDocusignPermissionProfile.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoDocusignPermissionProfile.to_json()) + +# convert the object into a dict +resource_remote_info_docusign_permission_profile_dict = resource_remote_info_docusign_permission_profile_instance.to_dict() +# create an instance of ResourceRemoteInfoDocusignPermissionProfile from a dict +resource_remote_info_docusign_permission_profile_from_dict = ResourceRemoteInfoDocusignPermissionProfile.from_dict(resource_remote_info_docusign_permission_profile_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoGcpBillingAccount.md b/docs/ResourceRemoteInfoGcpBillingAccount.md new file mode 100644 index 0000000..7248ebb --- /dev/null +++ b/docs/ResourceRemoteInfoGcpBillingAccount.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoGcpBillingAccount + +Remote info for a GCP billing account. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**billing_account_id** | **str** | The resource name of the billing account. | + +## Example + +```python +from opal_security.models.resource_remote_info_gcp_billing_account import ResourceRemoteInfoGcpBillingAccount + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoGcpBillingAccount from a JSON string +resource_remote_info_gcp_billing_account_instance = ResourceRemoteInfoGcpBillingAccount.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoGcpBillingAccount.to_json()) + +# convert the object into a dict +resource_remote_info_gcp_billing_account_dict = resource_remote_info_gcp_billing_account_instance.to_dict() +# create an instance of ResourceRemoteInfoGcpBillingAccount from a dict +resource_remote_info_gcp_billing_account_from_dict = ResourceRemoteInfoGcpBillingAccount.from_dict(resource_remote_info_gcp_billing_account_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoLinearOrganization.md b/docs/ResourceRemoteInfoLinearOrganization.md new file mode 100644 index 0000000..3998ea3 --- /dev/null +++ b/docs/ResourceRemoteInfoLinearOrganization.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoLinearOrganization + +Remote info for Linear organization. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **str** | The ID of the Linear organization. | + +## Example + +```python +from opal_security.models.resource_remote_info_linear_organization import ResourceRemoteInfoLinearOrganization + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoLinearOrganization from a JSON string +resource_remote_info_linear_organization_instance = ResourceRemoteInfoLinearOrganization.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoLinearOrganization.to_json()) + +# convert the object into a dict +resource_remote_info_linear_organization_dict = resource_remote_info_linear_organization_instance.to_dict() +# create an instance of ResourceRemoteInfoLinearOrganization from a dict +resource_remote_info_linear_organization_from_dict = ResourceRemoteInfoLinearOrganization.from_dict(resource_remote_info_linear_organization_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoLinearProject.md b/docs/ResourceRemoteInfoLinearProject.md new file mode 100644 index 0000000..87f3ba3 --- /dev/null +++ b/docs/ResourceRemoteInfoLinearProject.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoLinearProject + +Remote info for Linear project. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | The ID of the Linear project. | + +## Example + +```python +from opal_security.models.resource_remote_info_linear_project import ResourceRemoteInfoLinearProject + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoLinearProject from a JSON string +resource_remote_info_linear_project_instance = ResourceRemoteInfoLinearProject.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoLinearProject.to_json()) + +# convert the object into a dict +resource_remote_info_linear_project_dict = resource_remote_info_linear_project_instance.to_dict() +# create an instance of ResourceRemoteInfoLinearProject from a dict +resource_remote_info_linear_project_from_dict = ResourceRemoteInfoLinearProject.from_dict(resource_remote_info_linear_project_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoOneloginApp.md b/docs/ResourceRemoteInfoOneloginApp.md new file mode 100644 index 0000000..94cd6a6 --- /dev/null +++ b/docs/ResourceRemoteInfoOneloginApp.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoOneloginApp + +Remote info for OneLogin App. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource_id** | **str** | The resource id of the OneLogin App. | + +## Example + +```python +from opal_security.models.resource_remote_info_onelogin_app import ResourceRemoteInfoOneloginApp + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoOneloginApp from a JSON string +resource_remote_info_onelogin_app_instance = ResourceRemoteInfoOneloginApp.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoOneloginApp.to_json()) + +# convert the object into a dict +resource_remote_info_onelogin_app_dict = resource_remote_info_onelogin_app_instance.to_dict() +# create an instance of ResourceRemoteInfoOneloginApp from a dict +resource_remote_info_onelogin_app_from_dict = ResourceRemoteInfoOneloginApp.from_dict(resource_remote_info_onelogin_app_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoRampFund.md b/docs/ResourceRemoteInfoRampFund.md new file mode 100644 index 0000000..a3732e5 --- /dev/null +++ b/docs/ResourceRemoteInfoRampFund.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoRampFund + +Remote info for Ramp fund. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fund_id** | **str** | The ID of the Ramp fund. | + +## Example + +```python +from opal_security.models.resource_remote_info_ramp_fund import ResourceRemoteInfoRampFund + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoRampFund from a JSON string +resource_remote_info_ramp_fund_instance = ResourceRemoteInfoRampFund.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoRampFund.to_json()) + +# convert the object into a dict +resource_remote_info_ramp_fund_dict = resource_remote_info_ramp_fund_instance.to_dict() +# create an instance of ResourceRemoteInfoRampFund from a dict +resource_remote_info_ramp_fund_from_dict = ResourceRemoteInfoRampFund.from_dict(resource_remote_info_ramp_fund_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoRampRole.md b/docs/ResourceRemoteInfoRampRole.md new file mode 100644 index 0000000..99313f2 --- /dev/null +++ b/docs/ResourceRemoteInfoRampRole.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoRampRole + +Remote info for Ramp built-in role. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role** | **str** | The Ramp built-in role enum (e.g. BUSINESS_USER). | + +## Example + +```python +from opal_security.models.resource_remote_info_ramp_role import ResourceRemoteInfoRampRole + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoRampRole from a JSON string +resource_remote_info_ramp_role_instance = ResourceRemoteInfoRampRole.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoRampRole.to_json()) + +# convert the object into a dict +resource_remote_info_ramp_role_dict = resource_remote_info_ramp_role_instance.to_dict() +# create an instance of ResourceRemoteInfoRampRole from a dict +resource_remote_info_ramp_role_from_dict = ResourceRemoteInfoRampRole.from_dict(resource_remote_info_ramp_role_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoRipplingDepartment.md b/docs/ResourceRemoteInfoRipplingDepartment.md new file mode 100644 index 0000000..53682db --- /dev/null +++ b/docs/ResourceRemoteInfoRipplingDepartment.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoRipplingDepartment + +Remote info for Rippling department. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**department_id** | **str** | The ID of the Rippling department. | + +## Example + +```python +from opal_security.models.resource_remote_info_rippling_department import ResourceRemoteInfoRipplingDepartment + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoRipplingDepartment from a JSON string +resource_remote_info_rippling_department_instance = ResourceRemoteInfoRipplingDepartment.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoRipplingDepartment.to_json()) + +# convert the object into a dict +resource_remote_info_rippling_department_dict = resource_remote_info_rippling_department_instance.to_dict() +# create an instance of ResourceRemoteInfoRipplingDepartment from a dict +resource_remote_info_rippling_department_from_dict = ResourceRemoteInfoRipplingDepartment.from_dict(resource_remote_info_rippling_department_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoSlackOrganization.md b/docs/ResourceRemoteInfoSlackOrganization.md new file mode 100644 index 0000000..b25987e --- /dev/null +++ b/docs/ResourceRemoteInfoSlackOrganization.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoSlackOrganization + +Remote info for Slack Enterprise Grid organization. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_id** | **str** | The ID of the Slack Enterprise Grid organization (enterprise ID). | + +## Example + +```python +from opal_security.models.resource_remote_info_slack_organization import ResourceRemoteInfoSlackOrganization + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoSlackOrganization from a JSON string +resource_remote_info_slack_organization_instance = ResourceRemoteInfoSlackOrganization.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoSlackOrganization.to_json()) + +# convert the object into a dict +resource_remote_info_slack_organization_dict = resource_remote_info_slack_organization_instance.to_dict() +# create an instance of ResourceRemoteInfoSlackOrganization from a dict +resource_remote_info_slack_organization_from_dict = ResourceRemoteInfoSlackOrganization.from_dict(resource_remote_info_slack_organization_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoSlackWorkspace.md b/docs/ResourceRemoteInfoSlackWorkspace.md new file mode 100644 index 0000000..9978dcc --- /dev/null +++ b/docs/ResourceRemoteInfoSlackWorkspace.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoSlackWorkspace + +Remote info for Slack workspace. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**workspace_id** | **str** | The ID of the Slack workspace (team ID). | + +## Example + +```python +from opal_security.models.resource_remote_info_slack_workspace import ResourceRemoteInfoSlackWorkspace + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoSlackWorkspace from a JSON string +resource_remote_info_slack_workspace_instance = ResourceRemoteInfoSlackWorkspace.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoSlackWorkspace.to_json()) + +# convert the object into a dict +resource_remote_info_slack_workspace_dict = resource_remote_info_slack_workspace_instance.to_dict() +# create an instance of ResourceRemoteInfoSlackWorkspace from a dict +resource_remote_info_slack_workspace_from_dict = ResourceRemoteInfoSlackWorkspace.from_dict(resource_remote_info_slack_workspace_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoTrayOrganization.md b/docs/ResourceRemoteInfoTrayOrganization.md new file mode 100644 index 0000000..8e3a256 --- /dev/null +++ b/docs/ResourceRemoteInfoTrayOrganization.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoTrayOrganization + +Remote info for Tray Organization. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_id** | **str** | The organization id of the Tray Organization. | + +## Example + +```python +from opal_security.models.resource_remote_info_tray_organization import ResourceRemoteInfoTrayOrganization + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoTrayOrganization from a JSON string +resource_remote_info_tray_organization_instance = ResourceRemoteInfoTrayOrganization.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoTrayOrganization.to_json()) + +# convert the object into a dict +resource_remote_info_tray_organization_dict = resource_remote_info_tray_organization_instance.to_dict() +# create an instance of ResourceRemoteInfoTrayOrganization from a dict +resource_remote_info_tray_organization_from_dict = ResourceRemoteInfoTrayOrganization.from_dict(resource_remote_info_tray_organization_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoTrayWorkspace.md b/docs/ResourceRemoteInfoTrayWorkspace.md new file mode 100644 index 0000000..34eb7a5 --- /dev/null +++ b/docs/ResourceRemoteInfoTrayWorkspace.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoTrayWorkspace + +Remote info for Tray Workspace. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**workspace_id** | **str** | The workspace id of the Tray Workspace. | + +## Example + +```python +from opal_security.models.resource_remote_info_tray_workspace import ResourceRemoteInfoTrayWorkspace + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoTrayWorkspace from a JSON string +resource_remote_info_tray_workspace_instance = ResourceRemoteInfoTrayWorkspace.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoTrayWorkspace.to_json()) + +# convert the object into a dict +resource_remote_info_tray_workspace_dict = resource_remote_info_tray_workspace_instance.to_dict() +# create an instance of ResourceRemoteInfoTrayWorkspace from a dict +resource_remote_info_tray_workspace_from_dict = ResourceRemoteInfoTrayWorkspace.from_dict(resource_remote_info_tray_workspace_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoVercelProject.md b/docs/ResourceRemoteInfoVercelProject.md new file mode 100644 index 0000000..ff257de --- /dev/null +++ b/docs/ResourceRemoteInfoVercelProject.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoVercelProject + +Remote info for Vercel project. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | The Vercel project id. | + +## Example + +```python +from opal_security.models.resource_remote_info_vercel_project import ResourceRemoteInfoVercelProject + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoVercelProject from a JSON string +resource_remote_info_vercel_project_instance = ResourceRemoteInfoVercelProject.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoVercelProject.to_json()) + +# convert the object into a dict +resource_remote_info_vercel_project_dict = resource_remote_info_vercel_project_instance.to_dict() +# create an instance of ResourceRemoteInfoVercelProject from a dict +resource_remote_info_vercel_project_from_dict = ResourceRemoteInfoVercelProject.from_dict(resource_remote_info_vercel_project_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoVercelRole.md b/docs/ResourceRemoteInfoVercelRole.md new file mode 100644 index 0000000..7bd0996 --- /dev/null +++ b/docs/ResourceRemoteInfoVercelRole.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoVercelRole + +Remote info for Vercel team role. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_id** | **str** | The Vercel team role identifier (e.g. OWNER, MEMBER, CONTRIBUTOR). | + +## Example + +```python +from opal_security.models.resource_remote_info_vercel_role import ResourceRemoteInfoVercelRole + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoVercelRole from a JSON string +resource_remote_info_vercel_role_instance = ResourceRemoteInfoVercelRole.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoVercelRole.to_json()) + +# convert the object into a dict +resource_remote_info_vercel_role_dict = resource_remote_info_vercel_role_instance.to_dict() +# create an instance of ResourceRemoteInfoVercelRole from a dict +resource_remote_info_vercel_role_from_dict = ResourceRemoteInfoVercelRole.from_dict(resource_remote_info_vercel_role_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoWrikeUserType.md b/docs/ResourceRemoteInfoWrikeUserType.md new file mode 100644 index 0000000..d05a3c7 --- /dev/null +++ b/docs/ResourceRemoteInfoWrikeUserType.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoWrikeUserType + +Remote info for Wrike user type (license type). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_type_id** | **str** | The Wrike user type ID (16-char UID from GET /user_types). | + +## Example + +```python +from opal_security.models.resource_remote_info_wrike_user_type import ResourceRemoteInfoWrikeUserType + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoWrikeUserType from a JSON string +resource_remote_info_wrike_user_type_instance = ResourceRemoteInfoWrikeUserType.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoWrikeUserType.to_json()) + +# convert the object into a dict +resource_remote_info_wrike_user_type_dict = resource_remote_info_wrike_user_type_instance.to_dict() +# create an instance of ResourceRemoteInfoWrikeUserType from a dict +resource_remote_info_wrike_user_type_from_dict = ResourceRemoteInfoWrikeUserType.from_dict(resource_remote_info_wrike_user_type_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoZoomLicense.md b/docs/ResourceRemoteInfoZoomLicense.md new file mode 100644 index 0000000..3d4f3aa --- /dev/null +++ b/docs/ResourceRemoteInfoZoomLicense.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoZoomLicense + +Remote info for Zoom license (user type). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**license_type** | **str** | The Zoom user type representing the license (e.g. \"2\" for Licensed). | + +## Example + +```python +from opal_security.models.resource_remote_info_zoom_license import ResourceRemoteInfoZoomLicense + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoZoomLicense from a JSON string +resource_remote_info_zoom_license_instance = ResourceRemoteInfoZoomLicense.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoZoomLicense.to_json()) + +# convert the object into a dict +resource_remote_info_zoom_license_dict = resource_remote_info_zoom_license_instance.to_dict() +# create an instance of ResourceRemoteInfoZoomLicense from a dict +resource_remote_info_zoom_license_from_dict = ResourceRemoteInfoZoomLicense.from_dict(resource_remote_info_zoom_license_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoZoomRole.md b/docs/ResourceRemoteInfoZoomRole.md new file mode 100644 index 0000000..1066295 --- /dev/null +++ b/docs/ResourceRemoteInfoZoomRole.md @@ -0,0 +1,30 @@ +# ResourceRemoteInfoZoomRole + +Remote info for Zoom role. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role_id** | **str** | The ID of the Zoom role. | + +## Example + +```python +from opal_security.models.resource_remote_info_zoom_role import ResourceRemoteInfoZoomRole + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoZoomRole from a JSON string +resource_remote_info_zoom_role_instance = ResourceRemoteInfoZoomRole.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoZoomRole.to_json()) + +# convert the object into a dict +resource_remote_info_zoom_role_dict = resource_remote_info_zoom_role_instance.to_dict() +# create an instance of ResourceRemoteInfoZoomRole from a dict +resource_remote_info_zoom_role_from_dict = ResourceRemoteInfoZoomRole.from_dict(resource_remote_info_zoom_role_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceTypeEnum.md b/docs/ResourceTypeEnum.md index 6c667fc..4f2da84 100644 --- a/docs/ResourceTypeEnum.md +++ b/docs/ResourceTypeEnum.md @@ -24,6 +24,16 @@ The type of the resource. * `AWS_ORGANIZATIONAL_UNIT` (value: `'AWS_ORGANIZATIONAL_UNIT'`) +* `AWS_AGENTCORE_GATEWAY` (value: `'AWS_AGENTCORE_GATEWAY'`) + +* `AWS_AGENTCORE_GATEWAY_TARGET` (value: `'AWS_AGENTCORE_GATEWAY_TARGET'`) + +* `AWS_AGENTCORE_GATEWAY_TOOL` (value: `'AWS_AGENTCORE_GATEWAY_TOOL'`) + +* `MCP_SERVER` (value: `'MCP_SERVER'`) + +* `MCP_TOOL` (value: `'MCP_TOOL'`) + * `AZURE_MANAGEMENT_GROUP` (value: `'AZURE_MANAGEMENT_GROUP'`) * `AZURE_RESOURCE_GROUP` (value: `'AZURE_RESOURCE_GROUP'`) @@ -78,6 +88,8 @@ The type of the resource. * `GCP_SERVICE_ACCOUNT` (value: `'GCP_SERVICE_ACCOUNT'`) +* `GCP_BILLING_ACCOUNT` (value: `'GCP_BILLING_ACCOUNT'`) + * `GIT_HUB_REPO` (value: `'GIT_HUB_REPO'`) * `GIT_HUB_ORG_ROLE` (value: `'GIT_HUB_ORG_ROLE'`) @@ -136,6 +148,8 @@ The type of the resource. * `CURSOR_ORGANIZATION` (value: `'CURSOR_ORGANIZATION'`) +* `CURSOR_ORIGIN_REPOSITORY` (value: `'CURSOR_ORIGIN_REPOSITORY'`) + * `OPENAI_PLATFORM_PROJECT` (value: `'OPENAI_PLATFORM_PROJECT'`) * `OPENAI_PLATFORM_SERVICE_ACCOUNT` (value: `'OPENAI_PLATFORM_SERVICE_ACCOUNT'`) @@ -170,12 +184,82 @@ The type of the resource. * `CLICKHOUSE_TABLE` (value: `'CLICKHOUSE_TABLE'`) +* `CLICKHOUSE_CONSOLE_ROLE` (value: `'CLICKHOUSE_CONSOLE_ROLE'`) + * `TWINGATE_RESOURCE` (value: `'TWINGATE_RESOURCE'`) * `ZENDESK_ROLE` (value: `'ZENDESK_ROLE'`) * `HUBSPOT_ROLE` (value: `'HUBSPOT_ROLE'`) +* `ALICLOUD_RAM_ROLE` (value: `'ALICLOUD_RAM_ROLE'`) + +* `ALICLOUD_ECS_INSTANCE` (value: `'ALICLOUD_ECS_INSTANCE'`) + +* `DOCUSIGN_PERMISSION_PROFILE` (value: `'DOCUSIGN_PERMISSION_PROFILE'`) + +* `ZOOM_ROLE` (value: `'ZOOM_ROLE'`) + +* `ZOOM_LICENSE` (value: `'ZOOM_LICENSE'`) + +* `LINEAR_ORGANIZATION` (value: `'LINEAR_ORGANIZATION'`) + +* `LINEAR_PROJECT` (value: `'LINEAR_PROJECT'`) + +* `RAMP_FUND` (value: `'RAMP_FUND'`) + +* `RAMP_ROLE` (value: `'RAMP_ROLE'`) + +* `WRIKE_USER_TYPE` (value: `'WRIKE_USER_TYPE'`) + +* `DATABRICKS_CATALOG` (value: `'DATABRICKS_CATALOG'`) + +* `DATABRICKS_SCHEMA` (value: `'DATABRICKS_SCHEMA'`) + +* `DATABRICKS_VOLUME` (value: `'DATABRICKS_VOLUME'`) + +* `DATABRICKS_FUNCTION` (value: `'DATABRICKS_FUNCTION'`) + +* `DATABRICKS_MODEL` (value: `'DATABRICKS_MODEL'`) + +* `DATABRICKS_SERVICE` (value: `'DATABRICKS_SERVICE'`) + +* `DATABRICKS_MCP_SERVER` (value: `'DATABRICKS_MCP_SERVER'`) + +* `VERCEL_ROLE` (value: `'VERCEL_ROLE'`) + +* `VERCEL_PROJECT` (value: `'VERCEL_PROJECT'`) + +* `AXIOM_ROLE` (value: `'AXIOM_ROLE'`) + +* `AXIOM_CUSTOM_ROLE` (value: `'AXIOM_CUSTOM_ROLE'`) + +* `RIPPLING_DEPARTMENT` (value: `'RIPPLING_DEPARTMENT'`) + +* `BOX_ENTERPRISE` (value: `'BOX_ENTERPRISE'`) + +* `BOX_FOLDER` (value: `'BOX_FOLDER'`) + +* `SLACK_WORKSPACE` (value: `'SLACK_WORKSPACE'`) + +* `SLACK_ORGANIZATION` (value: `'SLACK_ORGANIZATION'`) + +* `ASANA_WORKSPACE` (value: `'ASANA_WORKSPACE'`) + +* `ASANA_WORKSPACE_GUEST` (value: `'ASANA_WORKSPACE_GUEST'`) + +* `BITWARDEN_ORGANIZATION` (value: `'BITWARDEN_ORGANIZATION'`) + +* `CALENDLY_ROLE` (value: `'CALENDLY_ROLE'`) + +* `CALENDLY_EVENT_TYPE` (value: `'CALENDLY_EVENT_TYPE'`) + +* `ONELOGIN_APP` (value: `'ONELOGIN_APP'`) + +* `TRAY_WORKSPACE` (value: `'TRAY_WORKSPACE'`) + +* `TRAY_ORGANIZATION` (value: `'TRAY_ORGANIZATION'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourcesApi.md b/docs/ResourcesApi.md index 531db7c..ee12324 100644 --- a/docs/ResourcesApi.md +++ b/docs/ResourcesApi.md @@ -7,10 +7,15 @@ Method | HTTP request | Description [**add_resource_nhi**](ResourcesApi.md#add_resource_nhi) | **POST** /resources/{resource_id}/non-human-identities/{non_human_identity_id} | [**add_resource_user**](ResourcesApi.md#add_resource_user) | **POST** /resources/{resource_id}/users/{user_id} | [**create_resource**](ResourcesApi.md#create_resource) | **POST** /resources | +[**create_resource_custom_access_level**](ResourcesApi.md#create_resource_custom_access_level) | **POST** /resources/{resource_id}/custom-access-levels | [**delete_resource**](ResourcesApi.md#delete_resource) | **DELETE** /resources/{resource_id} | +[**delete_resource_custom_access_level**](ResourcesApi.md#delete_resource_custom_access_level) | **DELETE** /resources/{resource_id}/custom-access-levels/{access_level_remote_id} | [**delete_resource_nhi**](ResourcesApi.md#delete_resource_nhi) | **DELETE** /resources/{resource_id}/non-human-identities/{non_human_identity_id} | [**delete_resource_user**](ResourcesApi.md#delete_resource_user) | **DELETE** /resources/{resource_id}/users/{user_id} | [**get_resource**](ResourcesApi.md#get_resource) | **GET** /resources/{resource_id} | Get resource by ID +[**get_resource_access_levels**](ResourcesApi.md#get_resource_access_levels) | **GET** /resources/{resource_id}/access_levels | Get resource access levels +[**get_resource_configuration_template**](ResourcesApi.md#get_resource_configuration_template) | **GET** /resources/{resource_id}/configuration-template | Get the ID of the configuration template linked to a resource +[**get_resource_custom_access_levels**](ResourcesApi.md#get_resource_custom_access_levels) | **GET** /resources/{resource_id}/custom-access-levels | [**get_resource_groups**](ResourcesApi.md#get_resource_groups) | **GET** /resources/{resource_id}/groups | [**get_resource_message_channels**](ResourcesApi.md#get_resource_message_channels) | **GET** /resources/{resource_id}/message-channels | [**get_resource_nhis**](ResourcesApi.md#get_resource_nhis) | **GET** /resources/{resource_id}/non-human-identities | @@ -29,6 +34,8 @@ Method | HTTP request | Description [**set_resource_reviewers**](ResourcesApi.md#set_resource_reviewers) | **PUT** /resources/{resource_id}/reviewers | [**set_resource_scoped_role_permissions**](ResourcesApi.md#set_resource_scoped_role_permissions) | **PUT** /resources/{resource_id}/scoped-role-permissions | [**set_resource_visibility**](ResourcesApi.md#set_resource_visibility) | **PUT** /resources/{resource_id}/visibility | +[**update_resource_configuration_template**](ResourcesApi.md#update_resource_configuration_template) | **PUT** /resources/{resource_id}/configuration-template | Set the ID of the configuration template linked to a resource +[**update_resource_custom_access_level**](ResourcesApi.md#update_resource_custom_access_level) | **PATCH** /resources/{resource_id}/custom-access-levels/{access_level_remote_id} | [**update_resource_user**](ResourcesApi.md#update_resource_user) | **PUT** /resources/{resource_id}/users/{user_id} | [**update_resources**](ResourcesApi.md#update_resources) | **PUT** /resources | @@ -279,6 +286,89 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **create_resource_custom_access_level** +> ResourceCustomAccessLevelResponse create_resource_custom_access_level(resource_id, create_resource_custom_access_level_info) + +Creates a custom access level on a resource. If the resource is a parent type, the role is created on all child resources. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.create_resource_custom_access_level_info import CreateResourceCustomAccessLevelInfo +from opal_security.models.resource_custom_access_level_response import ResourceCustomAccessLevelResponse +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.ResourcesApi(api_client) + resource_id = UUID('1b978423-db0a-4037-a4cf-f79c60cb67b3') # UUID | The ID of the resource. + create_resource_custom_access_level_info = opal_security.CreateResourceCustomAccessLevelInfo() # CreateResourceCustomAccessLevelInfo | + + try: + api_response = api_instance.create_resource_custom_access_level(resource_id, create_resource_custom_access_level_info) + print("The response of ResourcesApi->create_resource_custom_access_level:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ResourcesApi->create_resource_custom_access_level: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource_id** | **UUID**| The ID of the resource. | + **create_resource_custom_access_level_info** | [**CreateResourceCustomAccessLevelInfo**](CreateResourceCustomAccessLevelInfo.md)| | + +### Return type + +[**ResourceCustomAccessLevelResponse**](ResourceCustomAccessLevelResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The created custom access level. | - | +**400** | Unsupported resource type. | - | +**404** | Resource not found or access denied. | - | +**409** | A custom access level with this remote ID already exists. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **delete_resource** > delete_resource(resource_id) @@ -353,6 +443,84 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **delete_resource_custom_access_level** +> delete_resource_custom_access_level(resource_id, access_level_remote_id) + +Deletes a custom access level identified by its remote ID. If the resource is a parent type, the deletion fans out to all child resources. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.ResourcesApi(api_client) + resource_id = UUID('1b978423-db0a-4037-a4cf-f79c60cb67b3') # UUID | The ID of the resource. + access_level_remote_id = 'admin' # str | The remote ID of the access level. + + try: + api_instance.delete_resource_custom_access_level(resource_id, access_level_remote_id) + except Exception as e: + print("Exception when calling ResourcesApi->delete_resource_custom_access_level: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource_id** | **UUID**| The ID of the resource. | + **access_level_remote_id** | **str**| The remote ID of the access level. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully deleted. | - | +**400** | Unsupported resource type. | - | +**404** | Resource or access level not found, or access denied. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **delete_resource_nhi** > delete_resource_nhi(resource_id, non_human_identity_id, access_level_remote_id=access_level_remote_id) @@ -589,6 +757,261 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_resource_access_levels** +> ResourceAccessLevelList get_resource_access_levels(resource_id) + +Get resource access levels + +Returns the list of access levels defined for the resource. Resources that only offer default (unnamed) access return an empty list. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.resource_access_level_list import ResourceAccessLevelList +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.ResourcesApi(api_client) + resource_id = UUID('4baf8423-db0a-4037-a4cf-f79c60cb67a5') # UUID | The ID of the resource whose access levels to return. + + try: + # Get resource access levels + api_response = api_instance.get_resource_access_levels(resource_id) + print("The response of ResourcesApi->get_resource_access_levels:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ResourcesApi->get_resource_access_levels: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource_id** | **UUID**| The ID of the resource whose access levels to return. | + +### Return type + +[**ResourceAccessLevelList**](ResourceAccessLevelList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The access levels defined for the resource. | - | +**404** | Resource not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_resource_configuration_template** +> ResourceConfigurationTemplate get_resource_configuration_template(resource_id) + +Get the ID of the configuration template linked to a resource + +Returns the ID of the configuration template that the resource is +currently linked to. The response body is +`{"configuration_template_id": "" | null}`: + + * `` is the ID of the configuration template the resource is linked to. + * `null` means the resource is not linked to any configuration template + and uses its own private configuration. + +This endpoint only exposes the link between a resource and a +configuration template — it does not return the template's own fields +(name, description, request configurations, visibility, etc.). To read +those, call `GET /configuration-templates/{configuration_template_id}` +with the ID returned here. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.resource_configuration_template import ResourceConfigurationTemplate +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.ResourcesApi(api_client) + resource_id = UUID('4baf8423-db0a-4037-a4cf-f79c60cb67a5') # UUID | The ID of the resource whose configuration template link is being read. + + try: + # Get the ID of the configuration template linked to a resource + api_response = api_instance.get_resource_configuration_template(resource_id) + print("The response of ResourcesApi->get_resource_configuration_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ResourcesApi->get_resource_configuration_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource_id** | **UUID**| The ID of the resource whose configuration template link is being read. | + +### Return type + +[**ResourceConfigurationTemplate**](ResourceConfigurationTemplate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The ID of the configuration template currently linked to the resource, or `null` if the resource uses its own private configuration. | - | +**403** | The caller is not authorized to view this resource. | - | +**404** | The resource was not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_resource_custom_access_levels** +> ResourceCustomAccessLevelList get_resource_custom_access_levels(resource_id) + +Returns all custom access levels for a resource. If the resource is a parent type (e.g. GitHubOrg), returns aggregated roles across child resources. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.resource_custom_access_level_list import ResourceCustomAccessLevelList +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.ResourcesApi(api_client) + resource_id = UUID('1b978423-db0a-4037-a4cf-f79c60cb67b3') # UUID | The ID of the resource. + + try: + api_response = api_instance.get_resource_custom_access_levels(resource_id) + print("The response of ResourcesApi->get_resource_custom_access_levels:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ResourcesApi->get_resource_custom_access_levels: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource_id** | **UUID**| The ID of the resource. | + +### Return type + +[**ResourceCustomAccessLevelList**](ResourceCustomAccessLevelList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The custom access levels for the resource. | - | +**400** | Unsupported resource type. | - | +**404** | Resource not found or access denied. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_resource_groups** > GroupResourceList get_resource_groups(resource_id) @@ -1370,11 +1793,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | The visibility info of this resource. | - | +**403** | The caller is not authorized to view this resource's visibility. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_resources** -> PaginatedResourcesList get_resources(cursor=cursor, page_size=page_size, resource_type_filter=resource_type_filter, resource_ids=resource_ids, resource_name=resource_name, parent_resource_id=parent_resource_id, ancestor_resource_id=ancestor_resource_id, remote_id=remote_id, tag_ids=tag_ids) +> PaginatedResourcesList get_resources(cursor=cursor, page_size=page_size, resource_type_filter=resource_type_filter, resource_ids=resource_ids, resource_name=resource_name, resource_name_match=resource_name_match, parent_resource_id=parent_resource_id, ancestor_resource_id=ancestor_resource_id, remote_id=remote_id, tag_ids=tag_ids) Get resources @@ -1386,6 +1810,7 @@ Returns a list of resources for your organization. ```python import opal_security +from opal_security.models.name_match_type import NameMatchType from opal_security.models.paginated_resources_list import PaginatedResourcesList from opal_security.models.resource_type_enum import ResourceTypeEnum from opal_security.rest import ApiException @@ -1417,7 +1842,8 @@ with opal_security.ApiClient(configuration) as api_client: page_size = 200 # int | Number of results to return per page. Default is 200. (optional) resource_type_filter = opal_security.ResourceTypeEnum() # ResourceTypeEnum | The resource type to filter by. Required when remote_id is provided. (optional) resource_ids = [["4baf8423-db0a-4037-a4cf-f79c60cb67a5","1b978423-db0a-4037-a4cf-f79c60cb67b3"]] # List[UUID] | The resource ids to filter by. (optional) - resource_name = 'example-name' # str | Resource name. (optional) + resource_name = 'example-name' # str | Filter resources by name. Matches against `name`, `remote_name`, parent-name combinations, and `remote_id`. Matching is case-insensitive. Use `resource_name_match` to choose the match type; when omitted, CONTAINS (substring) is used. (optional) + resource_name_match = opal_security.NameMatchType() # NameMatchType | How to apply `resource_name`. Requires `resource_name` to be set. Defaults to CONTAINS when `resource_name` is provided without this parameter. EQUALS, STARTS_WITH, and ENDS_WITH match only the resource's own `name` and `remote_name`, not parent-name combinations or `remote_id`. (optional) parent_resource_id = UUID('[\"4baf8423-db0a-4037-a4cf-f79c60cb67a5\"]') # UUID | The parent resource id to filter by. (optional) ancestor_resource_id = UUID('[\"4baf8423-db0a-4037-a4cf-f79c60cb67a5\"]') # UUID | The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. (optional) remote_id = 'remote_id_example' # str | Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided. (optional) @@ -1425,7 +1851,7 @@ with opal_security.ApiClient(configuration) as api_client: try: # Get resources - api_response = api_instance.get_resources(cursor=cursor, page_size=page_size, resource_type_filter=resource_type_filter, resource_ids=resource_ids, resource_name=resource_name, parent_resource_id=parent_resource_id, ancestor_resource_id=ancestor_resource_id, remote_id=remote_id, tag_ids=tag_ids) + api_response = api_instance.get_resources(cursor=cursor, page_size=page_size, resource_type_filter=resource_type_filter, resource_ids=resource_ids, resource_name=resource_name, resource_name_match=resource_name_match, parent_resource_id=parent_resource_id, ancestor_resource_id=ancestor_resource_id, remote_id=remote_id, tag_ids=tag_ids) print("The response of ResourcesApi->get_resources:\n") pprint(api_response) except Exception as e: @@ -1443,7 +1869,8 @@ Name | Type | Description | Notes **page_size** | **int**| Number of results to return per page. Default is 200. | [optional] **resource_type_filter** | [**ResourceTypeEnum**](.md)| The resource type to filter by. Required when remote_id is provided. | [optional] **resource_ids** | [**List[UUID]**](UUID.md)| The resource ids to filter by. | [optional] - **resource_name** | **str**| Resource name. | [optional] + **resource_name** | **str**| Filter resources by name. Matches against `name`, `remote_name`, parent-name combinations, and `remote_id`. Matching is case-insensitive. Use `resource_name_match` to choose the match type; when omitted, CONTAINS (substring) is used. | [optional] + **resource_name_match** | [**NameMatchType**](.md)| How to apply `resource_name`. Requires `resource_name` to be set. Defaults to CONTAINS when `resource_name` is provided without this parameter. EQUALS, STARTS_WITH, and ENDS_WITH match only the resource's own `name` and `remote_name`, not parent-name combinations or `remote_id`. | [optional] **parent_resource_id** | **UUID**| The parent resource id to filter by. | [optional] **ancestor_resource_id** | **UUID**| The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. | [optional] **remote_id** | **str**| Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided. | [optional] @@ -2034,6 +2461,202 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **update_resource_configuration_template** +> ResourceConfigurationTemplate update_resource_configuration_template(resource_id, resource_configuration_template) + +Set the ID of the configuration template linked to a resource + +Attaches, repoints, or detaches the configuration template linked to a +resource. This endpoint only manages the link (by ID) between a +resource and an existing configuration template — it does not create, +modify, or delete the template itself. To manage a template's own +fields (name, description, request configurations, visibility, etc.), +use the `/configuration-templates` endpoints. + +The request body is `{"configuration_template_id": "" | null}`: + + * A `` value links the resource to the configuration template + with that ID. If the resource was previously linked to a different + template, the resource is repointed in place. + * `null` detaches the resource from its current configuration + template. The template is deep-copied into a new private + configuration with the same settings so the resource's current + behaviour is preserved, and the resource is repointed at the fork. + +The `configuration_template_id` field is required. Sending `{}` or any +body in which the field is omitted is rejected with `400`. + +The call is idempotent: if the request body matches the resource's +current link, no changes are made and no audit events are emitted. + +This endpoint is the preferred, Terraform-friendly surface for linking +and unlinking configuration templates on resources. The equivalent +`configuration_template_id` field on `PUT /resources` remains available +but is deprecated for this purpose. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.resource_configuration_template import ResourceConfigurationTemplate +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.ResourcesApi(api_client) + resource_id = UUID('4baf8423-db0a-4037-a4cf-f79c60cb67a5') # UUID | The ID of the resource whose configuration template link is being set. + resource_configuration_template = opal_security.ResourceConfigurationTemplate() # ResourceConfigurationTemplate | + + try: + # Set the ID of the configuration template linked to a resource + api_response = api_instance.update_resource_configuration_template(resource_id, resource_configuration_template) + print("The response of ResourcesApi->update_resource_configuration_template:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ResourcesApi->update_resource_configuration_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource_id** | **UUID**| The ID of the resource whose configuration template link is being set. | + **resource_configuration_template** | [**ResourceConfigurationTemplate**](ResourceConfigurationTemplate.md)| | + +### Return type + +[**ResourceConfigurationTemplate**](ResourceConfigurationTemplate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The ID of the configuration template now linked to the resource, or `null` if the resource was detached. | - | +**400** | The request body was malformed, the required `configuration_template_id` field was omitted, or the target `configuration_template_id` does not reference a configuration template. | - | +**403** | The caller is not authorized to update this resource. | - | +**404** | The resource was not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_resource_custom_access_level** +> ResourceCustomAccessLevelResponse update_resource_custom_access_level(resource_id, access_level_remote_id, update_resource_custom_access_level_info) + +Updates a custom access level identified by its remote ID. If the resource is a parent type, the update fans out to all child resources. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.resource_custom_access_level_response import ResourceCustomAccessLevelResponse +from opal_security.models.update_resource_custom_access_level_info import UpdateResourceCustomAccessLevelInfo +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.ResourcesApi(api_client) + resource_id = UUID('1b978423-db0a-4037-a4cf-f79c60cb67b3') # UUID | The ID of the resource. + access_level_remote_id = 'admin' # str | The remote ID of the access level. + update_resource_custom_access_level_info = opal_security.UpdateResourceCustomAccessLevelInfo() # UpdateResourceCustomAccessLevelInfo | + + try: + api_response = api_instance.update_resource_custom_access_level(resource_id, access_level_remote_id, update_resource_custom_access_level_info) + print("The response of ResourcesApi->update_resource_custom_access_level:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ResourcesApi->update_resource_custom_access_level: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource_id** | **UUID**| The ID of the resource. | + **access_level_remote_id** | **str**| The remote ID of the access level. | + **update_resource_custom_access_level_info** | [**UpdateResourceCustomAccessLevelInfo**](UpdateResourceCustomAccessLevelInfo.md)| | + +### Return type + +[**ResourceCustomAccessLevelResponse**](ResourceCustomAccessLevelResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated custom access level. | - | +**400** | Unsupported resource type. | - | +**404** | Resource or access level not found, or access denied. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **update_resource_user** > ResourceUser update_resource_user(resource_id, user_id, update_resource_user_request) diff --git a/docs/ReviewCampaignItemDecisionInfo.md b/docs/ReviewCampaignItemDecisionInfo.md new file mode 100644 index 0000000..e332c0c --- /dev/null +++ b/docs/ReviewCampaignItemDecisionInfo.md @@ -0,0 +1,35 @@ +# ReviewCampaignItemDecisionInfo + +A single reviewer decision to submit for a campaign item review. Mirrors GraphQL `CampaignItemReviewDecisionInput`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_item_review_id** | **UUID** | The ID of the campaign item review to update. | +**decision** | [**CampaignItemReviewDecisionEnum**](CampaignItemReviewDecisionEnum.md) | | +**note** | **str** | Optional note from the reviewer for this decision. | [optional] +**access_level_remote_id** | **str** | Required when `decision` is `CHANGE_ROLE`. The remote ID of the access level to change to. Ignored for other decisions. | [optional] +**new_reviewer_user_ids** | **List[UUID]** | When `decision` is `REASSIGNED` and `assignment_source` is `MANUAL` or omitted, the user IDs to reassign this review to. | [optional] +**assignment_source** | [**CampaignItemReviewerAssignmentSourceEnum**](CampaignItemReviewerAssignmentSourceEnum.md) | | [optional] + +## Example + +```python +from opal_security.models.review_campaign_item_decision_info import ReviewCampaignItemDecisionInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of ReviewCampaignItemDecisionInfo from a JSON string +review_campaign_item_decision_info_instance = ReviewCampaignItemDecisionInfo.from_json(json) +# print the JSON string representation of the object +print(ReviewCampaignItemDecisionInfo.to_json()) + +# convert the object into a dict +review_campaign_item_decision_info_dict = review_campaign_item_decision_info_instance.to_dict() +# create an instance of ReviewCampaignItemDecisionInfo from a dict +review_campaign_item_decision_info_from_dict = ReviewCampaignItemDecisionInfo.from_dict(review_campaign_item_decision_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReviewCampaignItemsInfo.md b/docs/ReviewCampaignItemsInfo.md new file mode 100644 index 0000000..4fbafc7 --- /dev/null +++ b/docs/ReviewCampaignItemsInfo.md @@ -0,0 +1,30 @@ +# ReviewCampaignItemsInfo + +Input for submitting review decisions on one or more campaign item reviews. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**decisions** | [**List[ReviewCampaignItemDecisionInfo]**](ReviewCampaignItemDecisionInfo.md) | The decisions to record. Each targets a single campaign item review. | + +## Example + +```python +from opal_security.models.review_campaign_items_info import ReviewCampaignItemsInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of ReviewCampaignItemsInfo from a JSON string +review_campaign_items_info_instance = ReviewCampaignItemsInfo.from_json(json) +# print the JSON string representation of the object +print(ReviewCampaignItemsInfo.to_json()) + +# convert the object into a dict +review_campaign_items_info_dict = review_campaign_items_info_instance.to_dict() +# create an instance of ReviewCampaignItemsInfo from a dict +review_campaign_items_info_from_dict = ReviewCampaignItemsInfo.from_dict(review_campaign_items_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReviewCampaignItemsResponse.md b/docs/ReviewCampaignItemsResponse.md new file mode 100644 index 0000000..f145927 --- /dev/null +++ b/docs/ReviewCampaignItemsResponse.md @@ -0,0 +1,30 @@ +# ReviewCampaignItemsResponse + +Result of submitting campaign item review decisions. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reviews** | [**List[CampaignItemReviewResult]**](CampaignItemReviewResult.md) | Updated reviews in the same order as the request decisions. | + +## Example + +```python +from opal_security.models.review_campaign_items_response import ReviewCampaignItemsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ReviewCampaignItemsResponse from a JSON string +review_campaign_items_response_instance = ReviewCampaignItemsResponse.from_json(json) +# print the JSON string representation of the object +print(ReviewCampaignItemsResponse.to_json()) + +# convert the object into a dict +review_campaign_items_response_dict = review_campaign_items_response_instance.to_dict() +# create an instance of ReviewCampaignItemsResponse from a dict +review_campaign_items_response_from_dict = ReviewCampaignItemsResponse.from_dict(review_campaign_items_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReviewerStage.md b/docs/ReviewerStage.md index 7471017..fd4c460 100644 --- a/docs/ReviewerStage.md +++ b/docs/ReviewerStage.md @@ -8,9 +8,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **require_manager_approval** | **bool** | Whether this reviewer stage should require manager approval. | **require_admin_approval** | **bool** | Whether this reviewer stage should require admin approval. | [optional] -**operator** | **str** | The operator of the reviewer stage. Admin and manager approval are also treated as reviewers. | +**operator** | **str** | The operator of the reviewer stage. Admin and manager approval are also treated as reviewers. A stage that sets `escalation` must use `OR`; `AND` is rejected there, because the escalation timer joins the stage as an additional reviewer and would otherwise become a required approver that stalls every request until the timeout. | **owner_ids** | **List[UUID]** | The IDs of owners assigned as reviewers for this stage. | **service_user_ids** | **List[UUID]** | The IDs of service users assigned as reviewers for this stage. | [optional] +**escalation** | [**ReviewerStageEscalation**](ReviewerStageEscalation.md) | | [optional] +**opal_script_ids** | **List[UUID]** | The IDs of OpalScripts assigned as reviewers for this stage. Only `REQUEST_REVIEW` scripts can review; any other script type is rejected. | [optional] ## Example diff --git a/docs/ReviewerStageEscalation.md b/docs/ReviewerStageEscalation.md new file mode 100644 index 0000000..c451495 --- /dev/null +++ b/docs/ReviewerStageEscalation.md @@ -0,0 +1,32 @@ +# ReviewerStageEscalation + +Escalation for a reviewer stage. When set, the request advances to the reviewers named here if nobody responds within delay_minutes. Timely approval by any of the stage's own reviewers resolves the stage without escalating. owner_ids and user_ids name only who to escalate to; the stage's own reviewers are added automatically and must not be repeated here. A stage with owner_ids [X] escalating to Y sets escalation.owner_ids to [Y], and reviewing after escalation is then open to both X and Y. Because the stage's reviewers are unioned in rather than copied, removing someone from the stage also removes them from the escalation. At least one owner or user named here must not already be a reviewer of the stage. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**delay_minutes** | **int** | How long to wait for a response before escalating, in minutes. Between 1 and 1440 (24 hours). | +**owner_ids** | **List[UUID]** | The owners to escalate to. The stage's own owner_ids are added automatically and must not be repeated here. | [optional] +**user_ids** | **List[UUID]** | The users to escalate to. The stage's own service_user_ids are added automatically and must not be repeated here. | [optional] + +## Example + +```python +from opal_security.models.reviewer_stage_escalation import ReviewerStageEscalation + +# TODO update the JSON string below +json = "{}" +# create an instance of ReviewerStageEscalation from a JSON string +reviewer_stage_escalation_instance = ReviewerStageEscalation.from_json(json) +# print the JSON string representation of the object +print(ReviewerStageEscalation.to_json()) + +# convert the object into a dict +reviewer_stage_escalation_dict = reviewer_stage_escalation_instance.to_dict() +# create an instance of ReviewerStageEscalation from a dict +reviewer_stage_escalation_from_dict = ReviewerStageEscalation.from_dict(reviewer_stage_escalation_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RoleAssignment.md b/docs/RoleAssignment.md new file mode 100644 index 0000000..92244a2 --- /dev/null +++ b/docs/RoleAssignment.md @@ -0,0 +1,37 @@ +# RoleAssignment + +A role assignment representing access granted to a principal for an entity. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **UUID** | Unique identifier for the role assignment. | +**entity_id** | **UUID** | The ID of the entity (resource or group) being accessed. | +**entity_type** | [**EntityTypeEnum**](EntityTypeEnum.md) | | +**principal_id** | **UUID** | The ID of the principal being granted access. | +**principal_type** | [**EntityTypeEnum**](EntityTypeEnum.md) | | +**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | The level of access granted. Null when the entity does not define access levels. | [optional] +**expiration** | **datetime** | When this access expires. Null when the grant is indefinite. | [optional] +**granted_at** | **datetime** | When this access was first granted. | [optional] + +## Example + +```python +from opal_security.models.role_assignment import RoleAssignment + +# TODO update the JSON string below +json = "{}" +# create an instance of RoleAssignment from a JSON string +role_assignment_instance = RoleAssignment.from_json(json) +# print the JSON string representation of the object +print(RoleAssignment.to_json()) + +# convert the object into a dict +role_assignment_dict = role_assignment_instance.to_dict() +# create an instance of RoleAssignment from a dict +role_assignment_from_dict = RoleAssignment.from_dict(role_assignment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RoleAssignmentEntityTypeEnum.md b/docs/RoleAssignmentEntityTypeEnum.md new file mode 100644 index 0000000..563e38c --- /dev/null +++ b/docs/RoleAssignmentEntityTypeEnum.md @@ -0,0 +1,13 @@ +# RoleAssignmentEntityTypeEnum + +Entity type for a role assignment. Entities are the resources or groups access is granted on. + +## Enum + +* `GROUP` (value: `'GROUP'`) + +* `RESOURCE` (value: `'RESOURCE'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RoleAssignmentsApi.md b/docs/RoleAssignmentsApi.md new file mode 100644 index 0000000..f5b253f --- /dev/null +++ b/docs/RoleAssignmentsApi.md @@ -0,0 +1,322 @@ +# opal_security.RoleAssignmentsApi + +All URIs are relative to *https://api.opal.dev/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_role_assignments**](RoleAssignmentsApi.md#add_role_assignments) | **POST** /role-assignments | Add role assignments +[**list_role_assignments**](RoleAssignmentsApi.md#list_role_assignments) | **GET** /role-assignments | List role assignments +[**remove_role_assignments**](RoleAssignmentsApi.md#remove_role_assignments) | **DELETE** /role-assignments | Remove role assignments + + +# **add_role_assignments** +> AddRoleAssignmentsResponse add_role_assignments(add_role_assignments_request) + +Add role assignments + +Grants one or more principals (user, group, or resource) access to one or more +entities (resource or group). The request body is batched to match the GraphQL +`addRoleAssignments` mutation, which this endpoint thin-wraps. The caller must +hold the `EDIT_ASSIGNMENTS` role permission on every entity in the batch. + +Omit `access_level_remote_id` for entities that have a single default access +level. Omit `duration_minutes` (or send `0`) for an indefinite grant. + +**Atomicity:** the batch is applied as a single transaction. If any entry +fails input validation, authorization, lookup, or creation, **no entries +are created** and the response identifies the first failing entry's +`entity_id` and `principal_id` (and the request-array index for input +validation errors). Clients should retry with the offending entry +removed; partial-success is intentionally not supported, matching the +semantics of the GraphQL `addRoleAssignments` mutation that this +endpoint wraps. + +Prefer this endpoint for batch or programmatic use (e.g. Terraform). For a +single grant on a specific entity/principal pair, the per-pair endpoints — +`/resources/{id}/users/{id}`, `/groups/{id}/users/{id}`, +`/groups/{id}/resources/{id}`, `/groups/{id}/containing-groups`, +`/resources/{id}/non-human-identities/{id}` — are often simpler. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.add_role_assignments_request import AddRoleAssignmentsRequest +from opal_security.models.add_role_assignments_response import AddRoleAssignmentsResponse +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.RoleAssignmentsApi(api_client) + add_role_assignments_request = opal_security.AddRoleAssignmentsRequest() # AddRoleAssignmentsRequest | + + try: + # Add role assignments + api_response = api_instance.add_role_assignments(add_role_assignments_request) + print("The response of RoleAssignmentsApi->add_role_assignments:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleAssignmentsApi->add_role_assignments: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **add_role_assignments_request** | [**AddRoleAssignmentsRequest**](AddRoleAssignmentsRequest.md)| | + +### Return type + +[**AddRoleAssignmentsResponse**](AddRoleAssignmentsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The requested role assignments were created. | - | +**400** | Invalid request body: unknown field, missing required field, malformed JSON, invalid enum (entity_type must be RESOURCE or GROUP; principal_type must be RESOURCE, GROUP, or USER), negative duration_minutes, or role_assignments batch size outside the allowed range. | - | +**403** | Caller is not authorized to edit role assignments on one or more of the entities. | - | +**404** | One or more referenced entities or principals does not exist in the organization. | - | +**409** | One of the requested role assignments already exists. The error message identifies the offending entity_id and principal_id so a batch client can locate the colliding entry. Matches the convention of the per-pair endpoints (`/resources/{id}/users/{id}`, `/groups/{id}/users/{id}`), which also return 409 for the same condition. | - | +**422** | Request was syntactically valid but could not be fulfilled. Includes group nesting cycles, self-grants, invalid durations, access-level mismatches, assignments on computed groups or non-requestable resources, and unsupported entity/principal type combinations. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_role_assignments** +> PaginatedRoleAssignmentsList list_role_assignments(entity_ids=entity_ids, principal_ids=principal_ids, entity_type=entity_type, principal_type=principal_type, cursor=cursor, page_size=page_size) + +List role assignments + +Returns a paginated list of role assignments. This endpoint is +**admin-only**: the caller's bearer token must belong to a user with the +admin or read-only admin role. Non-admin callers receive 403. + +Mirrors the GraphQL `directRoleAssignments` query and shares the same +underlying code path, so pagination order, sort default +(`first_granted_at` DESC), and the set of grants returned are identical +across the two surfaces. + +The REST filter surface is intentionally narrower on first ship — sort, +risk-factor filters, text search, access-scope filters, the +agents/humans toggle, and access-level filtering are deferred to a +future revision. For a single entity/principal pair, the per-pair +endpoints — `/resources/{resource_id}/users`, +`/resources/{resource_id}/groups`, +`/resources/{resource_id}/non-human-identities`, +`/groups/{group_id}/users`, `/groups/{group_id}/containing-groups` — +are often simpler. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.entity_type_enum import EntityTypeEnum +from opal_security.models.paginated_role_assignments_list import PaginatedRoleAssignmentsList +from opal_security.models.role_assignment_entity_type_enum import RoleAssignmentEntityTypeEnum +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.RoleAssignmentsApi(api_client) + entity_ids = None # List[UUID] | Filter to grants on these entity (resource or group) IDs. Any-match. (optional) + principal_ids = None # List[UUID] | Filter to grants with these principal (user, group, or resource) IDs. Any-match. (optional) + entity_type = opal_security.RoleAssignmentEntityTypeEnum() # RoleAssignmentEntityTypeEnum | Filter by entity type. Omit to include both RESOURCE and GROUP entities. (optional) + principal_type = opal_security.EntityTypeEnum() # EntityTypeEnum | Filter by principal type. Omit to include USER, GROUP, and RESOURCE principals. (optional) + cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional) + page_size = 200 # int | Number of results to return per page. Default is 200. (optional) + + try: + # List role assignments + api_response = api_instance.list_role_assignments(entity_ids=entity_ids, principal_ids=principal_ids, entity_type=entity_type, principal_type=principal_type, cursor=cursor, page_size=page_size) + print("The response of RoleAssignmentsApi->list_role_assignments:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleAssignmentsApi->list_role_assignments: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **entity_ids** | [**List[UUID]**](UUID.md)| Filter to grants on these entity (resource or group) IDs. Any-match. | [optional] + **principal_ids** | [**List[UUID]**](UUID.md)| Filter to grants with these principal (user, group, or resource) IDs. Any-match. | [optional] + **entity_type** | [**RoleAssignmentEntityTypeEnum**](.md)| Filter by entity type. Omit to include both RESOURCE and GROUP entities. | [optional] + **principal_type** | [**EntityTypeEnum**](.md)| Filter by principal type. Omit to include USER, GROUP, and RESOURCE principals. | [optional] + **cursor** | **str**| The pagination cursor value. | [optional] + **page_size** | **int**| Number of results to return per page. Default is 200. | [optional] + +### Return type + +[**PaginatedRoleAssignmentsList**](PaginatedRoleAssignmentsList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of role assignments. | - | +**400** | Invalid query parameter: unknown entity_type / principal_type enum value, malformed UUID, malformed cursor, or page_size outside the allowed range. | - | +**403** | Caller is not an admin or read-only admin. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **remove_role_assignments** +> RemoveRoleAssignmentsResponse remove_role_assignments(remove_role_assignments_request) + +Remove role assignments + +Revoke one or more role assignments. Each entry identifies a specific +stored grant by the 5-tuple `(entity_id, entity_type, principal_id, +principal_type, access_level_remote_id)` — see the field description +on `access_level_remote_id` for when it must be supplied and when it +must be omitted. The call is idempotent: an entry that does not match +any stored grant is silently skipped and absent from `entries` in the +response. Caller must have `EDIT_ASSIGNMENTS` on each entity. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.remove_role_assignments_request import RemoveRoleAssignmentsRequest +from opal_security.models.remove_role_assignments_response import RemoveRoleAssignmentsResponse +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.RoleAssignmentsApi(api_client) + remove_role_assignments_request = opal_security.RemoveRoleAssignmentsRequest() # RemoveRoleAssignmentsRequest | + + try: + # Remove role assignments + api_response = api_instance.remove_role_assignments(remove_role_assignments_request) + print("The response of RoleAssignmentsApi->remove_role_assignments:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RoleAssignmentsApi->remove_role_assignments: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **remove_role_assignments_request** | [**RemoveRoleAssignmentsRequest**](RemoveRoleAssignmentsRequest.md)| | + +### Return type + +[**RemoveRoleAssignmentsResponse**](RemoveRoleAssignmentsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The role assignments were revoked (or did not exist; see idempotency note). | - | +**400** | The request body was malformed or failed schema validation. | - | +**403** | Caller lacks `EDIT_ASSIGNMENTS` on one or more entities. | - | +**422** | Business validation rejected the request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/RolePermissionTargetTypeEnum.md b/docs/RolePermissionTargetTypeEnum.md index c29e9ad..797d338 100644 --- a/docs/RolePermissionTargetTypeEnum.md +++ b/docs/RolePermissionTargetTypeEnum.md @@ -18,6 +18,8 @@ The type of the target for the role permission. * `OWNER` (value: `'OWNER'`) +* `EVENT` (value: `'EVENT'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RuleConjunction.md b/docs/RuleConjunction.md index 89e1172..634038d 100644 --- a/docs/RuleConjunction.md +++ b/docs/RuleConjunction.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**clauses** | [**List[RuleDisjunction]**](RuleDisjunction.md) | | +**clauses** | [**List[RuleDisjunction]**](RuleDisjunction.md) | Empty only when the access rule has `uses_opal_query` set. | ## Example diff --git a/docs/RunOpalQueryRequest.md b/docs/RunOpalQueryRequest.md new file mode 100644 index 0000000..2e690e8 --- /dev/null +++ b/docs/RunOpalQueryRequest.md @@ -0,0 +1,33 @@ +# RunOpalQueryRequest + +Request body for an ad-hoc OpalQuery. Set `type` to `NODE` to query entities, or `ACCESS` to query access grants. The fields available in `query` differ by type — refer to each tab for the full schema. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**query** | [**OpalAccessPathQueryBody**](OpalAccessPathQueryBody.md) | | [optional] +**first** | **int** | Maximum number of results to return. Defaults to 200. | [optional] +**after** | **str** | Opaque cursor from a previous ACCESS response to fetch the next page of results. | [optional] + +## Example + +```python +from opal_security.models.run_opal_query_request import RunOpalQueryRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RunOpalQueryRequest from a JSON string +run_opal_query_request_instance = RunOpalQueryRequest.from_json(json) +# print the JSON string representation of the object +print(RunOpalQueryRequest.to_json()) + +# convert the object into a dict +run_opal_query_request_dict = run_opal_query_request_instance.to_dict() +# create an instance of RunOpalQueryRequest from a dict +run_opal_query_request_from_dict = RunOpalQueryRequest.from_dict(run_opal_query_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ServiceUsersApi.md b/docs/ServiceUsersApi.md new file mode 100644 index 0000000..d9206c1 --- /dev/null +++ b/docs/ServiceUsersApi.md @@ -0,0 +1,113 @@ +# opal_security.ServiceUsersApi + +All URIs are relative to *https://api.opal.dev/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_service_user**](ServiceUsersApi.md#create_service_user) | **POST** /service-users | Create service user + + +# **create_service_user** +> User create_service_user(create_service_user_request) + +Create service user + +Creates a new service user (a non-human identity owned by a team). Mirrors +the GraphQL `createServiceUser` mutation; admin-only. + +The returned `User` object is the newly created service user and is a +regular `User` row — read it later via `GET /users/{user_id}`, delete it +with `DELETE /users/{user_id}`, and manage its tags via the usual +`/users/{user_id}/tags` endpoints. + +**Role grants are a separate concern.** To grant a service user access +to resources or groups, use `POST /role-assignments` (or the per-pair +endpoints such as `/resources/{id}/users/{id}`). Keeping role +assignments out of this request body means each grant stays +independently addressable — the shape Terraform and other declarative +clients prefer, with no field here that would silently drift when a +grant is added or revoked through a different code path. + +**Automations are not configurable here either.** The GraphQL mutation +accepts a wide typed-union of automation configuration; that surface is +intentionally omitted from this REST endpoint for the same reason. +Service users created through this endpoint start with no automations. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.create_service_user_request import CreateServiceUserRequest +from opal_security.models.user import User +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.ServiceUsersApi(api_client) + create_service_user_request = opal_security.CreateServiceUserRequest() # CreateServiceUserRequest | + + try: + # Create service user + api_response = api_instance.create_service_user(create_service_user_request) + print("The response of ServiceUsersApi->create_service_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ServiceUsersApi->create_service_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_service_user_request** | [**CreateServiceUserRequest**](CreateServiceUserRequest.md)| | + +### Return type + +[**User**](User.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The created service user. | - | +**400** | Invalid request body: malformed JSON, unknown field, missing or empty `name`, or missing / malformed `owner_id`. | - | +**403** | Caller is not an admin. | - | +**404** | The `owner_id` does not reference an owner in the organization. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SetAgentKillSwitchRequest.md b/docs/SetAgentKillSwitchRequest.md new file mode 100644 index 0000000..f18fcab --- /dev/null +++ b/docs/SetAgentKillSwitchRequest.md @@ -0,0 +1,32 @@ +# SetAgentKillSwitchRequest + +# SetAgentKillSwitchRequest Object ### Description Turns the agent kill switch on or off. Setting `active` to `true` while it is already on supersedes the current activation rather than extending it: the old row keeps its own reason and window as part of the audit trail, and a new one starts. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | True denies agent tool calls for this organization; false lifts the denial. | +**duration_minutes** | **int** | How long the denial lasts, from now. Ignored when `active` is false. Capped server-side - a kill switch with no end is how an organization discovers months later that its engineers have been quietly working around it. | [optional] +**reason** | **str** | Why. Shown verbatim to the developer whose tool call is denied, so write it for them rather than for the audit log - it is the only explanation they get. | [optional] + +## Example + +```python +from opal_security.models.set_agent_kill_switch_request import SetAgentKillSwitchRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SetAgentKillSwitchRequest from a JSON string +set_agent_kill_switch_request_instance = SetAgentKillSwitchRequest.from_json(json) +# print the JSON string representation of the object +print(SetAgentKillSwitchRequest.to_json()) + +# convert the object into a dict +set_agent_kill_switch_request_dict = set_agent_kill_switch_request_instance.to_dict() +# create an instance of SetAgentKillSwitchRequest from a dict +set_agent_kill_switch_request_from_dict = SetAgentKillSwitchRequest.from_dict(set_agent_kill_switch_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SortDirectionEnum.md b/docs/SortDirectionEnum.md new file mode 100644 index 0000000..40f192d --- /dev/null +++ b/docs/SortDirectionEnum.md @@ -0,0 +1,13 @@ +# SortDirectionEnum + +Sort direction for viewer campaign items. + +## Enum + +* `ASC` (value: `'ASC'`) + +* `DESC` (value: `'DESC'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StopCampaignRequest.md b/docs/StopCampaignRequest.md new file mode 100644 index 0000000..da1e878 --- /dev/null +++ b/docs/StopCampaignRequest.md @@ -0,0 +1,29 @@ +# StopCampaignRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**revoke_unreviewed** | **bool** | Revoke all unreviewed access grants. Access grants with no reviewer decision will be immediately revoked. | [optional] [default to False] + +## Example + +```python +from opal_security.models.stop_campaign_request import StopCampaignRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of StopCampaignRequest from a JSON string +stop_campaign_request_instance = StopCampaignRequest.from_json(json) +# print the JSON string representation of the object +print(StopCampaignRequest.to_json()) + +# convert the object into a dict +stop_campaign_request_dict = stop_campaign_request_instance.to_dict() +# create an instance of StopCampaignRequest from a dict +stop_campaign_request_from_dict = StopCampaignRequest.from_dict(stop_campaign_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StringMatchType.md b/docs/StringMatchType.md index ab78865..c7a971a 100644 --- a/docs/StringMatchType.md +++ b/docs/StringMatchType.md @@ -1,6 +1,6 @@ # StringMatchType -How to match a string value against entity names. +How to match a string value against entity names. REGEX matches the value as a case-insensitive regular expression. ## Enum @@ -12,6 +12,8 @@ How to match a string value against entity names. * `ENDS_WITH` (value: `'ENDS_WITH'`) +* `REGEX` (value: `'REGEX'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TokensApi.md b/docs/TokensApi.md index 5df2c01..9be5fce 100644 --- a/docs/TokensApi.md +++ b/docs/TokensApi.md @@ -4,10 +4,102 @@ All URIs are relative to *https://api.opal.dev/v1* Method | HTTP request | Description ------------- | ------------- | ------------- +[**create_token**](TokensApi.md#create_token) | **POST** /tokens | Create token [**delete_token**](TokensApi.md#delete_token) | **DELETE** /tokens/{token_id} | Delete token [**get_tokens**](TokensApi.md#get_tokens) | **GET** /tokens | Get tokens +# **create_token** +> CreateTokenResponse create_token(create_token_info) + +Create token + +Creates a first-party API token. Omit `user_id` (or set it to the +caller's ID) to create a token for yourself. Set `user_id` to a service +user's ID to mint a token that authenticates as that service user. +Creating a token for another human user is not allowed. + +The `signed_token` value in the response is the secret credential and is +only returned once at creation time. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.create_token_info import CreateTokenInfo +from opal_security.models.create_token_response import CreateTokenResponse +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.TokensApi(api_client) + create_token_info = opal_security.CreateTokenInfo() # CreateTokenInfo | + + try: + # Create token + api_response = api_instance.create_token(create_token_info) + print("The response of TokensApi->create_token:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TokensApi->create_token: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_token_info** | [**CreateTokenInfo**](CreateTokenInfo.md)| | + +### Return type + +[**CreateTokenResponse**](CreateTokenResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The created API token. `signed_token` is only returned on creation. | - | +**400** | Invalid request body. | - | +**403** | Not authorized to create this token. | - | +**409** | Conflict — the target service user already has the maximum number of active API tokens (2). Delete an existing token before creating another. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **delete_token** > delete_token(token_id) diff --git a/docs/UARReviewerAssignmentPolicyEnum.md b/docs/UARReviewerAssignmentPolicyEnum.md index 6fd50a7..053f3fe 100644 --- a/docs/UARReviewerAssignmentPolicyEnum.md +++ b/docs/UARReviewerAssignmentPolicyEnum.md @@ -1,6 +1,6 @@ # UARReviewerAssignmentPolicyEnum -A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. +A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. BY_SELF assigns each item to the reviewed principal themselves. ## Enum @@ -16,6 +16,8 @@ A policy for auto-assigning reviewers. If auto-assignment is on, specific assign * `BY_APPROVERS_ALL` (value: `'BY_APPROVERS_ALL'`) +* `BY_SELF` (value: `'BY_SELF'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UarsApi.md b/docs/UarsApi.md index 24d66dd..a14213f 100644 --- a/docs/UarsApi.md +++ b/docs/UarsApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description # **create_uar** > UAR create_uar(create_uar_info) -Starts a User Access Review. +Starts a User Access Review. Deprecated in favor of `POST /campaigns`. ### Example @@ -90,7 +90,7 @@ Name | Type | Description | Notes # **get_uar** > UAR get_uar(uar_id) -Retrieves a specific UAR. +Retrieves a specific UAR. Deprecated in favor of `GET /campaigns/{campaign_id}`. ### Example @@ -167,7 +167,7 @@ Name | Type | Description | Notes # **get_uars** > PaginatedUARsList get_uars(cursor=cursor, page_size=page_size) -Returns a list of `UAR` objects. +Returns a list of `UAR` objects. Deprecated in favor of `GET /campaigns`. ### Example diff --git a/docs/UpdateAppInfo.md b/docs/UpdateAppInfo.md new file mode 100644 index 0000000..f8a7b55 --- /dev/null +++ b/docs/UpdateAppInfo.md @@ -0,0 +1,36 @@ +# UpdateAppInfo + +Information needed to update an app. Currently supports only Push-only apps (`CUSTOM`) and Custom Connector apps (`CUSTOM_CONNECTOR`). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The updated name of the app. | [optional] +**description** | **str** | The updated description of the app. | [optional] +**admin_owner_id** | **UUID** | The updated ID of the owner of the app. | [optional] +**visibility** | [**VisibilityTypeEnum**](VisibilityTypeEnum.md) | Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`: manage an app's visibility through the sub-endpoint instead of inline on update. Still fully functional and validated on this surface. | [optional] +**visibility_group_ids** | **List[UUID]** | The IDs of groups that can see this app when visibility is `LIMITED`. Must be empty when the effective visibility is `GLOBAL` (either sent explicitly on this request or already stored on the app); the server returns `400` otherwise. Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`. | [optional] +**import_visibility** | [**VisibilityTypeEnum**](VisibilityTypeEnum.md) | Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`. | [optional] +**custom_connector** | [**UpdateCustomConnectorInfo**](UpdateCustomConnectorInfo.md) | Updates Custom Connector configuration. Only valid for `CUSTOM_CONNECTOR` apps. | [optional] + +## Example + +```python +from opal_security.models.update_app_info import UpdateAppInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateAppInfo from a JSON string +update_app_info_instance = UpdateAppInfo.from_json(json) +# print the JSON string representation of the object +print(UpdateAppInfo.to_json()) + +# convert the object into a dict +update_app_info_dict = update_app_info_instance.to_dict() +# create an instance of UpdateAppInfo from a dict +update_app_info_from_dict = UpdateAppInfo.from_dict(update_app_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateCampaignConfigurationInfo.md b/docs/UpdateCampaignConfigurationInfo.md new file mode 100644 index 0000000..b3a49df --- /dev/null +++ b/docs/UpdateCampaignConfigurationInfo.md @@ -0,0 +1,46 @@ +# UpdateCampaignConfigurationInfo + +Configuration fields to update on a campaign. All fields are optional; omitted fields are left unchanged. `query` and `reviewer_assignment_policy` are set at create time and cannot be updated here; including either field returns 400. `cron_expression` and `recurring_duration_days` may only be set when the campaign is a template; setting them on a one-off campaign returns 400. `is_template` is immutable and not accepted on update. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allow_self_review** | **bool** | Whether reviewers can review their own access. | [optional] +**send_reviewer_assignment_notification** | **bool** | Whether to notify reviewers upon assignment. | [optional] +**allow_reviewer_reassignment** | **bool** | Whether reviewers may reassign their reviews to another user. | [optional] +**allow_reviewers_to_reduce_expiration** | **bool** | Whether reviewers can shorten an item's access expiration. They cannot extend it. | [optional] +**start_date** | **datetime** | Scheduled start date of the campaign. May only be updated while the campaign has not started (started_at is null). When set, the date's calendar day in the campaign timezone must be at least tomorrow. | [optional] +**end_date** | **datetime** | Scheduled end date of the campaign. When set, the date's calendar day in the campaign timezone must be at least tomorrow. | [optional] +**timezone** | **str** | IANA timezone used to interpret campaign deadlines (e.g. America/Los_Angeles). | [optional] +**revoke_on** | [**CampaignRevokeOnEnum**](CampaignRevokeOnEnum.md) | | [optional] +**reminder_schedule** | **List[int]** | Days before end date to send reminder notifications. | [optional] +**reminder_include_manager** | **bool** | Whether to include the reviewer's manager in reminders. | [optional] +**require_reason_on_denial** | **bool** | Whether reviewers must provide a reason when denying (revoking) access. | [optional] +**auto_stop_when_complete** | **bool** | Whether the campaign stops automatically once every review item is complete. Stopping locks further reviews so admins can review the decisions or end the campaign to generate the report. | [optional] +**hide_ai_suggestions** | **bool** | Whether AI suggestions are hidden from reviewers. | [optional] +**custom_start_message** | **str** | Optional custom message included when notifying reviewers that the campaign started. | [optional] +**group_asset_visibility_policy** | [**CampaignGroupAssetVisibilityPolicyEnum**](CampaignGroupAssetVisibilityPolicyEnum.md) | | [optional] +**cron_expression** | **str** | Cron expression driving the recurring schedule. Only valid on template campaigns. Pass an empty string to clear the active months (next_scheduled_run is cleared); the campaign remains a template. | [optional] +**recurring_duration_days** | **int** | Deadline window in days applied to each draft generated from this template. Only valid on template campaigns. | [optional] + +## Example + +```python +from opal_security.models.update_campaign_configuration_info import UpdateCampaignConfigurationInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCampaignConfigurationInfo from a JSON string +update_campaign_configuration_info_instance = UpdateCampaignConfigurationInfo.from_json(json) +# print the JSON string representation of the object +print(UpdateCampaignConfigurationInfo.to_json()) + +# convert the object into a dict +update_campaign_configuration_info_dict = update_campaign_configuration_info_instance.to_dict() +# create an instance of UpdateCampaignConfigurationInfo from a dict +update_campaign_configuration_info_from_dict = UpdateCampaignConfigurationInfo.from_dict(update_campaign_configuration_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateCampaignInfo.md b/docs/UpdateCampaignInfo.md new file mode 100644 index 0000000..6870a0e --- /dev/null +++ b/docs/UpdateCampaignInfo.md @@ -0,0 +1,31 @@ +# UpdateCampaignInfo + +# UpdateCampaignInfo Object ### Description The `UpdateCampaignInfo` object is used to partially update a campaign. Omitted fields are left unchanged. ### Usage Example Use in the `PUT Campaign` endpoint. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the campaign. | [optional] +**configuration** | [**UpdateCampaignConfigurationInfo**](UpdateCampaignConfigurationInfo.md) | Configuration fields to create or update. | [optional] + +## Example + +```python +from opal_security.models.update_campaign_info import UpdateCampaignInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCampaignInfo from a JSON string +update_campaign_info_instance = UpdateCampaignInfo.from_json(json) +# print the JSON string representation of the object +print(UpdateCampaignInfo.to_json()) + +# convert the object into a dict +update_campaign_info_dict = update_campaign_info_instance.to_dict() +# create an instance of UpdateCampaignInfo from a dict +update_campaign_info_from_dict = UpdateCampaignInfo.from_dict(update_campaign_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateCampaignItemReviewersInfo.md b/docs/UpdateCampaignItemReviewersInfo.md new file mode 100644 index 0000000..5adfc89 --- /dev/null +++ b/docs/UpdateCampaignItemReviewersInfo.md @@ -0,0 +1,32 @@ +# UpdateCampaignItemReviewersInfo + +Input for updating campaign item reviewers. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**to_assign** | [**List[CampaignItemReviewerAssignment]**](CampaignItemReviewerAssignment.md) | Pairs to assign. Existing pairs are ignored. | [optional] +**to_unassign** | [**List[CampaignItemReviewerAssignment]**](CampaignItemReviewerAssignment.md) | Pairs to unassign. Only pending `MANUAL` pairs are removed; missing pairs are skipped. `reviewer_id` is required on each entry. | [optional] +**to_remove_sources** | [**List[CampaignItemReviewerSourceRemoval]**](CampaignItemReviewerSourceRemoval.md) | Remove all pending rows for the given assignment sources. | [optional] + +## Example + +```python +from opal_security.models.update_campaign_item_reviewers_info import UpdateCampaignItemReviewersInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCampaignItemReviewersInfo from a JSON string +update_campaign_item_reviewers_info_instance = UpdateCampaignItemReviewersInfo.from_json(json) +# print the JSON string representation of the object +print(UpdateCampaignItemReviewersInfo.to_json()) + +# convert the object into a dict +update_campaign_item_reviewers_info_dict = update_campaign_item_reviewers_info_instance.to_dict() +# create an instance of UpdateCampaignItemReviewersInfo from a dict +update_campaign_item_reviewers_info_from_dict = UpdateCampaignItemReviewersInfo.from_dict(update_campaign_item_reviewers_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateCampaignItemReviewersResult.md b/docs/UpdateCampaignItemReviewersResult.md new file mode 100644 index 0000000..584b476 --- /dev/null +++ b/docs/UpdateCampaignItemReviewersResult.md @@ -0,0 +1,31 @@ +# UpdateCampaignItemReviewersResult + +Result of updating campaign item reviewers. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reviews** | [**List[CampaignItemReview]**](CampaignItemReview.md) | Full review set for every referenced item after the update. | +**unassigned_preset_messages** | [**List[CampaignItemUnassignedPresetMessage]**](CampaignItemUnassignedPresetMessage.md) | Preset assignment messages for items that did not produce a review row. | + +## Example + +```python +from opal_security.models.update_campaign_item_reviewers_result import UpdateCampaignItemReviewersResult + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCampaignItemReviewersResult from a JSON string +update_campaign_item_reviewers_result_instance = UpdateCampaignItemReviewersResult.from_json(json) +# print the JSON string representation of the object +print(UpdateCampaignItemReviewersResult.to_json()) + +# convert the object into a dict +update_campaign_item_reviewers_result_dict = update_campaign_item_reviewers_result_instance.to_dict() +# create an instance of UpdateCampaignItemReviewersResult from a dict +update_campaign_item_reviewers_result_from_dict = UpdateCampaignItemReviewersResult.from_dict(update_campaign_item_reviewers_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateConfigurationTemplateInfo.md b/docs/UpdateConfigurationTemplateInfo.md index 4ad5cc1..6e08c29 100644 --- a/docs/UpdateConfigurationTemplateInfo.md +++ b/docs/UpdateConfigurationTemplateInfo.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **break_glass_user_ids** | **List[UUID]** | The IDs of the break glass users linked to the configuration template. | [optional] **require_mfa_to_approve** | **bool** | A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template. | [optional] **require_mfa_to_connect** | **bool** | A bool representing whether or not to require MFA to connect to resources associated with this configuration template. | [optional] +**requires_forfeit_reason** | **bool** | A bool representing whether or not a reason is required when forfeiting access to resources or groups using this configuration template. | [optional] **ticket_propagation** | [**TicketPropagationConfiguration**](TicketPropagationConfiguration.md) | | [optional] **custom_request_notification** | **str** | Custom request notification sent upon request approval for this configuration template. | [optional] diff --git a/docs/UpdateCustomConnectorInfo.md b/docs/UpdateCustomConnectorInfo.md new file mode 100644 index 0000000..830ebfa --- /dev/null +++ b/docs/UpdateCustomConnectorInfo.md @@ -0,0 +1,40 @@ +# UpdateCustomConnectorInfo + +Information needed to update a Custom Connector app. Omitted fields are left unchanged. Provide `signing_secret` only when rotating the secret. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | The identifier of the Custom Connector. | [optional] +**base_url** | **str** | The base URL of the Custom Connector. | [optional] +**signing_secret** | **str** | New signing secret. Write-only; never returned by the API. Omit to leave the existing secret unchanged. | [optional] +**tls_mode** | **bool** | Whether TLS verification is enabled for the Custom Connector. | [optional] +**tls_ca_cert_content** | **str** | Optional PEM-encoded CA certificate content for TLS. | [optional] +**supports_groups** | **bool** | Whether the Custom Connector supports groups. | [optional] +**supports_nested_resources** | **bool** | Whether the Custom Connector supports nested resources. | [optional] +**supports_nested_groups** | **bool** | Whether the Custom Connector supports nested groups. | [optional] +**supports_event_ingestion** | **bool** | Whether the Custom Connector supports event ingestion. | [optional] +**supports_idp** | **bool** | Whether the Custom Connector can be connected as an upstream user directory. | [optional] +**idp_protocol** | [**CustomConnectorIdpProtocolEnum**](CustomConnectorIdpProtocolEnum.md) | | [optional] + +## Example + +```python +from opal_security.models.update_custom_connector_info import UpdateCustomConnectorInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCustomConnectorInfo from a JSON string +update_custom_connector_info_instance = UpdateCustomConnectorInfo.from_json(json) +# print the JSON string representation of the object +print(UpdateCustomConnectorInfo.to_json()) + +# convert the object into a dict +update_custom_connector_info_dict = update_custom_connector_info_instance.to_dict() +# create an instance of UpdateCustomConnectorInfo from a dict +update_custom_connector_info_from_dict = UpdateCustomConnectorInfo.from_dict(update_custom_connector_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateGroupInfo.md b/docs/UpdateGroupInfo.md index 489f5e1..c62fbcc 100644 --- a/docs/UpdateGroupInfo.md +++ b/docs/UpdateGroupInfo.md @@ -16,9 +16,10 @@ Name | Type | Description | Notes **require_support_ticket** | **bool** | A bool representing whether or not access requests to the group require an access ticket. Deprecated in favor of `request_configurations`. | [optional] **folder_id** | **UUID** | The ID of the folder that the group is located in. | [optional] **require_mfa_to_approve** | **bool** | A bool representing whether or not to require MFA for reviewers to approve requests for this group. | [optional] +**requires_forfeit_reason** | **bool** | A bool representing whether or not a reason is required when forfeiting access to this group. | [optional] **require_mfa_to_request** | **bool** | A bool representing whether or not to require MFA for requesting access to this group. Deprecated in favor of `request_configurations`. | [optional] **auto_approval** | **bool** | A bool representing whether or not to automatically approve requests to this group. Deprecated in favor of `request_configurations`. | [optional] -**configuration_template_id** | **UUID** | The ID of the associated configuration template. | [optional] +**configuration_template_id** | **UUID** | Deprecated. Use `PUT /groups/{group_id}/configuration-template` instead; that endpoint exposes attach, re-point, and detach as a single idempotent REST sub-resource and is the Terraform-friendly surface for managing this linkage. This field remains honored on the main PUT for now: set to a UUID to attach or re-point, set to `null` to unlink (forks the template into a private configuration that preserves the current settings), omit to leave linkage unchanged. Scheduled for removal in a future major version. | [optional] **request_template_id** | **UUID** | The ID of the associated request template. Deprecated in favor of `request_configurations`. | [optional] **is_requestable** | **bool** | A bool representing whether or not to allow access requests to this group. Deprecated in favor of `request_configurations`. | [optional] **group_leader_user_ids** | **List[UUID]** | A list of User IDs for the group leaders of the group | [optional] @@ -26,7 +27,10 @@ Name | Type | Description | Notes **request_configurations** | [**List[RequestConfiguration]**](RequestConfiguration.md) | The request configuration list of the configuration template. If not provided, the default request configuration will be used. | [optional] **request_configuration_list** | [**CreateRequestConfigurationInfoList**](CreateRequestConfigurationInfoList.md) | The request configuration list of the configuration template. If not provided, the default request configuration will be used. Deprecated in favor of `request_configurations`. | [optional] **custom_request_notification** | **str** | Custom request notification sent to the requester when the request is approved. | [optional] +**max_direct_users_allowed** | **int** | The maximum number of direct users allowed for this group at once. Set to null to remove the limit. | [optional] **risk_sensitivity_override** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | | [optional] +**match_remote_name** | **bool** | A bool representing whether or not the group's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. | [optional] +**match_remote_description** | **bool** | A bool representing whether or not the group's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. | [optional] ## Example diff --git a/docs/UpdateOpalScriptInfo.md b/docs/UpdateOpalScriptInfo.md new file mode 100644 index 0000000..f51729c --- /dev/null +++ b/docs/UpdateOpalScriptInfo.md @@ -0,0 +1,31 @@ +# UpdateOpalScriptInfo + +Information for updating an OpalScript. Omitted fields are left unchanged. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the OpalScript. | [optional] +**script** | **str** | The source of the OpalScript. A new version is recorded only when the source differs from the current one. | [optional] + +## Example + +```python +from opal_security.models.update_opal_script_info import UpdateOpalScriptInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateOpalScriptInfo from a JSON string +update_opal_script_info_instance = UpdateOpalScriptInfo.from_json(json) +# print the JSON string representation of the object +print(UpdateOpalScriptInfo.to_json()) + +# convert the object into a dict +update_opal_script_info_dict = update_opal_script_info_instance.to_dict() +# create an instance of UpdateOpalScriptInfo from a dict +update_opal_script_info_from_dict = UpdateOpalScriptInfo.from_dict(update_opal_script_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdatePaladinInfo.md b/docs/UpdatePaladinInfo.md new file mode 100644 index 0000000..34e6a5a --- /dev/null +++ b/docs/UpdatePaladinInfo.md @@ -0,0 +1,34 @@ +# UpdatePaladinInfo + +Information for updating a Paladin. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the Paladin. | +**monitor_mode** | **bool** | When true, the Paladin reasons about requests but takes no action. If omitted, the existing value is preserved. | [optional] +**admin_view_only** | **bool** | When true, recommendations are visible only to admins. Only meaningful when monitor_mode is true. If omitted, the existing value is preserved. | [optional] +**enabled_connectors** | [**List[PaladinConnector]**](PaladinConnector.md) | The connectors the Paladin is allowed to use. If omitted, the existing connectors are preserved. | [optional] +**instructions** | **str** | The free-form instructions that guide the Paladin's decisions. If omitted, the existing instructions are preserved. | [optional] + +## Example + +```python +from opal_security.models.update_paladin_info import UpdatePaladinInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdatePaladinInfo from a JSON string +update_paladin_info_instance = UpdatePaladinInfo.from_json(json) +# print the JSON string representation of the object +print(UpdatePaladinInfo.to_json()) + +# convert the object into a dict +update_paladin_info_dict = update_paladin_info_instance.to_dict() +# create an instance of UpdatePaladinInfo from a dict +update_paladin_info_from_dict = UpdatePaladinInfo.from_dict(update_paladin_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateRequestTemplateInfo.md b/docs/UpdateRequestTemplateInfo.md new file mode 100644 index 0000000..2650918 --- /dev/null +++ b/docs/UpdateRequestTemplateInfo.md @@ -0,0 +1,32 @@ +# UpdateRequestTemplateInfo + +Information for updating a request template. Omitted properties are left unchanged, but `custom_fields` replaces the template's fields wholesale when provided. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_template_id** | **UUID** | The ID of the request template to update. | +**name** | **str** | The new name of the request template. | [optional] +**custom_fields** | [**List[RequestTemplateCustomFieldInput]**](RequestTemplateCustomFieldInput.md) | The complete set of fields for the template. Any field not included is removed. | [optional] + +## Example + +```python +from opal_security.models.update_request_template_info import UpdateRequestTemplateInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateRequestTemplateInfo from a JSON string +update_request_template_info_instance = UpdateRequestTemplateInfo.from_json(json) +# print the JSON string representation of the object +print(UpdateRequestTemplateInfo.to_json()) + +# convert the object into a dict +update_request_template_info_dict = update_request_template_info_instance.to_dict() +# create an instance of UpdateRequestTemplateInfo from a dict +update_request_template_info_from_dict = UpdateRequestTemplateInfo.from_dict(update_request_template_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateResourceCustomAccessLevelInfo.md b/docs/UpdateResourceCustomAccessLevelInfo.md new file mode 100644 index 0000000..8512b0b --- /dev/null +++ b/docs/UpdateResourceCustomAccessLevelInfo.md @@ -0,0 +1,34 @@ +# UpdateResourceCustomAccessLevelInfo + +Info for updating a custom access level. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_level_name** | **str** | The new human-readable name. | [optional] +**policy** | **str** | The new policy document. | [optional] +**requestable_by_default** | **bool** | Whether the role is requestable. | [optional] +**stackable_sensitivity_index** | **int** | The new sensitivity index. | [optional] +**clear_stackable_sensitivity_index** | **bool** | Set to true to remove from the hierarchy. | [optional] + +## Example + +```python +from opal_security.models.update_resource_custom_access_level_info import UpdateResourceCustomAccessLevelInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateResourceCustomAccessLevelInfo from a JSON string +update_resource_custom_access_level_info_instance = UpdateResourceCustomAccessLevelInfo.from_json(json) +# print the JSON string representation of the object +print(UpdateResourceCustomAccessLevelInfo.to_json()) + +# convert the object into a dict +update_resource_custom_access_level_info_dict = update_resource_custom_access_level_info_instance.to_dict() +# create an instance of UpdateResourceCustomAccessLevelInfo from a dict +update_resource_custom_access_level_info_from_dict = UpdateResourceCustomAccessLevelInfo.from_dict(update_resource_custom_access_level_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateResourceInfo.md b/docs/UpdateResourceInfo.md index 29865dd..c61ff58 100644 --- a/docs/UpdateResourceInfo.md +++ b/docs/UpdateResourceInfo.md @@ -16,13 +16,17 @@ Name | Type | Description | Notes **require_support_ticket** | **bool** | A bool representing whether or not access requests to the resource require an access ticket. Deprecated in favor of `request_configurations`. | [optional] **folder_id** | **UUID** | The ID of the folder that the resource is located in. | [optional] **require_mfa_to_approve** | **bool** | A bool representing whether or not to require MFA for reviewers to approve requests for this resource. | [optional] +**requires_forfeit_reason** | **bool** | A bool representing whether or not a reason is required when forfeiting access to this resource. | [optional] **require_mfa_to_request** | **bool** | A bool representing whether or not to require MFA for requesting access to this resource. Deprecated in favor of `request_configurations`. | [optional] **require_mfa_to_connect** | **bool** | A bool representing whether or not to require MFA to connect to this resource. | [optional] **auto_approval** | **bool** | A bool representing whether or not to automatically approve requests to this resource. Deprecated in favor of `request_configurations`. | [optional] **ticket_propagation** | [**TicketPropagationConfiguration**](TicketPropagationConfiguration.md) | | [optional] **custom_request_notification** | **str** | Custom request notification sent upon request approval. | [optional] +**max_direct_users_allowed** | **int** | The maximum number of direct users allowed for this resource at once. Set to null to remove the limit. | [optional] **risk_sensitivity_override** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | | [optional] -**configuration_template_id** | **UUID** | The ID of the associated configuration template. | [optional] +**match_remote_name** | **bool** | A bool representing whether or not the resource's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. | [optional] +**match_remote_description** | **bool** | A bool representing whether or not the resource's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. | [optional] +**configuration_template_id** | **UUID** | Deprecated. Use `PUT /resources/{resource_id}/configuration-template` instead; that endpoint exposes attach, re-point, and detach as a single idempotent REST sub-resource and is the Terraform-friendly surface for managing this linkage. This field remains honored on the main PUT for now: set to a UUID to attach or re-point, set to `null` to unlink (forks the template into a private configuration that preserves the current settings), omit to leave linkage unchanged. Scheduled for removal in a future major version. | [optional] **request_template_id** | **UUID** | The ID of the associated request template. Deprecated in favor of `request_configurations`. | [optional] **is_requestable** | **bool** | A bool representing whether or not to allow access requests to this resource. Deprecated in favor of `request_configurations`. | [optional] **extensions_duration_in_minutes** | **int** | The duration for which access can be extended (in minutes). Deprecated, set the extension duration in the request_configuration you want it to apply to. | [optional] diff --git a/docs/UpdateUserInfo.md b/docs/UpdateUserInfo.md new file mode 100644 index 0000000..5d3d851 --- /dev/null +++ b/docs/UpdateUserInfo.md @@ -0,0 +1,31 @@ +# UpdateUserInfo + +The user fields to update. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**manager_id** | **UUID** | The user's manager ID. Set to null to remove the manager. | [optional] +**position** | **str** | The user's position. | [optional] + +## Example + +```python +from opal_security.models.update_user_info import UpdateUserInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateUserInfo from a JSON string +update_user_info_instance = UpdateUserInfo.from_json(json) +# print the JSON string representation of the object +print(UpdateUserInfo.to_json()) + +# convert the object into a dict +update_user_info_dict = update_user_info_instance.to_dict() +# create an instance of UpdateUserInfo from a dict +update_user_info_from_dict = UpdateUserInfo.from_dict(update_user_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/User.md b/docs/User.md index 4972125..a48f60e 100644 --- a/docs/User.md +++ b/docs/User.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **first_name** | **str** | The first name of the user. | **last_name** | **str** | The last name of the user. | **position** | **str** | The user's position. | +**manager_id** | **UUID** | The ID of the user's manager. Null if the user has no manager. | [optional] **hr_idp_status** | [**UserHrIdpStatusEnum**](UserHrIdpStatusEnum.md) | | [optional] ## Example diff --git a/docs/UserAccess.md b/docs/UserAccess.md new file mode 100644 index 0000000..2ce8496 --- /dev/null +++ b/docs/UserAccess.md @@ -0,0 +1,38 @@ +# UserAccess + +# User Access Object ### Description The `UserAccess` object represents a user's access to a single resource or group at one access level, either directly or indirectly (for example, through group membership). ### Usage Example Fetch from the `GET /users/{user_id}/access` endpoint. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**entity_type** | [**UserAccessEntityTypeEnum**](UserAccessEntityTypeEnum.md) | | +**entity_id** | **UUID** | The ID of the resource or group. | +**entity_name** | **str** | The name of the resource or group. | +**description** | **str** | The description of the resource or group. | +**access_level** | [**UserAccessLevel**](UserAccessLevel.md) | | +**expiration_date** | **datetime** | The day and time the user's access will expire. If the user has more than one way to access the entity, this is the latest expiration. Null if the access does not expire. | [optional] +**has_direct_access** | **bool** | The user has direct access to this entity (vs. indirectly, like through a group). | +**num_access_paths** | **int** | The number of ways in which the user has access to this entity (directly and indirectly). | +**propagation_status** | [**PropagationStatus**](PropagationStatus.md) | | [optional] + +## Example + +```python +from opal_security.models.user_access import UserAccess + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAccess from a JSON string +user_access_instance = UserAccess.from_json(json) +# print the JSON string representation of the object +print(UserAccess.to_json()) + +# convert the object into a dict +user_access_dict = user_access_instance.to_dict() +# create an instance of UserAccess from a dict +user_access_from_dict = UserAccess.from_dict(user_access_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserAccessEntityTypeEnum.md b/docs/UserAccessEntityTypeEnum.md new file mode 100644 index 0000000..739b446 --- /dev/null +++ b/docs/UserAccessEntityTypeEnum.md @@ -0,0 +1,13 @@ +# UserAccessEntityTypeEnum + +The type of entity a user has access to. + +## Enum + +* `GROUP` (value: `'GROUP'`) + +* `RESOURCE` (value: `'RESOURCE'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserAccessLevel.md b/docs/UserAccessLevel.md new file mode 100644 index 0000000..36839b1 --- /dev/null +++ b/docs/UserAccessLevel.md @@ -0,0 +1,31 @@ +# UserAccessLevel + +The level of access the user has to a resource or group. The \"default\" access level is an object whose fields are all empty strings. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_level_name** | **str** | The human-readable name of the access level. | +**access_level_remote_id** | **str** | The machine-readable identifier of the access level. | + +## Example + +```python +from opal_security.models.user_access_level import UserAccessLevel + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAccessLevel from a JSON string +user_access_level_instance = UserAccessLevel.from_json(json) +# print the JSON string representation of the object +print(UserAccessLevel.to_json()) + +# convert the object into a dict +user_access_level_dict = user_access_level_instance.to_dict() +# create an instance of UserAccessLevel from a dict +user_access_level_from_dict = UserAccessLevel.from_dict(user_access_level_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserAccessList.md b/docs/UserAccessList.md new file mode 100644 index 0000000..d2b4c19 --- /dev/null +++ b/docs/UserAccessList.md @@ -0,0 +1,32 @@ +# UserAccessList + +A user's access to resources and groups, or one page of it if `page_size` was set. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[UserAccess]**](UserAccess.md) | | +**next** | **str** | The cursor with which to continue pagination if additional result pages exist. | [optional] +**previous** | **str** | The cursor used to obtain the current result page. | [optional] + +## Example + +```python +from opal_security.models.user_access_list import UserAccessList + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAccessList from a JSON string +user_access_list_instance = UserAccessList.from_json(json) +# print the JSON string representation of the object +print(UserAccessList.to_json()) + +# convert the object into a dict +user_access_list_dict = user_access_list_instance.to_dict() +# create an instance of UserAccessList from a dict +user_access_list_from_dict = UserAccessList.from_dict(user_access_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserAttributeSelector.md b/docs/UserAttributeSelector.md index 02b3ad4..051220e 100644 --- a/docs/UserAttributeSelector.md +++ b/docs/UserAttributeSelector.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **attribute** | **str** | | -**values** | **List[str]** | | +**values** | **List[str]** | Values to match; a user matches if their attribute equals any of them. For HR_IDP_STATUS, use HrIdpStatus values, or UNSET for users with no IDP status (shown as \"Inactive\"). UNSET must be the last value. | ## Example diff --git a/docs/UserProductRoleEnum.md b/docs/UserProductRoleEnum.md new file mode 100644 index 0000000..42efd34 --- /dev/null +++ b/docs/UserProductRoleEnum.md @@ -0,0 +1,13 @@ +# UserProductRoleEnum + +The product role assigned to a user. + +## Enum + +* `MEMBER` (value: `'MEMBER'`) + +* `ADMIN` (value: `'ADMIN'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsersApi.md b/docs/UsersApi.md index 262d8ec..af863b7 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -4,12 +4,100 @@ All URIs are relative to *https://api.opal.dev/v1* Method | HTTP request | Description ------------- | ------------- | ------------- +[**delete_user**](UsersApi.md#delete_user) | **DELETE** /users/{user_id} | [**get_remote_users**](UsersApi.md#get_remote_users) | **GET** /users/remote_users | +[**get_user_access**](UsersApi.md#get_user_access) | **GET** /users/{user_id}/access | Get a user's access +[**get_user_by_id**](UsersApi.md#get_user_by_id) | **GET** /users/{user_id} | Get user by ID [**get_user_tags**](UsersApi.md#get_user_tags) | **GET** /users/{user_id}/tags | +[**get_user_whoami**](UsersApi.md#get_user_whoami) | **GET** /users/whoami | [**get_users**](UsersApi.md#get_users) | **GET** /users | +[**invite_user**](UsersApi.md#invite_user) | **POST** /users | +[**reset_user_mfa**](UsersApi.md#reset_user_mfa) | **POST** /users/{user_id}/mfa/reset | Reset a user's Opal MFA +[**revoke_all_user_access**](UsersApi.md#revoke_all_user_access) | **POST** /users/{user_id}/revoke-all | Revoke all of a user's access +[**update_user**](UsersApi.md#update_user) | **PATCH** /users/{user_id} | [**user**](UsersApi.md#user) | **GET** /user | +# **delete_user** +> User delete_user(user_id) + +Deletes a user from your organization. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.user import User +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.UsersApi(api_client) + user_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | The ID of the user to delete. + + try: + api_response = api_instance.delete_user(user_id) + print("The response of UsersApi->delete_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->delete_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **UUID**| The ID of the user to delete. | + +### Return type + +[**User**](User.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The deleted user. | - | +**403** | The caller is not authorized to delete the user. | - | +**404** | The user was not found. | - | +**409** | The user cannot be deleted in its current state. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_remote_users** > PaginatedRemoteUsersList get_remote_users(third_party_provider=third_party_provider, user_id=user_id, remote_id=remote_id, cursor=cursor, page_size=page_size) @@ -96,6 +184,188 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_user_access** +> UserAccessList get_user_access(user_id, cursor=cursor, page_size=page_size, entity_type=entity_type, include_unmanaged=include_unmanaged) + +Get a user's access + +Returns all of the resources and groups the user has access to, in a single list. All +results are returned unless `page_size` is set, in which case the list is paginated. +Includes access the user has directly and access they have indirectly (for example, through +group membership or nested groups). Use `has_direct_access` and `num_access_paths` to tell +them apart. + +Each row is one (resource or group, access level) pair. Only assignments the caller is +allowed to read are returned, so the list can be empty or partial for a caller without +permission to read assignments on the user's resources and groups. Results are ordered by +entity ID; the order is stable across pages but has no other meaning. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.user_access_entity_type_enum import UserAccessEntityTypeEnum +from opal_security.models.user_access_list import UserAccessList +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.UsersApi(api_client) + user_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the user whose access to return. + cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The `next` cursor from a previous response. Resumes the list at that point. (optional) + page_size = 200 # int | Number of results to return per page. Maximum is 1000. If omitted, all results are returned in a single response and `next` is null. (optional) + entity_type = opal_security.UserAccessEntityTypeEnum() # UserAccessEntityTypeEnum | Only return access to this type of entity. Omit to return both resources and groups. (optional) + include_unmanaged = false # bool | Include the user's access to unmanaged resources. (optional) + + try: + # Get a user's access + api_response = api_instance.get_user_access(user_id, cursor=cursor, page_size=page_size, entity_type=entity_type, include_unmanaged=include_unmanaged) + print("The response of UsersApi->get_user_access:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->get_user_access: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **UUID**| The ID of the user whose access to return. | + **cursor** | **str**| The `next` cursor from a previous response. Resumes the list at that point. | [optional] + **page_size** | **int**| Number of results to return per page. Maximum is 1000. If omitted, all results are returned in a single response and `next` is null. | [optional] + **entity_type** | [**UserAccessEntityTypeEnum**](.md)| Only return access to this type of entity. Omit to return both resources and groups. | [optional] + **include_unmanaged** | **bool**| Include the user's access to unmanaged resources. | [optional] + +### Return type + +[**UserAccessList**](UserAccessList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The resources and groups the user has access to. | - | +**400** | The cursor, `entity_type`, or `user_id` is invalid. | - | +**404** | The user was not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_user_by_id** +> User get_user_by_id(user_id) + +Get user by ID + +Returns a `User` object. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.user import User +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.UsersApi(api_client) + user_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the user. + + try: + # Get user by ID + api_response = api_instance.get_user_by_id(user_id) + print("The response of UsersApi->get_user_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->get_user_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **UUID**| The ID of the user. | + +### Return type + +[**User**](User.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The requested `User`. | - | +**404** | The user was not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_user_tags** > TagsList get_user_tags(user_id) @@ -173,10 +443,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_users** -> PaginatedUsersList get_users(cursor=cursor, page_size=page_size, tag_ids=tag_ids) +# **get_user_whoami** +> User get_user_whoami() -Returns a list of users for your organization. +Returns the user that the provided API token authenticates as. ### Example @@ -184,7 +454,7 @@ Returns a list of users for your organization. ```python import opal_security -from opal_security.models.paginated_users_list import PaginatedUsersList +from opal_security.models.user import User from opal_security.rest import ApiException from pprint import pprint @@ -210,32 +480,24 @@ configuration = opal.Configuration( with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = opal_security.UsersApi(api_client) - cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional) - page_size = 200 # int | Number of results to return per page. Default is 200. (optional) - tag_ids = None # List[UUID] | The IDs of the tags to filter by. Returns only users that have any of these tags applied. (optional) try: - api_response = api_instance.get_users(cursor=cursor, page_size=page_size, tag_ids=tag_ids) - print("The response of UsersApi->get_users:\n") + api_response = api_instance.get_user_whoami() + print("The response of UsersApi->get_user_whoami:\n") pprint(api_response) except Exception as e: - print("Exception when calling UsersApi->get_users: %s\n" % e) + print("Exception when calling UsersApi->get_user_whoami: %s\n" % e) ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **str**| The pagination cursor value. | [optional] - **page_size** | **int**| Number of results to return per page. Default is 200. | [optional] - **tag_ids** | [**List[UUID]**](UUID.md)| The IDs of the tags to filter by. Returns only users that have any of these tags applied. | [optional] +This endpoint does not need any parameter. ### Return type -[**PaginatedUsersList**](PaginatedUsersList.md) +[**User**](User.md) ### Authorization @@ -250,7 +512,453 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | One page worth users in your organization. | - | +**200** | The user that the API token authenticates as. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_users** +> PaginatedUsersList get_users(cursor=cursor, page_size=page_size, tag_ids=tag_ids) + +Returns a list of users for your organization. Includes agent-labeled identities that appear on the Users page. Classic service accounts are not included. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.paginated_users_list import PaginatedUsersList +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.UsersApi(api_client) + cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional) + page_size = 200 # int | Number of results to return per page. Default is 200. (optional) + tag_ids = None # List[UUID] | The IDs of the tags to filter by. Returns only users that have any of these tags applied. (optional) + + try: + api_response = api_instance.get_users(cursor=cursor, page_size=page_size, tag_ids=tag_ids) + print("The response of UsersApi->get_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->get_users: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cursor** | **str**| The pagination cursor value. | [optional] + **page_size** | **int**| Number of results to return per page. Default is 200. | [optional] + **tag_ids** | [**List[UUID]**](UUID.md)| The IDs of the tags to filter by. Returns only users that have any of these tags applied. | [optional] + +### Return type + +[**PaginatedUsersList**](PaginatedUsersList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | One page worth users in your organization. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **invite_user** +> User invite_user(invite_user_info) + +Invites a user to your organization. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.invite_user_info import InviteUserInfo +from opal_security.models.user import User +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.UsersApi(api_client) + invite_user_info = opal_security.InviteUserInfo() # InviteUserInfo | + + try: + api_response = api_instance.invite_user(invite_user_info) + print("The response of UsersApi->invite_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->invite_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invite_user_info** | [**InviteUserInfo**](InviteUserInfo.md)| | + +### Return type + +[**User**](User.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The invited user. | - | +**400** | The invite input is invalid. | - | +**403** | The caller is not authorized to invite users. | - | +**409** | The user already belongs to another organization. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **reset_user_mfa** +> EscalateRequest200Response reset_user_mfa(user_id) + +Reset a user's Opal MFA + +Deletes the user's Auth0 (Opal) MFA enrollments so they are prompted to +re-enroll on their next sign-in. Only applies to orgs that use Opal/Auth0 +for MFA (not available on-prem, and a no-op success for users who have +never signed into Auth0). + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.escalate_request200_response import EscalateRequest200Response +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.UsersApi(api_client) + user_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the user whose MFA should be reset. + + try: + # Reset a user's Opal MFA + api_response = api_instance.reset_user_mfa(user_id) + print("The response of UsersApi->reset_user_mfa:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->reset_user_mfa: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **UUID**| The ID of the user whose MFA should be reset. | + +### Return type + +[**EscalateRequest200Response**](EscalateRequest200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The MFA enrollments were reset, or the user has no Auth0 enrollments to reset (never signed into Auth0). | - | +**400** | The deployment does not support MFA reset (on-prem), the organization does not use Opal/Auth0 MFA, or the request body contained unknown JSON fields. | - | +**403** | The caller is not authorized to reset MFA for this user. | - | +**404** | The user was not found. | - | +**409** | The Opal system user cannot be modified. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **revoke_all_user_access** +> EscalateRequest200Response revoke_all_user_access(user_id) + +Revoke all of a user's access + +Immediately removes all of a user's access across connected systems, +regardless of the user's status in the identity provider. Intended for +incident response, e.g. a security tool reacting to a compromised account. +Ends the user's Opal sessions, deletes their Opal API tokens and +third-party tokens, revokes their MCP OAuth grants, removes their direct +group, access rule and resource access (pushing the removals to the +connected systems), and cancels their pending access requests. Recorded +as a USER_ACCESS_REVOKED event with the caller as the actor. + +This does not lock the user out, and the revocation does not last on its +own. The user and their accounts in connected systems are kept, and they +can sign in again through your identity provider. Access granted by Opal +access rules is granted again on the next access rule sync while the user +still matches the rule, and memberships that identity provider rules +control return on the next identity provider sync. To keep the user's +access revoked, also disable or deprovision them in your identity +provider. With the organization setting that revokes access for +deprovisioned users turned on, Opal then offboards them and stops granting +them access through access rules. + +Also not removed: membership in groups computed by a connected system +(e.g. dynamic groups), access to unmanaged groups and resources, and the +user's owner and reviewer roles. Removal from connected systems runs +asynchronously; a 200 response means the removals were started, not that +every connected system has finished. A removal that failed permanently +before is retried. A removal that is already in progress is left to +finish and is not started again, so check its propagation status if it +stays pending. + + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.escalate_request200_response import EscalateRequest200Response +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.UsersApi(api_client) + user_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the user whose access should be revoked. + + try: + # Revoke all of a user's access + api_response = api_instance.revoke_all_user_access(user_id) + print("The response of UsersApi->revoke_all_user_access:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->revoke_all_user_access: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **UUID**| The ID of the user whose access should be revoked. | + +### Return type + +[**EscalateRequest200Response**](EscalateRequest200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The user's access removal was started. | - | +**400** | The request body contained unknown JSON fields. | - | +**403** | The caller is not authorized to delete this user. | - | +**404** | The user was not found. | - | +**409** | The Opal system user cannot be modified, or the user is the last direct Opal admin. Their API tokens, third-party tokens and MCP OAuth grants are still revoked and their pending requests still canceled in that case. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_user** +> User update_user(user_id, update_user_info) + +Updates a user's position or manager. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal_security +from opal_security.models.update_user_info import UpdateUserInfo +from opal_security.models.user import User +from opal_security.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +import opal_security as opal + +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal_security.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal_security.UsersApi(api_client) + user_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | The ID of the user to update. + update_user_info = opal_security.UpdateUserInfo() # UpdateUserInfo | + + try: + api_response = api_instance.update_user(user_id, update_user_info) + print("The response of UsersApi->update_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->update_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **UUID**| The ID of the user to update. | + **update_user_info** | [**UpdateUserInfo**](UpdateUserInfo.md)| | + +### Return type + +[**User**](User.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated user. | - | +**400** | The update input is invalid. | - | +**403** | The caller is not authorized to update the user. | - | +**404** | The user was not found. | - | +**409** | The user is managed by an identity provider or is immutable. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/ViewerCampaignItem.md b/docs/ViewerCampaignItem.md new file mode 100644 index 0000000..79d469e --- /dev/null +++ b/docs/ViewerCampaignItem.md @@ -0,0 +1,49 @@ +# ViewerCampaignItem + +A campaign review item assigned to the current viewer, matching GraphQL `ViewerCampaignItem`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_item_review_id** | **UUID** | The ID of the campaign item review. | +**decision** | [**ViewerCampaignItemReviewDecisionEnum**](ViewerCampaignItemReviewDecisionEnum.md) | The reviewer's decision. Null when undecided. | [optional] +**note** | **str** | Optional note from the reviewer. | [optional] +**decided_at** | **datetime** | When the decision was finalized. | [optional] +**pending_decision** | [**ViewerCampaignItemReviewDecisionEnum**](ViewerCampaignItemReviewDecisionEnum.md) | Pending decision staged by the viewer, if any. | [optional] +**pending_note** | **str** | Pending note attached to the reviewer's pending decision. | [optional] +**updated_access_level_remote_id** | **str** | Target access level remote ID when decision is CHANGE_ROLE. | [optional] +**pending_updated_access_level_remote_id** | **str** | Pending target access level remote ID when decision is CHANGE_ROLE. | [optional] +**updated_duration_in_minutes** | **int** | Built-in duration in minutes when decision is REDUCE_EXPIRATION. | [optional] +**pending_updated_duration_in_minutes** | **int** | Staged built-in duration in minutes when the pending decision is REDUCE_EXPIRATION. | [optional] +**reassigned_to_reviewer_ids** | **List[UUID]** | User IDs this review was reassigned to. | [optional] +**principal_id** | **UUID** | Principal ID from the role assignment. | +**principal_type** | [**EntityTypeEnum**](EntityTypeEnum.md) | | +**entity_id** | **UUID** | Entity ID from the role assignment. | +**entity_type** | [**EntityTypeEnum**](EntityTypeEnum.md) | | +**access_level_name** | **str** | Denormalized access level name. | [optional] +**access_level_remote_id** | **str** | Access level remote ID from the role assignment. | [optional] +**granted_at** | **datetime** | When the access was originally granted. | +**expires_at** | **datetime** | When the access expires, if set. | [optional] +**role_assignment_id** | **UUID** | ID of the underlying role assignment. | + +## Example + +```python +from opal_security.models.viewer_campaign_item import ViewerCampaignItem + +# TODO update the JSON string below +json = "{}" +# create an instance of ViewerCampaignItem from a JSON string +viewer_campaign_item_instance = ViewerCampaignItem.from_json(json) +# print the JSON string representation of the object +print(ViewerCampaignItem.to_json()) + +# convert the object into a dict +viewer_campaign_item_dict = viewer_campaign_item_instance.to_dict() +# create an instance of ViewerCampaignItem from a dict +viewer_campaign_item_from_dict = ViewerCampaignItem.from_dict(viewer_campaign_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ViewerCampaignItemReviewDecisionEnum.md b/docs/ViewerCampaignItemReviewDecisionEnum.md new file mode 100644 index 0000000..ceb6af4 --- /dev/null +++ b/docs/ViewerCampaignItemReviewDecisionEnum.md @@ -0,0 +1,23 @@ +# ViewerCampaignItemReviewDecisionEnum + +Decision recorded on a campaign item review row. + +## Enum + +* `APPROVED` (value: `'APPROVED'`) + +* `REVOKED` (value: `'REVOKED'`) + +* `CHANGE_ROLE` (value: `'CHANGE_ROLE'`) + +* `REDUCE_EXPIRATION` (value: `'REDUCE_EXPIRATION'`) + +* `ADMIN_REVOKED` (value: `'ADMIN_REVOKED'`) + +* `NO_ACTION` (value: `'NO_ACTION'`) + +* `REASSIGNED` (value: `'REASSIGNED'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ViewerCampaignItemSortFieldEnum.md b/docs/ViewerCampaignItemSortFieldEnum.md new file mode 100644 index 0000000..c8c6788 --- /dev/null +++ b/docs/ViewerCampaignItemSortFieldEnum.md @@ -0,0 +1,17 @@ +# ViewerCampaignItemSortFieldEnum + +Sort field for viewer campaign items. + +## Enum + +* `PRINCIPAL_NAME` (value: `'PRINCIPAL_NAME'`) + +* `ENTITY_NAME` (value: `'ENTITY_NAME'`) + +* `EXPIRATION` (value: `'EXPIRATION'`) + +* `LAST_USED` (value: `'LAST_USED'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ViewerCampaignItemStatusEnum.md b/docs/ViewerCampaignItemStatusEnum.md new file mode 100644 index 0000000..25408f7 --- /dev/null +++ b/docs/ViewerCampaignItemStatusEnum.md @@ -0,0 +1,23 @@ +# ViewerCampaignItemStatusEnum + +Decision status for a viewer campaign item. + +## Enum + +* `APPROVED` (value: `'APPROVED'`) + +* `REVOKED` (value: `'REVOKED'`) + +* `CHANGE_ROLE` (value: `'CHANGE_ROLE'`) + +* `REDUCE_EXPIRATION` (value: `'REDUCE_EXPIRATION'`) + +* `NO_ACTION` (value: `'NO_ACTION'`) + +* `PENDING` (value: `'PENDING'`) + +* `REASSIGNED` (value: `'REASSIGNED'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/opal_security/__init__.py b/opal_security/__init__.py index bfd68aa..0b4da31 100644 --- a/opal_security/__init__.py +++ b/opal_security/__init__.py @@ -20,8 +20,10 @@ # Define package exports __all__ = [ "AccessRulesApi", + "AgentActivityApi", "AppsApi", "BundlesApi", + "CampaignsApi", "ConfigurationTemplatesApi", "DelegationsApi", "EventStreamsApi", @@ -33,9 +35,14 @@ "NonHumanIdentitiesApi", "OnCallSchedulesApi", "OpalQueriesApi", + "OpalScriptsApi", "OwnersApi", + "PaladinApi", + "RequestTemplatesApi", "RequestsApi", "ResourcesApi", + "RoleAssignmentsApi", + "ServiceUsersApi", "SessionsApi", "TagsApi", "TokensApi", @@ -61,12 +68,29 @@ "AddGroupUserRequest", "AddResourceNhiRequest", "AddResourceUserRequest", + "AddRoleAssignmentInput", + "AddRoleAssignmentsEntry", + "AddRoleAssignmentsRequest", + "AddRoleAssignmentsResponse", + "AgentActivityClientSetting", + "AgentActivityClientSettings", + "AgentActivityContentReport", + "AgentActivityEvent", + "AgentActivityImages", + "AgentActivityIngestRequest", + "AgentActivityIngestResult", + "AgentActivityMcpServer", + "AgentActivityOpalMcpServer", + "AgentActivityOpalReported", + "AgentKillSwitch", + "AnthropicInferenceHookVerdict", "ApiAccessLevelEnum", "App", "AppTypeEnum", "AppValidation", "AppValidationSeverityEnum", "AppValidationStatusEnum", + "AppVisibilityInfo", "ApproveRequest200Response", "ApproveRequestRequest", "AppsList", @@ -75,10 +99,31 @@ "Bundle", "BundleGroup", "BundleResource", + "Campaign", + "CampaignConfiguration", + "CampaignGroupAssetVisibilityPolicyEnum", + "CampaignItem", + "CampaignItemAdminOverride", + "CampaignItemReview", + "CampaignItemReviewDecisionEnum", + "CampaignItemReviewResult", + "CampaignItemReviewerAssignment", + "CampaignItemReviewerAssignmentSourceEnum", + "CampaignItemReviewerSourceRemoval", + "CampaignItemStatusEnum", + "CampaignItemTargetTypeEnum", + "CampaignItemUnassignedPresetMessage", + "CampaignRevokeOnEnum", + "CampaignStatusEnum", + "CancelRequestRequest", "Condition", "ConfigurationTemplate", + "CreateAppInfo", "CreateBundleInfo", + "CreateCampaignConfigurationInfo", + "CreateCampaignInfo", "CreateConfigurationTemplateInfo", + "CreateCustomConnectorInfo", "CreateDelegationRequest", "CreateEventStreamInfo", "CreateGroupBindingInfo", @@ -87,7 +132,10 @@ "CreateIdpGroupMappingRequest", "CreateMessageChannelInfo", "CreateOnCallScheduleInfo", + "CreateOpalScriptInfo", "CreateOwnerInfo", + "CreatePaladinContextSourceInfo", + "CreatePaladinInfo", "CreateRequest200Response", "CreateRequestCommentRequest", "CreateRequestConfigurationInfoList", @@ -96,15 +144,26 @@ "CreateRequestInfoGroupsInner", "CreateRequestInfoResourcesInner", "CreateRequestInfoSupportTicket", + "CreateRequestTemplateInfo", + "CreateResourceCustomAccessLevelInfo", "CreateResourceInfo", + "CreateServiceUserRequest", "CreateTagInfo", + "CreateTokenInfo", + "CreateTokenResponse", "CreateUARInfo", + "CustomConnectorAppConfig", + "CustomConnectorIdpProtocolEnum", "Delegation", "DenyRequestRequest", + "EntityAdminFilter", + "EntityDescriptionFilter", "EntityItemTypeEnum", "EntityNameFilter", "EntityTagFilter", + "EntityTagKeyFilter", "EntityTypeEnum", + "EscalateRequest200Response", "Event", "EventStream", "EventStreamConnection", @@ -113,19 +172,35 @@ "GetResourceUser200Response", "Group", "GroupAccessLevel", + "GroupAccessLevelList", "GroupBinding", "GroupBindingGroup", + "GroupConfigurationTemplate", "GroupContainingGroup", "GroupContainingGroupList", + "GroupMemberGroup", + "GroupMemberGroupList", "GroupRemoteInfo", "GroupRemoteInfoActiveDirectoryGroup", + "GroupRemoteInfoActivecampaignGroup", + "GroupRemoteInfoAhaTeam", + "GroupRemoteInfoAsanaTeam", "GroupRemoteInfoAwsSsoGroup", + "GroupRemoteInfoAxiomGroup", "GroupRemoteInfoAzureAdMicrosoft365Group", "GroupRemoteInfoAzureAdSecurityGroup", + "GroupRemoteInfoBitwardenGroup", + "GroupRemoteInfoBoxGroup", + "GroupRemoteInfoCalendlyGroup", "GroupRemoteInfoClickhouseRole", + "GroupRemoteInfoConfluenceGroup", "GroupRemoteInfoConnectorGroup", + "GroupRemoteInfoCursorGroup", "GroupRemoteInfoDatabricksAccountGroup", + "GroupRemoteInfoDatadogOnCallSchedule", "GroupRemoteInfoDevinGroup", + "GroupRemoteInfoDocusignGroup", + "GroupRemoteInfoDocusignSigningGroup", "GroupRemoteInfoDuoGroup", "GroupRemoteInfoGithubEnterpriseTeam", "GroupRemoteInfoGithubTeam", @@ -134,19 +209,32 @@ "GroupRemoteInfoGrafanaTeam", "GroupRemoteInfoHubspotTeam", "GroupRemoteInfoIncidentioOnCallSchedule", + "GroupRemoteInfoJiraGroup", "GroupRemoteInfoLdapGroup", + "GroupRemoteInfoLinearTeam", "GroupRemoteInfoOktaGroup", "GroupRemoteInfoOktaGroupRule", + "GroupRemoteInfoOneloginGroup", + "GroupRemoteInfoOneloginRole", "GroupRemoteInfoPagerdutyOnCallSchedule", + "GroupRemoteInfoRampDepartment", + "GroupRemoteInfoRampLocation", + "GroupRemoteInfoRipplingSupergroup", + "GroupRemoteInfoRipplingTeam", "GroupRemoteInfoRootlyOnCallSchedule", "GroupRemoteInfoSlackUserGroup", "GroupRemoteInfoSnowflakeRole", + "GroupRemoteInfoSquareJob", + "GroupRemoteInfoSquareLocation", + "GroupRemoteInfoTableauGroup", "GroupRemoteInfoTailscaleGroup", "GroupRemoteInfoTwingateGroup", "GroupRemoteInfoTwingateGroupSynced", "GroupRemoteInfoWorkdayUserSecurityGroup", + "GroupRemoteInfoWrikeGroup", "GroupRemoteInfoZendeskGroup", "GroupRemoteInfoZendeskOrganization", + "GroupRemoteInfoZoomGroup", "GroupResource", "GroupResourceList", "GroupTypeEnum", @@ -155,19 +243,41 @@ "GroupWithAccessLevel", "IdpGroupMapping", "IdpGroupMappingList", + "IdpStatusFilter", + "InviteUserInfo", + "McpConfigPermission", + "McpConfigPlugin", + "McpConfigReport", + "McpConfigReportResult", + "McpConfigReporter", + "McpConfigServer", + "McpConfigSkill", + "McpConfigSubagent", "MessageChannel", "MessageChannelIDList", "MessageChannelList", "MessageChannelProviderEnum", + "NameMatchType", "OnCallSchedule", "OnCallScheduleIDList", "OnCallScheduleList", "OnCallScheduleProviderEnum", + "OpalAccessPathDetail", + "OpalAccessPathEdgeFilter", + "OpalAccessPathQueryBody", + "OpalAccessQuery", + "OpalAccessQueryResults", + "OpalAccessResultEdge", + "OpalAccessResultNode", "OpalNodeQuery", "OpalNodeQueryBody", "OpalNodeQueryResults", "OpalQueryResultEdge", "OpalQueryResultNode", + "OpalQueryResults", + "OpalScript", + "OpalScriptList", + "OpalScriptTypeEnum", "Owner", "PageInfo", "PaginatedAccessRulesList", @@ -175,6 +285,8 @@ "PaginatedBundleGroupList", "PaginatedBundleList", "PaginatedBundleResourceList", + "PaginatedCampaignItemsList", + "PaginatedCampaignsList", "PaginatedConfigurationTemplateList", "PaginatedDelegationsList", "PaginatedEventList", @@ -182,15 +294,29 @@ "PaginatedGroupsList", "PaginatedOwnersList", "PaginatedRemoteUsersList", + "PaginatedRequestTemplateList", "PaginatedResourcesList", + "PaginatedRoleAssignmentsList", "PaginatedTagsList", "PaginatedTokensList", "PaginatedUARsList", "PaginatedUsersList", + "PaginatedViewerCampaignItemsList", + "Paladin", + "PaladinConnector", + "PaladinContextSource", + "PaladinContextSourceKind", + "PaladinContextSourceList", + "PaladinContextSourceProvider", + "PaladinList", "PropagationStatus", "PropagationStatusEnum", "RDSEngineEnum", "RemoteUser", + "RemoveRoleAssignmentInput", + "RemoveRoleAssignmentsEntry", + "RemoveRoleAssignmentsRequest", + "RemoveRoleAssignmentsResponse", "Request", "RequestApprovalEnum", "RequestComment", @@ -206,15 +332,28 @@ "RequestReviewerStages", "RequestStage", "RequestStatusEnum", + "RequestTemplate", + "RequestTemplateCustomField", + "RequestTemplateCustomFieldCalloutMetadata", + "RequestTemplateCustomFieldInput", + "RequestTemplateCustomFieldMetadata", + "RequestTemplateCustomFieldMultiChoiceMetadata", "RequestTemplateCustomFieldTypeEnum", "RequestedItem", "Resource", "ResourceAccessLevel", + "ResourceAccessLevelList", "ResourceAccessUser", "ResourceAccessUserList", + "ResourceConfigurationTemplate", + "ResourceCustomAccessLevelList", + "ResourceCustomAccessLevelResponse", "ResourceNHI", "ResourceRemoteInfo", + "ResourceRemoteInfoAlicloudEcsInstance", + "ResourceRemoteInfoAlicloudRamRole", "ResourceRemoteInfoAnthropicWorkspace", + "ResourceRemoteInfoAsanaWorkspace", "ResourceRemoteInfoAwsAccount", "ResourceRemoteInfoAwsEc2Instance", "ResourceRemoteInfoAwsEksCluster", @@ -223,6 +362,8 @@ "ResourceRemoteInfoAwsPermissionSet", "ResourceRemoteInfoAwsRdsCluster", "ResourceRemoteInfoAwsRdsInstance", + "ResourceRemoteInfoAxiomCustomRole", + "ResourceRemoteInfoAxiomRole", "ResourceRemoteInfoAzureEnterpriseApp", "ResourceRemoteInfoAzureEntraIdRole", "ResourceRemoteInfoAzureManagementGroup", @@ -236,18 +377,33 @@ "ResourceRemoteInfoAzureSubscription", "ResourceRemoteInfoAzureUserAssignedManagedIdentity", "ResourceRemoteInfoAzureVirtualMachine", + "ResourceRemoteInfoBitwardenOrganization", + "ResourceRemoteInfoBoxEnterprise", + "ResourceRemoteInfoBoxFolder", + "ResourceRemoteInfoCalendlyEventType", + "ResourceRemoteInfoCalendlyRole", + "ResourceRemoteInfoClickhouseConsoleRole", "ResourceRemoteInfoClickhouseDatabase", "ResourceRemoteInfoClickhouseTable", "ResourceRemoteInfoCoupaRole", "ResourceRemoteInfoCursorOrganization", + "ResourceRemoteInfoCursorOriginRepository", "ResourceRemoteInfoCustomConnector", "ResourceRemoteInfoDatabricksAccountServicePrincipal", + "ResourceRemoteInfoDatabricksCatalog", + "ResourceRemoteInfoDatabricksFunction", + "ResourceRemoteInfoDatabricksModel", + "ResourceRemoteInfoDatabricksSchema", + "ResourceRemoteInfoDatabricksService", + "ResourceRemoteInfoDatabricksVolume", "ResourceRemoteInfoDatadogRole", "ResourceRemoteInfoDatastaxAstraRole", "ResourceRemoteInfoDevinOrganization", "ResourceRemoteInfoDevinRole", + "ResourceRemoteInfoDocusignPermissionProfile", "ResourceRemoteInfoGcpBigQueryDataset", "ResourceRemoteInfoGcpBigQueryTable", + "ResourceRemoteInfoGcpBillingAccount", "ResourceRemoteInfoGcpBucket", "ResourceRemoteInfoGcpComputeInstance", "ResourceRemoteInfoGcpFolder", @@ -267,44 +423,69 @@ "ResourceRemoteInfoGrafanaRole", "ResourceRemoteInfoHubspotRole", "ResourceRemoteInfoIlevelAdvancedRole", + "ResourceRemoteInfoLinearOrganization", + "ResourceRemoteInfoLinearProject", "ResourceRemoteInfoNetsuiteRole", "ResourceRemoteInfoOktaApp", "ResourceRemoteInfoOktaCustomRole", "ResourceRemoteInfoOktaStandardRole", + "ResourceRemoteInfoOneloginApp", "ResourceRemoteInfoOpenaiPlatformProject", "ResourceRemoteInfoOpenaiPlatformServiceAccount", "ResourceRemoteInfoOracleFusionRole", "ResourceRemoteInfoPagerdutyRole", + "ResourceRemoteInfoRampFund", + "ResourceRemoteInfoRampRole", + "ResourceRemoteInfoRipplingDepartment", "ResourceRemoteInfoSalesforcePermissionSet", "ResourceRemoteInfoSalesforceProfile", "ResourceRemoteInfoSalesforceRole", + "ResourceRemoteInfoSlackOrganization", + "ResourceRemoteInfoSlackWorkspace", "ResourceRemoteInfoSnowflakeDatabase", "ResourceRemoteInfoSnowflakeSchema", "ResourceRemoteInfoSnowflakeTable", "ResourceRemoteInfoTailscaleSsh", "ResourceRemoteInfoTeleportRole", + "ResourceRemoteInfoTrayOrganization", + "ResourceRemoteInfoTrayWorkspace", "ResourceRemoteInfoTwingateResource", + "ResourceRemoteInfoVercelProject", + "ResourceRemoteInfoVercelRole", "ResourceRemoteInfoWorkdayRole", + "ResourceRemoteInfoWrikeUserType", "ResourceRemoteInfoZendeskRole", + "ResourceRemoteInfoZoomLicense", + "ResourceRemoteInfoZoomRole", "ResourceTypeEnum", "ResourceUser", "ResourceUserAccessStatus", "ResourceUserAccessStatusEnum", "ResourceWithAccessLevel", + "ReviewCampaignItemDecisionInfo", + "ReviewCampaignItemsInfo", + "ReviewCampaignItemsResponse", "ReviewStageOperator", "ReviewerIDList", "ReviewerStage", + "ReviewerStageEscalation", "ReviewerStageList", "RiskSensitivityEnum", + "RoleAssignment", + "RoleAssignmentEntityTypeEnum", "RolePermissionNameEnum", "RolePermissionTargetTypeEnum", "RuleClauses", "RuleConjunction", "RuleDisjunction", + "RunOpalQueryRequest", "ScopedRolePermission", "ScopedRolePermissionList", "Session", "SessionsList", + "SetAgentKillSwitchRequest", + "SortDirectionEnum", + "StopCampaignRequest", "StringMatchType", "SubEvent", "SyncError", @@ -322,7 +503,13 @@ "UARReviewerAssignmentPolicyEnum", "UARScope", "UpdateAccessRuleInfo", + "UpdateAppInfo", + "UpdateCampaignConfigurationInfo", + "UpdateCampaignInfo", + "UpdateCampaignItemReviewersInfo", + "UpdateCampaignItemReviewersResult", "UpdateConfigurationTemplateInfo", + "UpdateCustomConnectorInfo", "UpdateEventStreamInfo", "UpdateGroupBindingInfo", "UpdateGroupBindingInfoList", @@ -332,16 +519,30 @@ "UpdateGroupUserRequest", "UpdateIdpGroupMappingsRequest", "UpdateIdpGroupMappingsRequestMappingsInner", + "UpdateOpalScriptInfo", "UpdateOwnerInfo", "UpdateOwnerInfoList", + "UpdatePaladinInfo", + "UpdateRequestTemplateInfo", + "UpdateResourceCustomAccessLevelInfo", "UpdateResourceInfo", "UpdateResourceInfoList", "UpdateResourceUserRequest", + "UpdateUserInfo", "User", + "UserAccess", + "UserAccessEntityTypeEnum", + "UserAccessLevel", + "UserAccessList", "UserAttributeSelector", "UserHrIdpStatusEnum", "UserIDList", "UserList", + "UserProductRoleEnum", + "ViewerCampaignItem", + "ViewerCampaignItemReviewDecisionEnum", + "ViewerCampaignItemSortFieldEnum", + "ViewerCampaignItemStatusEnum", "VisibilityInfo", "VisibilityTypeEnum", "WebhookApiKeyCredential", @@ -353,8 +554,10 @@ # import apis into sdk package from opal_security.api.access_rules_api import AccessRulesApi as AccessRulesApi +from opal_security.api.agent_activity_api import AgentActivityApi as AgentActivityApi from opal_security.api.apps_api import AppsApi as AppsApi from opal_security.api.bundles_api import BundlesApi as BundlesApi +from opal_security.api.campaigns_api import CampaignsApi as CampaignsApi from opal_security.api.configuration_templates_api import ConfigurationTemplatesApi as ConfigurationTemplatesApi from opal_security.api.delegations_api import DelegationsApi as DelegationsApi from opal_security.api.event_streams_api import EventStreamsApi as EventStreamsApi @@ -366,9 +569,14 @@ from opal_security.api.non_human_identities_api import NonHumanIdentitiesApi as NonHumanIdentitiesApi from opal_security.api.on_call_schedules_api import OnCallSchedulesApi as OnCallSchedulesApi from opal_security.api.opal_queries_api import OpalQueriesApi as OpalQueriesApi +from opal_security.api.opal_scripts_api import OpalScriptsApi as OpalScriptsApi from opal_security.api.owners_api import OwnersApi as OwnersApi +from opal_security.api.paladin_api import PaladinApi as PaladinApi +from opal_security.api.request_templates_api import RequestTemplatesApi as RequestTemplatesApi from opal_security.api.requests_api import RequestsApi as RequestsApi from opal_security.api.resources_api import ResourcesApi as ResourcesApi +from opal_security.api.role_assignments_api import RoleAssignmentsApi as RoleAssignmentsApi +from opal_security.api.service_users_api import ServiceUsersApi as ServiceUsersApi from opal_security.api.sessions_api import SessionsApi as SessionsApi from opal_security.api.tags_api import TagsApi as TagsApi from opal_security.api.tokens_api import TokensApi as TokensApi @@ -398,12 +606,29 @@ from opal_security.models.add_group_user_request import AddGroupUserRequest as AddGroupUserRequest from opal_security.models.add_resource_nhi_request import AddResourceNhiRequest as AddResourceNhiRequest from opal_security.models.add_resource_user_request import AddResourceUserRequest as AddResourceUserRequest +from opal_security.models.add_role_assignment_input import AddRoleAssignmentInput as AddRoleAssignmentInput +from opal_security.models.add_role_assignments_entry import AddRoleAssignmentsEntry as AddRoleAssignmentsEntry +from opal_security.models.add_role_assignments_request import AddRoleAssignmentsRequest as AddRoleAssignmentsRequest +from opal_security.models.add_role_assignments_response import AddRoleAssignmentsResponse as AddRoleAssignmentsResponse +from opal_security.models.agent_activity_client_setting import AgentActivityClientSetting as AgentActivityClientSetting +from opal_security.models.agent_activity_client_settings import AgentActivityClientSettings as AgentActivityClientSettings +from opal_security.models.agent_activity_content_report import AgentActivityContentReport as AgentActivityContentReport +from opal_security.models.agent_activity_event import AgentActivityEvent as AgentActivityEvent +from opal_security.models.agent_activity_images import AgentActivityImages as AgentActivityImages +from opal_security.models.agent_activity_ingest_request import AgentActivityIngestRequest as AgentActivityIngestRequest +from opal_security.models.agent_activity_ingest_result import AgentActivityIngestResult as AgentActivityIngestResult +from opal_security.models.agent_activity_mcp_server import AgentActivityMcpServer as AgentActivityMcpServer +from opal_security.models.agent_activity_opal_mcp_server import AgentActivityOpalMcpServer as AgentActivityOpalMcpServer +from opal_security.models.agent_activity_opal_reported import AgentActivityOpalReported as AgentActivityOpalReported +from opal_security.models.agent_kill_switch import AgentKillSwitch as AgentKillSwitch +from opal_security.models.anthropic_inference_hook_verdict import AnthropicInferenceHookVerdict as AnthropicInferenceHookVerdict from opal_security.models.api_access_level_enum import ApiAccessLevelEnum as ApiAccessLevelEnum from opal_security.models.app import App as App from opal_security.models.app_type_enum import AppTypeEnum as AppTypeEnum from opal_security.models.app_validation import AppValidation as AppValidation from opal_security.models.app_validation_severity_enum import AppValidationSeverityEnum as AppValidationSeverityEnum from opal_security.models.app_validation_status_enum import AppValidationStatusEnum as AppValidationStatusEnum +from opal_security.models.app_visibility_info import AppVisibilityInfo as AppVisibilityInfo from opal_security.models.approve_request200_response import ApproveRequest200Response as ApproveRequest200Response from opal_security.models.approve_request_request import ApproveRequestRequest as ApproveRequestRequest from opal_security.models.apps_list import AppsList as AppsList @@ -412,10 +637,31 @@ from opal_security.models.bundle import Bundle as Bundle from opal_security.models.bundle_group import BundleGroup as BundleGroup from opal_security.models.bundle_resource import BundleResource as BundleResource +from opal_security.models.campaign import Campaign as Campaign +from opal_security.models.campaign_configuration import CampaignConfiguration as CampaignConfiguration +from opal_security.models.campaign_group_asset_visibility_policy_enum import CampaignGroupAssetVisibilityPolicyEnum as CampaignGroupAssetVisibilityPolicyEnum +from opal_security.models.campaign_item import CampaignItem as CampaignItem +from opal_security.models.campaign_item_admin_override import CampaignItemAdminOverride as CampaignItemAdminOverride +from opal_security.models.campaign_item_review import CampaignItemReview as CampaignItemReview +from opal_security.models.campaign_item_review_decision_enum import CampaignItemReviewDecisionEnum as CampaignItemReviewDecisionEnum +from opal_security.models.campaign_item_review_result import CampaignItemReviewResult as CampaignItemReviewResult +from opal_security.models.campaign_item_reviewer_assignment import CampaignItemReviewerAssignment as CampaignItemReviewerAssignment +from opal_security.models.campaign_item_reviewer_assignment_source_enum import CampaignItemReviewerAssignmentSourceEnum as CampaignItemReviewerAssignmentSourceEnum +from opal_security.models.campaign_item_reviewer_source_removal import CampaignItemReviewerSourceRemoval as CampaignItemReviewerSourceRemoval +from opal_security.models.campaign_item_status_enum import CampaignItemStatusEnum as CampaignItemStatusEnum +from opal_security.models.campaign_item_target_type_enum import CampaignItemTargetTypeEnum as CampaignItemTargetTypeEnum +from opal_security.models.campaign_item_unassigned_preset_message import CampaignItemUnassignedPresetMessage as CampaignItemUnassignedPresetMessage +from opal_security.models.campaign_revoke_on_enum import CampaignRevokeOnEnum as CampaignRevokeOnEnum +from opal_security.models.campaign_status_enum import CampaignStatusEnum as CampaignStatusEnum +from opal_security.models.cancel_request_request import CancelRequestRequest as CancelRequestRequest from opal_security.models.condition import Condition as Condition from opal_security.models.configuration_template import ConfigurationTemplate as ConfigurationTemplate +from opal_security.models.create_app_info import CreateAppInfo as CreateAppInfo from opal_security.models.create_bundle_info import CreateBundleInfo as CreateBundleInfo +from opal_security.models.create_campaign_configuration_info import CreateCampaignConfigurationInfo as CreateCampaignConfigurationInfo +from opal_security.models.create_campaign_info import CreateCampaignInfo as CreateCampaignInfo from opal_security.models.create_configuration_template_info import CreateConfigurationTemplateInfo as CreateConfigurationTemplateInfo +from opal_security.models.create_custom_connector_info import CreateCustomConnectorInfo as CreateCustomConnectorInfo from opal_security.models.create_delegation_request import CreateDelegationRequest as CreateDelegationRequest from opal_security.models.create_event_stream_info import CreateEventStreamInfo as CreateEventStreamInfo from opal_security.models.create_group_binding_info import CreateGroupBindingInfo as CreateGroupBindingInfo @@ -424,7 +670,10 @@ from opal_security.models.create_idp_group_mapping_request import CreateIdpGroupMappingRequest as CreateIdpGroupMappingRequest from opal_security.models.create_message_channel_info import CreateMessageChannelInfo as CreateMessageChannelInfo from opal_security.models.create_on_call_schedule_info import CreateOnCallScheduleInfo as CreateOnCallScheduleInfo +from opal_security.models.create_opal_script_info import CreateOpalScriptInfo as CreateOpalScriptInfo from opal_security.models.create_owner_info import CreateOwnerInfo as CreateOwnerInfo +from opal_security.models.create_paladin_context_source_info import CreatePaladinContextSourceInfo as CreatePaladinContextSourceInfo +from opal_security.models.create_paladin_info import CreatePaladinInfo as CreatePaladinInfo from opal_security.models.create_request200_response import CreateRequest200Response as CreateRequest200Response from opal_security.models.create_request_comment_request import CreateRequestCommentRequest as CreateRequestCommentRequest from opal_security.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList as CreateRequestConfigurationInfoList @@ -433,15 +682,26 @@ from opal_security.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner as CreateRequestInfoGroupsInner from opal_security.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner as CreateRequestInfoResourcesInner from opal_security.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket as CreateRequestInfoSupportTicket +from opal_security.models.create_request_template_info import CreateRequestTemplateInfo as CreateRequestTemplateInfo +from opal_security.models.create_resource_custom_access_level_info import CreateResourceCustomAccessLevelInfo as CreateResourceCustomAccessLevelInfo from opal_security.models.create_resource_info import CreateResourceInfo as CreateResourceInfo +from opal_security.models.create_service_user_request import CreateServiceUserRequest as CreateServiceUserRequest from opal_security.models.create_tag_info import CreateTagInfo as CreateTagInfo +from opal_security.models.create_token_info import CreateTokenInfo as CreateTokenInfo +from opal_security.models.create_token_response import CreateTokenResponse as CreateTokenResponse from opal_security.models.create_uar_info import CreateUARInfo as CreateUARInfo +from opal_security.models.custom_connector_app_config import CustomConnectorAppConfig as CustomConnectorAppConfig +from opal_security.models.custom_connector_idp_protocol_enum import CustomConnectorIdpProtocolEnum as CustomConnectorIdpProtocolEnum from opal_security.models.delegation import Delegation as Delegation from opal_security.models.deny_request_request import DenyRequestRequest as DenyRequestRequest +from opal_security.models.entity_admin_filter import EntityAdminFilter as EntityAdminFilter +from opal_security.models.entity_description_filter import EntityDescriptionFilter as EntityDescriptionFilter from opal_security.models.entity_item_type_enum import EntityItemTypeEnum as EntityItemTypeEnum from opal_security.models.entity_name_filter import EntityNameFilter as EntityNameFilter from opal_security.models.entity_tag_filter import EntityTagFilter as EntityTagFilter +from opal_security.models.entity_tag_key_filter import EntityTagKeyFilter as EntityTagKeyFilter from opal_security.models.entity_type_enum import EntityTypeEnum as EntityTypeEnum +from opal_security.models.escalate_request200_response import EscalateRequest200Response as EscalateRequest200Response from opal_security.models.event import Event as Event from opal_security.models.event_stream import EventStream as EventStream from opal_security.models.event_stream_connection import EventStreamConnection as EventStreamConnection @@ -450,19 +710,35 @@ from opal_security.models.get_resource_user200_response import GetResourceUser200Response as GetResourceUser200Response from opal_security.models.group import Group as Group from opal_security.models.group_access_level import GroupAccessLevel as GroupAccessLevel +from opal_security.models.group_access_level_list import GroupAccessLevelList as GroupAccessLevelList from opal_security.models.group_binding import GroupBinding as GroupBinding from opal_security.models.group_binding_group import GroupBindingGroup as GroupBindingGroup +from opal_security.models.group_configuration_template import GroupConfigurationTemplate as GroupConfigurationTemplate from opal_security.models.group_containing_group import GroupContainingGroup as GroupContainingGroup from opal_security.models.group_containing_group_list import GroupContainingGroupList as GroupContainingGroupList +from opal_security.models.group_member_group import GroupMemberGroup as GroupMemberGroup +from opal_security.models.group_member_group_list import GroupMemberGroupList as GroupMemberGroupList from opal_security.models.group_remote_info import GroupRemoteInfo as GroupRemoteInfo from opal_security.models.group_remote_info_active_directory_group import GroupRemoteInfoActiveDirectoryGroup as GroupRemoteInfoActiveDirectoryGroup +from opal_security.models.group_remote_info_activecampaign_group import GroupRemoteInfoActivecampaignGroup as GroupRemoteInfoActivecampaignGroup +from opal_security.models.group_remote_info_aha_team import GroupRemoteInfoAhaTeam as GroupRemoteInfoAhaTeam +from opal_security.models.group_remote_info_asana_team import GroupRemoteInfoAsanaTeam as GroupRemoteInfoAsanaTeam from opal_security.models.group_remote_info_aws_sso_group import GroupRemoteInfoAwsSsoGroup as GroupRemoteInfoAwsSsoGroup +from opal_security.models.group_remote_info_axiom_group import GroupRemoteInfoAxiomGroup as GroupRemoteInfoAxiomGroup from opal_security.models.group_remote_info_azure_ad_microsoft365_group import GroupRemoteInfoAzureAdMicrosoft365Group as GroupRemoteInfoAzureAdMicrosoft365Group from opal_security.models.group_remote_info_azure_ad_security_group import GroupRemoteInfoAzureAdSecurityGroup as GroupRemoteInfoAzureAdSecurityGroup +from opal_security.models.group_remote_info_bitwarden_group import GroupRemoteInfoBitwardenGroup as GroupRemoteInfoBitwardenGroup +from opal_security.models.group_remote_info_box_group import GroupRemoteInfoBoxGroup as GroupRemoteInfoBoxGroup +from opal_security.models.group_remote_info_calendly_group import GroupRemoteInfoCalendlyGroup as GroupRemoteInfoCalendlyGroup from opal_security.models.group_remote_info_clickhouse_role import GroupRemoteInfoClickhouseRole as GroupRemoteInfoClickhouseRole +from opal_security.models.group_remote_info_confluence_group import GroupRemoteInfoConfluenceGroup as GroupRemoteInfoConfluenceGroup from opal_security.models.group_remote_info_connector_group import GroupRemoteInfoConnectorGroup as GroupRemoteInfoConnectorGroup +from opal_security.models.group_remote_info_cursor_group import GroupRemoteInfoCursorGroup as GroupRemoteInfoCursorGroup from opal_security.models.group_remote_info_databricks_account_group import GroupRemoteInfoDatabricksAccountGroup as GroupRemoteInfoDatabricksAccountGroup +from opal_security.models.group_remote_info_datadog_on_call_schedule import GroupRemoteInfoDatadogOnCallSchedule as GroupRemoteInfoDatadogOnCallSchedule from opal_security.models.group_remote_info_devin_group import GroupRemoteInfoDevinGroup as GroupRemoteInfoDevinGroup +from opal_security.models.group_remote_info_docusign_group import GroupRemoteInfoDocusignGroup as GroupRemoteInfoDocusignGroup +from opal_security.models.group_remote_info_docusign_signing_group import GroupRemoteInfoDocusignSigningGroup as GroupRemoteInfoDocusignSigningGroup from opal_security.models.group_remote_info_duo_group import GroupRemoteInfoDuoGroup as GroupRemoteInfoDuoGroup from opal_security.models.group_remote_info_github_enterprise_team import GroupRemoteInfoGithubEnterpriseTeam as GroupRemoteInfoGithubEnterpriseTeam from opal_security.models.group_remote_info_github_team import GroupRemoteInfoGithubTeam as GroupRemoteInfoGithubTeam @@ -471,19 +747,32 @@ from opal_security.models.group_remote_info_grafana_team import GroupRemoteInfoGrafanaTeam as GroupRemoteInfoGrafanaTeam from opal_security.models.group_remote_info_hubspot_team import GroupRemoteInfoHubspotTeam as GroupRemoteInfoHubspotTeam from opal_security.models.group_remote_info_incidentio_on_call_schedule import GroupRemoteInfoIncidentioOnCallSchedule as GroupRemoteInfoIncidentioOnCallSchedule +from opal_security.models.group_remote_info_jira_group import GroupRemoteInfoJiraGroup as GroupRemoteInfoJiraGroup from opal_security.models.group_remote_info_ldap_group import GroupRemoteInfoLdapGroup as GroupRemoteInfoLdapGroup +from opal_security.models.group_remote_info_linear_team import GroupRemoteInfoLinearTeam as GroupRemoteInfoLinearTeam from opal_security.models.group_remote_info_okta_group import GroupRemoteInfoOktaGroup as GroupRemoteInfoOktaGroup from opal_security.models.group_remote_info_okta_group_rule import GroupRemoteInfoOktaGroupRule as GroupRemoteInfoOktaGroupRule +from opal_security.models.group_remote_info_onelogin_group import GroupRemoteInfoOneloginGroup as GroupRemoteInfoOneloginGroup +from opal_security.models.group_remote_info_onelogin_role import GroupRemoteInfoOneloginRole as GroupRemoteInfoOneloginRole from opal_security.models.group_remote_info_pagerduty_on_call_schedule import GroupRemoteInfoPagerdutyOnCallSchedule as GroupRemoteInfoPagerdutyOnCallSchedule +from opal_security.models.group_remote_info_ramp_department import GroupRemoteInfoRampDepartment as GroupRemoteInfoRampDepartment +from opal_security.models.group_remote_info_ramp_location import GroupRemoteInfoRampLocation as GroupRemoteInfoRampLocation +from opal_security.models.group_remote_info_rippling_supergroup import GroupRemoteInfoRipplingSupergroup as GroupRemoteInfoRipplingSupergroup +from opal_security.models.group_remote_info_rippling_team import GroupRemoteInfoRipplingTeam as GroupRemoteInfoRipplingTeam from opal_security.models.group_remote_info_rootly_on_call_schedule import GroupRemoteInfoRootlyOnCallSchedule as GroupRemoteInfoRootlyOnCallSchedule from opal_security.models.group_remote_info_slack_user_group import GroupRemoteInfoSlackUserGroup as GroupRemoteInfoSlackUserGroup from opal_security.models.group_remote_info_snowflake_role import GroupRemoteInfoSnowflakeRole as GroupRemoteInfoSnowflakeRole +from opal_security.models.group_remote_info_square_job import GroupRemoteInfoSquareJob as GroupRemoteInfoSquareJob +from opal_security.models.group_remote_info_square_location import GroupRemoteInfoSquareLocation as GroupRemoteInfoSquareLocation +from opal_security.models.group_remote_info_tableau_group import GroupRemoteInfoTableauGroup as GroupRemoteInfoTableauGroup from opal_security.models.group_remote_info_tailscale_group import GroupRemoteInfoTailscaleGroup as GroupRemoteInfoTailscaleGroup from opal_security.models.group_remote_info_twingate_group import GroupRemoteInfoTwingateGroup as GroupRemoteInfoTwingateGroup from opal_security.models.group_remote_info_twingate_group_synced import GroupRemoteInfoTwingateGroupSynced as GroupRemoteInfoTwingateGroupSynced from opal_security.models.group_remote_info_workday_user_security_group import GroupRemoteInfoWorkdayUserSecurityGroup as GroupRemoteInfoWorkdayUserSecurityGroup +from opal_security.models.group_remote_info_wrike_group import GroupRemoteInfoWrikeGroup as GroupRemoteInfoWrikeGroup from opal_security.models.group_remote_info_zendesk_group import GroupRemoteInfoZendeskGroup as GroupRemoteInfoZendeskGroup from opal_security.models.group_remote_info_zendesk_organization import GroupRemoteInfoZendeskOrganization as GroupRemoteInfoZendeskOrganization +from opal_security.models.group_remote_info_zoom_group import GroupRemoteInfoZoomGroup as GroupRemoteInfoZoomGroup from opal_security.models.group_resource import GroupResource as GroupResource from opal_security.models.group_resource_list import GroupResourceList as GroupResourceList from opal_security.models.group_type_enum import GroupTypeEnum as GroupTypeEnum @@ -492,19 +781,41 @@ from opal_security.models.group_with_access_level import GroupWithAccessLevel as GroupWithAccessLevel from opal_security.models.idp_group_mapping import IdpGroupMapping as IdpGroupMapping from opal_security.models.idp_group_mapping_list import IdpGroupMappingList as IdpGroupMappingList +from opal_security.models.idp_status_filter import IdpStatusFilter as IdpStatusFilter +from opal_security.models.invite_user_info import InviteUserInfo as InviteUserInfo +from opal_security.models.mcp_config_permission import McpConfigPermission as McpConfigPermission +from opal_security.models.mcp_config_plugin import McpConfigPlugin as McpConfigPlugin +from opal_security.models.mcp_config_report import McpConfigReport as McpConfigReport +from opal_security.models.mcp_config_report_result import McpConfigReportResult as McpConfigReportResult +from opal_security.models.mcp_config_reporter import McpConfigReporter as McpConfigReporter +from opal_security.models.mcp_config_server import McpConfigServer as McpConfigServer +from opal_security.models.mcp_config_skill import McpConfigSkill as McpConfigSkill +from opal_security.models.mcp_config_subagent import McpConfigSubagent as McpConfigSubagent from opal_security.models.message_channel import MessageChannel as MessageChannel from opal_security.models.message_channel_id_list import MessageChannelIDList as MessageChannelIDList from opal_security.models.message_channel_list import MessageChannelList as MessageChannelList from opal_security.models.message_channel_provider_enum import MessageChannelProviderEnum as MessageChannelProviderEnum +from opal_security.models.name_match_type import NameMatchType as NameMatchType from opal_security.models.on_call_schedule import OnCallSchedule as OnCallSchedule from opal_security.models.on_call_schedule_id_list import OnCallScheduleIDList as OnCallScheduleIDList from opal_security.models.on_call_schedule_list import OnCallScheduleList as OnCallScheduleList from opal_security.models.on_call_schedule_provider_enum import OnCallScheduleProviderEnum as OnCallScheduleProviderEnum +from opal_security.models.opal_access_path_detail import OpalAccessPathDetail as OpalAccessPathDetail +from opal_security.models.opal_access_path_edge_filter import OpalAccessPathEdgeFilter as OpalAccessPathEdgeFilter +from opal_security.models.opal_access_path_query_body import OpalAccessPathQueryBody as OpalAccessPathQueryBody +from opal_security.models.opal_access_query import OpalAccessQuery as OpalAccessQuery +from opal_security.models.opal_access_query_results import OpalAccessQueryResults as OpalAccessQueryResults +from opal_security.models.opal_access_result_edge import OpalAccessResultEdge as OpalAccessResultEdge +from opal_security.models.opal_access_result_node import OpalAccessResultNode as OpalAccessResultNode from opal_security.models.opal_node_query import OpalNodeQuery as OpalNodeQuery from opal_security.models.opal_node_query_body import OpalNodeQueryBody as OpalNodeQueryBody from opal_security.models.opal_node_query_results import OpalNodeQueryResults as OpalNodeQueryResults from opal_security.models.opal_query_result_edge import OpalQueryResultEdge as OpalQueryResultEdge from opal_security.models.opal_query_result_node import OpalQueryResultNode as OpalQueryResultNode +from opal_security.models.opal_query_results import OpalQueryResults as OpalQueryResults +from opal_security.models.opal_script import OpalScript as OpalScript +from opal_security.models.opal_script_list import OpalScriptList as OpalScriptList +from opal_security.models.opal_script_type_enum import OpalScriptTypeEnum as OpalScriptTypeEnum from opal_security.models.owner import Owner as Owner from opal_security.models.page_info import PageInfo as PageInfo from opal_security.models.paginated_access_rules_list import PaginatedAccessRulesList as PaginatedAccessRulesList @@ -512,6 +823,8 @@ from opal_security.models.paginated_bundle_group_list import PaginatedBundleGroupList as PaginatedBundleGroupList from opal_security.models.paginated_bundle_list import PaginatedBundleList as PaginatedBundleList from opal_security.models.paginated_bundle_resource_list import PaginatedBundleResourceList as PaginatedBundleResourceList +from opal_security.models.paginated_campaign_items_list import PaginatedCampaignItemsList as PaginatedCampaignItemsList +from opal_security.models.paginated_campaigns_list import PaginatedCampaignsList as PaginatedCampaignsList from opal_security.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList as PaginatedConfigurationTemplateList from opal_security.models.paginated_delegations_list import PaginatedDelegationsList as PaginatedDelegationsList from opal_security.models.paginated_event_list import PaginatedEventList as PaginatedEventList @@ -519,15 +832,29 @@ from opal_security.models.paginated_groups_list import PaginatedGroupsList as PaginatedGroupsList from opal_security.models.paginated_owners_list import PaginatedOwnersList as PaginatedOwnersList from opal_security.models.paginated_remote_users_list import PaginatedRemoteUsersList as PaginatedRemoteUsersList +from opal_security.models.paginated_request_template_list import PaginatedRequestTemplateList as PaginatedRequestTemplateList from opal_security.models.paginated_resources_list import PaginatedResourcesList as PaginatedResourcesList +from opal_security.models.paginated_role_assignments_list import PaginatedRoleAssignmentsList as PaginatedRoleAssignmentsList from opal_security.models.paginated_tags_list import PaginatedTagsList as PaginatedTagsList from opal_security.models.paginated_tokens_list import PaginatedTokensList as PaginatedTokensList from opal_security.models.paginated_uars_list import PaginatedUARsList as PaginatedUARsList from opal_security.models.paginated_users_list import PaginatedUsersList as PaginatedUsersList +from opal_security.models.paginated_viewer_campaign_items_list import PaginatedViewerCampaignItemsList as PaginatedViewerCampaignItemsList +from opal_security.models.paladin import Paladin as Paladin +from opal_security.models.paladin_connector import PaladinConnector as PaladinConnector +from opal_security.models.paladin_context_source import PaladinContextSource as PaladinContextSource +from opal_security.models.paladin_context_source_kind import PaladinContextSourceKind as PaladinContextSourceKind +from opal_security.models.paladin_context_source_list import PaladinContextSourceList as PaladinContextSourceList +from opal_security.models.paladin_context_source_provider import PaladinContextSourceProvider as PaladinContextSourceProvider +from opal_security.models.paladin_list import PaladinList as PaladinList from opal_security.models.propagation_status import PropagationStatus as PropagationStatus from opal_security.models.propagation_status_enum import PropagationStatusEnum as PropagationStatusEnum from opal_security.models.rds_engine_enum import RDSEngineEnum as RDSEngineEnum from opal_security.models.remote_user import RemoteUser as RemoteUser +from opal_security.models.remove_role_assignment_input import RemoveRoleAssignmentInput as RemoveRoleAssignmentInput +from opal_security.models.remove_role_assignments_entry import RemoveRoleAssignmentsEntry as RemoveRoleAssignmentsEntry +from opal_security.models.remove_role_assignments_request import RemoveRoleAssignmentsRequest as RemoveRoleAssignmentsRequest +from opal_security.models.remove_role_assignments_response import RemoveRoleAssignmentsResponse as RemoveRoleAssignmentsResponse from opal_security.models.request import Request as Request from opal_security.models.request_approval_enum import RequestApprovalEnum as RequestApprovalEnum from opal_security.models.request_comment import RequestComment as RequestComment @@ -543,15 +870,28 @@ from opal_security.models.request_reviewer_stages import RequestReviewerStages as RequestReviewerStages from opal_security.models.request_stage import RequestStage as RequestStage from opal_security.models.request_status_enum import RequestStatusEnum as RequestStatusEnum +from opal_security.models.request_template import RequestTemplate as RequestTemplate +from opal_security.models.request_template_custom_field import RequestTemplateCustomField as RequestTemplateCustomField +from opal_security.models.request_template_custom_field_callout_metadata import RequestTemplateCustomFieldCalloutMetadata as RequestTemplateCustomFieldCalloutMetadata +from opal_security.models.request_template_custom_field_input import RequestTemplateCustomFieldInput as RequestTemplateCustomFieldInput +from opal_security.models.request_template_custom_field_metadata import RequestTemplateCustomFieldMetadata as RequestTemplateCustomFieldMetadata +from opal_security.models.request_template_custom_field_multi_choice_metadata import RequestTemplateCustomFieldMultiChoiceMetadata as RequestTemplateCustomFieldMultiChoiceMetadata from opal_security.models.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum as RequestTemplateCustomFieldTypeEnum from opal_security.models.requested_item import RequestedItem as RequestedItem from opal_security.models.resource import Resource as Resource from opal_security.models.resource_access_level import ResourceAccessLevel as ResourceAccessLevel +from opal_security.models.resource_access_level_list import ResourceAccessLevelList as ResourceAccessLevelList from opal_security.models.resource_access_user import ResourceAccessUser as ResourceAccessUser from opal_security.models.resource_access_user_list import ResourceAccessUserList as ResourceAccessUserList +from opal_security.models.resource_configuration_template import ResourceConfigurationTemplate as ResourceConfigurationTemplate +from opal_security.models.resource_custom_access_level_list import ResourceCustomAccessLevelList as ResourceCustomAccessLevelList +from opal_security.models.resource_custom_access_level_response import ResourceCustomAccessLevelResponse as ResourceCustomAccessLevelResponse from opal_security.models.resource_nhi import ResourceNHI as ResourceNHI from opal_security.models.resource_remote_info import ResourceRemoteInfo as ResourceRemoteInfo +from opal_security.models.resource_remote_info_alicloud_ecs_instance import ResourceRemoteInfoAlicloudEcsInstance as ResourceRemoteInfoAlicloudEcsInstance +from opal_security.models.resource_remote_info_alicloud_ram_role import ResourceRemoteInfoAlicloudRamRole as ResourceRemoteInfoAlicloudRamRole from opal_security.models.resource_remote_info_anthropic_workspace import ResourceRemoteInfoAnthropicWorkspace as ResourceRemoteInfoAnthropicWorkspace +from opal_security.models.resource_remote_info_asana_workspace import ResourceRemoteInfoAsanaWorkspace as ResourceRemoteInfoAsanaWorkspace from opal_security.models.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount as ResourceRemoteInfoAwsAccount from opal_security.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance as ResourceRemoteInfoAwsEc2Instance from opal_security.models.resource_remote_info_aws_eks_cluster import ResourceRemoteInfoAwsEksCluster as ResourceRemoteInfoAwsEksCluster @@ -560,6 +900,8 @@ from opal_security.models.resource_remote_info_aws_permission_set import ResourceRemoteInfoAwsPermissionSet as ResourceRemoteInfoAwsPermissionSet from opal_security.models.resource_remote_info_aws_rds_cluster import ResourceRemoteInfoAwsRdsCluster as ResourceRemoteInfoAwsRdsCluster from opal_security.models.resource_remote_info_aws_rds_instance import ResourceRemoteInfoAwsRdsInstance as ResourceRemoteInfoAwsRdsInstance +from opal_security.models.resource_remote_info_axiom_custom_role import ResourceRemoteInfoAxiomCustomRole as ResourceRemoteInfoAxiomCustomRole +from opal_security.models.resource_remote_info_axiom_role import ResourceRemoteInfoAxiomRole as ResourceRemoteInfoAxiomRole from opal_security.models.resource_remote_info_azure_enterprise_app import ResourceRemoteInfoAzureEnterpriseApp as ResourceRemoteInfoAzureEnterpriseApp from opal_security.models.resource_remote_info_azure_entra_id_role import ResourceRemoteInfoAzureEntraIdRole as ResourceRemoteInfoAzureEntraIdRole from opal_security.models.resource_remote_info_azure_management_group import ResourceRemoteInfoAzureManagementGroup as ResourceRemoteInfoAzureManagementGroup @@ -573,18 +915,33 @@ from opal_security.models.resource_remote_info_azure_subscription import ResourceRemoteInfoAzureSubscription as ResourceRemoteInfoAzureSubscription from opal_security.models.resource_remote_info_azure_user_assigned_managed_identity import ResourceRemoteInfoAzureUserAssignedManagedIdentity as ResourceRemoteInfoAzureUserAssignedManagedIdentity from opal_security.models.resource_remote_info_azure_virtual_machine import ResourceRemoteInfoAzureVirtualMachine as ResourceRemoteInfoAzureVirtualMachine +from opal_security.models.resource_remote_info_bitwarden_organization import ResourceRemoteInfoBitwardenOrganization as ResourceRemoteInfoBitwardenOrganization +from opal_security.models.resource_remote_info_box_enterprise import ResourceRemoteInfoBoxEnterprise as ResourceRemoteInfoBoxEnterprise +from opal_security.models.resource_remote_info_box_folder import ResourceRemoteInfoBoxFolder as ResourceRemoteInfoBoxFolder +from opal_security.models.resource_remote_info_calendly_event_type import ResourceRemoteInfoCalendlyEventType as ResourceRemoteInfoCalendlyEventType +from opal_security.models.resource_remote_info_calendly_role import ResourceRemoteInfoCalendlyRole as ResourceRemoteInfoCalendlyRole +from opal_security.models.resource_remote_info_clickhouse_console_role import ResourceRemoteInfoClickhouseConsoleRole as ResourceRemoteInfoClickhouseConsoleRole from opal_security.models.resource_remote_info_clickhouse_database import ResourceRemoteInfoClickhouseDatabase as ResourceRemoteInfoClickhouseDatabase from opal_security.models.resource_remote_info_clickhouse_table import ResourceRemoteInfoClickhouseTable as ResourceRemoteInfoClickhouseTable from opal_security.models.resource_remote_info_coupa_role import ResourceRemoteInfoCoupaRole as ResourceRemoteInfoCoupaRole from opal_security.models.resource_remote_info_cursor_organization import ResourceRemoteInfoCursorOrganization as ResourceRemoteInfoCursorOrganization +from opal_security.models.resource_remote_info_cursor_origin_repository import ResourceRemoteInfoCursorOriginRepository as ResourceRemoteInfoCursorOriginRepository from opal_security.models.resource_remote_info_custom_connector import ResourceRemoteInfoCustomConnector as ResourceRemoteInfoCustomConnector from opal_security.models.resource_remote_info_databricks_account_service_principal import ResourceRemoteInfoDatabricksAccountServicePrincipal as ResourceRemoteInfoDatabricksAccountServicePrincipal +from opal_security.models.resource_remote_info_databricks_catalog import ResourceRemoteInfoDatabricksCatalog as ResourceRemoteInfoDatabricksCatalog +from opal_security.models.resource_remote_info_databricks_function import ResourceRemoteInfoDatabricksFunction as ResourceRemoteInfoDatabricksFunction +from opal_security.models.resource_remote_info_databricks_model import ResourceRemoteInfoDatabricksModel as ResourceRemoteInfoDatabricksModel +from opal_security.models.resource_remote_info_databricks_schema import ResourceRemoteInfoDatabricksSchema as ResourceRemoteInfoDatabricksSchema +from opal_security.models.resource_remote_info_databricks_service import ResourceRemoteInfoDatabricksService as ResourceRemoteInfoDatabricksService +from opal_security.models.resource_remote_info_databricks_volume import ResourceRemoteInfoDatabricksVolume as ResourceRemoteInfoDatabricksVolume from opal_security.models.resource_remote_info_datadog_role import ResourceRemoteInfoDatadogRole as ResourceRemoteInfoDatadogRole from opal_security.models.resource_remote_info_datastax_astra_role import ResourceRemoteInfoDatastaxAstraRole as ResourceRemoteInfoDatastaxAstraRole from opal_security.models.resource_remote_info_devin_organization import ResourceRemoteInfoDevinOrganization as ResourceRemoteInfoDevinOrganization from opal_security.models.resource_remote_info_devin_role import ResourceRemoteInfoDevinRole as ResourceRemoteInfoDevinRole +from opal_security.models.resource_remote_info_docusign_permission_profile import ResourceRemoteInfoDocusignPermissionProfile as ResourceRemoteInfoDocusignPermissionProfile from opal_security.models.resource_remote_info_gcp_big_query_dataset import ResourceRemoteInfoGcpBigQueryDataset as ResourceRemoteInfoGcpBigQueryDataset from opal_security.models.resource_remote_info_gcp_big_query_table import ResourceRemoteInfoGcpBigQueryTable as ResourceRemoteInfoGcpBigQueryTable +from opal_security.models.resource_remote_info_gcp_billing_account import ResourceRemoteInfoGcpBillingAccount as ResourceRemoteInfoGcpBillingAccount from opal_security.models.resource_remote_info_gcp_bucket import ResourceRemoteInfoGcpBucket as ResourceRemoteInfoGcpBucket from opal_security.models.resource_remote_info_gcp_compute_instance import ResourceRemoteInfoGcpComputeInstance as ResourceRemoteInfoGcpComputeInstance from opal_security.models.resource_remote_info_gcp_folder import ResourceRemoteInfoGcpFolder as ResourceRemoteInfoGcpFolder @@ -604,44 +961,69 @@ from opal_security.models.resource_remote_info_grafana_role import ResourceRemoteInfoGrafanaRole as ResourceRemoteInfoGrafanaRole from opal_security.models.resource_remote_info_hubspot_role import ResourceRemoteInfoHubspotRole as ResourceRemoteInfoHubspotRole from opal_security.models.resource_remote_info_ilevel_advanced_role import ResourceRemoteInfoIlevelAdvancedRole as ResourceRemoteInfoIlevelAdvancedRole +from opal_security.models.resource_remote_info_linear_organization import ResourceRemoteInfoLinearOrganization as ResourceRemoteInfoLinearOrganization +from opal_security.models.resource_remote_info_linear_project import ResourceRemoteInfoLinearProject as ResourceRemoteInfoLinearProject from opal_security.models.resource_remote_info_netsuite_role import ResourceRemoteInfoNetsuiteRole as ResourceRemoteInfoNetsuiteRole from opal_security.models.resource_remote_info_okta_app import ResourceRemoteInfoOktaApp as ResourceRemoteInfoOktaApp from opal_security.models.resource_remote_info_okta_custom_role import ResourceRemoteInfoOktaCustomRole as ResourceRemoteInfoOktaCustomRole from opal_security.models.resource_remote_info_okta_standard_role import ResourceRemoteInfoOktaStandardRole as ResourceRemoteInfoOktaStandardRole +from opal_security.models.resource_remote_info_onelogin_app import ResourceRemoteInfoOneloginApp as ResourceRemoteInfoOneloginApp from opal_security.models.resource_remote_info_openai_platform_project import ResourceRemoteInfoOpenaiPlatformProject as ResourceRemoteInfoOpenaiPlatformProject from opal_security.models.resource_remote_info_openai_platform_service_account import ResourceRemoteInfoOpenaiPlatformServiceAccount as ResourceRemoteInfoOpenaiPlatformServiceAccount from opal_security.models.resource_remote_info_oracle_fusion_role import ResourceRemoteInfoOracleFusionRole as ResourceRemoteInfoOracleFusionRole from opal_security.models.resource_remote_info_pagerduty_role import ResourceRemoteInfoPagerdutyRole as ResourceRemoteInfoPagerdutyRole +from opal_security.models.resource_remote_info_ramp_fund import ResourceRemoteInfoRampFund as ResourceRemoteInfoRampFund +from opal_security.models.resource_remote_info_ramp_role import ResourceRemoteInfoRampRole as ResourceRemoteInfoRampRole +from opal_security.models.resource_remote_info_rippling_department import ResourceRemoteInfoRipplingDepartment as ResourceRemoteInfoRipplingDepartment from opal_security.models.resource_remote_info_salesforce_permission_set import ResourceRemoteInfoSalesforcePermissionSet as ResourceRemoteInfoSalesforcePermissionSet from opal_security.models.resource_remote_info_salesforce_profile import ResourceRemoteInfoSalesforceProfile as ResourceRemoteInfoSalesforceProfile from opal_security.models.resource_remote_info_salesforce_role import ResourceRemoteInfoSalesforceRole as ResourceRemoteInfoSalesforceRole +from opal_security.models.resource_remote_info_slack_organization import ResourceRemoteInfoSlackOrganization as ResourceRemoteInfoSlackOrganization +from opal_security.models.resource_remote_info_slack_workspace import ResourceRemoteInfoSlackWorkspace as ResourceRemoteInfoSlackWorkspace from opal_security.models.resource_remote_info_snowflake_database import ResourceRemoteInfoSnowflakeDatabase as ResourceRemoteInfoSnowflakeDatabase from opal_security.models.resource_remote_info_snowflake_schema import ResourceRemoteInfoSnowflakeSchema as ResourceRemoteInfoSnowflakeSchema from opal_security.models.resource_remote_info_snowflake_table import ResourceRemoteInfoSnowflakeTable as ResourceRemoteInfoSnowflakeTable from opal_security.models.resource_remote_info_tailscale_ssh import ResourceRemoteInfoTailscaleSsh as ResourceRemoteInfoTailscaleSsh from opal_security.models.resource_remote_info_teleport_role import ResourceRemoteInfoTeleportRole as ResourceRemoteInfoTeleportRole +from opal_security.models.resource_remote_info_tray_organization import ResourceRemoteInfoTrayOrganization as ResourceRemoteInfoTrayOrganization +from opal_security.models.resource_remote_info_tray_workspace import ResourceRemoteInfoTrayWorkspace as ResourceRemoteInfoTrayWorkspace from opal_security.models.resource_remote_info_twingate_resource import ResourceRemoteInfoTwingateResource as ResourceRemoteInfoTwingateResource +from opal_security.models.resource_remote_info_vercel_project import ResourceRemoteInfoVercelProject as ResourceRemoteInfoVercelProject +from opal_security.models.resource_remote_info_vercel_role import ResourceRemoteInfoVercelRole as ResourceRemoteInfoVercelRole from opal_security.models.resource_remote_info_workday_role import ResourceRemoteInfoWorkdayRole as ResourceRemoteInfoWorkdayRole +from opal_security.models.resource_remote_info_wrike_user_type import ResourceRemoteInfoWrikeUserType as ResourceRemoteInfoWrikeUserType from opal_security.models.resource_remote_info_zendesk_role import ResourceRemoteInfoZendeskRole as ResourceRemoteInfoZendeskRole +from opal_security.models.resource_remote_info_zoom_license import ResourceRemoteInfoZoomLicense as ResourceRemoteInfoZoomLicense +from opal_security.models.resource_remote_info_zoom_role import ResourceRemoteInfoZoomRole as ResourceRemoteInfoZoomRole from opal_security.models.resource_type_enum import ResourceTypeEnum as ResourceTypeEnum from opal_security.models.resource_user import ResourceUser as ResourceUser from opal_security.models.resource_user_access_status import ResourceUserAccessStatus as ResourceUserAccessStatus from opal_security.models.resource_user_access_status_enum import ResourceUserAccessStatusEnum as ResourceUserAccessStatusEnum from opal_security.models.resource_with_access_level import ResourceWithAccessLevel as ResourceWithAccessLevel +from opal_security.models.review_campaign_item_decision_info import ReviewCampaignItemDecisionInfo as ReviewCampaignItemDecisionInfo +from opal_security.models.review_campaign_items_info import ReviewCampaignItemsInfo as ReviewCampaignItemsInfo +from opal_security.models.review_campaign_items_response import ReviewCampaignItemsResponse as ReviewCampaignItemsResponse from opal_security.models.review_stage_operator import ReviewStageOperator as ReviewStageOperator from opal_security.models.reviewer_id_list import ReviewerIDList as ReviewerIDList from opal_security.models.reviewer_stage import ReviewerStage as ReviewerStage +from opal_security.models.reviewer_stage_escalation import ReviewerStageEscalation as ReviewerStageEscalation from opal_security.models.reviewer_stage_list import ReviewerStageList as ReviewerStageList from opal_security.models.risk_sensitivity_enum import RiskSensitivityEnum as RiskSensitivityEnum +from opal_security.models.role_assignment import RoleAssignment as RoleAssignment +from opal_security.models.role_assignment_entity_type_enum import RoleAssignmentEntityTypeEnum as RoleAssignmentEntityTypeEnum from opal_security.models.role_permission_name_enum import RolePermissionNameEnum as RolePermissionNameEnum from opal_security.models.role_permission_target_type_enum import RolePermissionTargetTypeEnum as RolePermissionTargetTypeEnum from opal_security.models.rule_clauses import RuleClauses as RuleClauses from opal_security.models.rule_conjunction import RuleConjunction as RuleConjunction from opal_security.models.rule_disjunction import RuleDisjunction as RuleDisjunction +from opal_security.models.run_opal_query_request import RunOpalQueryRequest as RunOpalQueryRequest from opal_security.models.scoped_role_permission import ScopedRolePermission as ScopedRolePermission from opal_security.models.scoped_role_permission_list import ScopedRolePermissionList as ScopedRolePermissionList from opal_security.models.session import Session as Session from opal_security.models.sessions_list import SessionsList as SessionsList +from opal_security.models.set_agent_kill_switch_request import SetAgentKillSwitchRequest as SetAgentKillSwitchRequest +from opal_security.models.sort_direction_enum import SortDirectionEnum as SortDirectionEnum +from opal_security.models.stop_campaign_request import StopCampaignRequest as StopCampaignRequest from opal_security.models.string_match_type import StringMatchType as StringMatchType from opal_security.models.sub_event import SubEvent as SubEvent from opal_security.models.sync_error import SyncError as SyncError @@ -659,7 +1041,13 @@ from opal_security.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum as UARReviewerAssignmentPolicyEnum from opal_security.models.uar_scope import UARScope as UARScope from opal_security.models.update_access_rule_info import UpdateAccessRuleInfo as UpdateAccessRuleInfo +from opal_security.models.update_app_info import UpdateAppInfo as UpdateAppInfo +from opal_security.models.update_campaign_configuration_info import UpdateCampaignConfigurationInfo as UpdateCampaignConfigurationInfo +from opal_security.models.update_campaign_info import UpdateCampaignInfo as UpdateCampaignInfo +from opal_security.models.update_campaign_item_reviewers_info import UpdateCampaignItemReviewersInfo as UpdateCampaignItemReviewersInfo +from opal_security.models.update_campaign_item_reviewers_result import UpdateCampaignItemReviewersResult as UpdateCampaignItemReviewersResult from opal_security.models.update_configuration_template_info import UpdateConfigurationTemplateInfo as UpdateConfigurationTemplateInfo +from opal_security.models.update_custom_connector_info import UpdateCustomConnectorInfo as UpdateCustomConnectorInfo from opal_security.models.update_event_stream_info import UpdateEventStreamInfo as UpdateEventStreamInfo from opal_security.models.update_group_binding_info import UpdateGroupBindingInfo as UpdateGroupBindingInfo from opal_security.models.update_group_binding_info_list import UpdateGroupBindingInfoList as UpdateGroupBindingInfoList @@ -669,16 +1057,30 @@ from opal_security.models.update_group_user_request import UpdateGroupUserRequest as UpdateGroupUserRequest from opal_security.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest as UpdateIdpGroupMappingsRequest from opal_security.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner as UpdateIdpGroupMappingsRequestMappingsInner +from opal_security.models.update_opal_script_info import UpdateOpalScriptInfo as UpdateOpalScriptInfo from opal_security.models.update_owner_info import UpdateOwnerInfo as UpdateOwnerInfo from opal_security.models.update_owner_info_list import UpdateOwnerInfoList as UpdateOwnerInfoList +from opal_security.models.update_paladin_info import UpdatePaladinInfo as UpdatePaladinInfo +from opal_security.models.update_request_template_info import UpdateRequestTemplateInfo as UpdateRequestTemplateInfo +from opal_security.models.update_resource_custom_access_level_info import UpdateResourceCustomAccessLevelInfo as UpdateResourceCustomAccessLevelInfo from opal_security.models.update_resource_info import UpdateResourceInfo as UpdateResourceInfo from opal_security.models.update_resource_info_list import UpdateResourceInfoList as UpdateResourceInfoList from opal_security.models.update_resource_user_request import UpdateResourceUserRequest as UpdateResourceUserRequest +from opal_security.models.update_user_info import UpdateUserInfo as UpdateUserInfo from opal_security.models.user import User as User +from opal_security.models.user_access import UserAccess as UserAccess +from opal_security.models.user_access_entity_type_enum import UserAccessEntityTypeEnum as UserAccessEntityTypeEnum +from opal_security.models.user_access_level import UserAccessLevel as UserAccessLevel +from opal_security.models.user_access_list import UserAccessList as UserAccessList from opal_security.models.user_attribute_selector import UserAttributeSelector as UserAttributeSelector from opal_security.models.user_hr_idp_status_enum import UserHrIdpStatusEnum as UserHrIdpStatusEnum from opal_security.models.user_id_list import UserIDList as UserIDList from opal_security.models.user_list import UserList as UserList +from opal_security.models.user_product_role_enum import UserProductRoleEnum as UserProductRoleEnum +from opal_security.models.viewer_campaign_item import ViewerCampaignItem as ViewerCampaignItem +from opal_security.models.viewer_campaign_item_review_decision_enum import ViewerCampaignItemReviewDecisionEnum as ViewerCampaignItemReviewDecisionEnum +from opal_security.models.viewer_campaign_item_sort_field_enum import ViewerCampaignItemSortFieldEnum as ViewerCampaignItemSortFieldEnum +from opal_security.models.viewer_campaign_item_status_enum import ViewerCampaignItemStatusEnum as ViewerCampaignItemStatusEnum from opal_security.models.visibility_info import VisibilityInfo as VisibilityInfo from opal_security.models.visibility_type_enum import VisibilityTypeEnum as VisibilityTypeEnum from opal_security.models.webhook_api_key_credential import WebhookApiKeyCredential as WebhookApiKeyCredential diff --git a/opal_security/api/__init__.py b/opal_security/api/__init__.py index 27c0e8e..096392f 100644 --- a/opal_security/api/__init__.py +++ b/opal_security/api/__init__.py @@ -2,8 +2,10 @@ # import apis into api package from opal_security.api.access_rules_api import AccessRulesApi +from opal_security.api.agent_activity_api import AgentActivityApi from opal_security.api.apps_api import AppsApi from opal_security.api.bundles_api import BundlesApi +from opal_security.api.campaigns_api import CampaignsApi from opal_security.api.configuration_templates_api import ConfigurationTemplatesApi from opal_security.api.delegations_api import DelegationsApi from opal_security.api.event_streams_api import EventStreamsApi @@ -15,9 +17,14 @@ from opal_security.api.non_human_identities_api import NonHumanIdentitiesApi from opal_security.api.on_call_schedules_api import OnCallSchedulesApi from opal_security.api.opal_queries_api import OpalQueriesApi +from opal_security.api.opal_scripts_api import OpalScriptsApi from opal_security.api.owners_api import OwnersApi +from opal_security.api.paladin_api import PaladinApi +from opal_security.api.request_templates_api import RequestTemplatesApi from opal_security.api.requests_api import RequestsApi from opal_security.api.resources_api import ResourcesApi +from opal_security.api.role_assignments_api import RoleAssignmentsApi +from opal_security.api.service_users_api import ServiceUsersApi from opal_security.api.sessions_api import SessionsApi from opal_security.api.tags_api import TagsApi from opal_security.api.tokens_api import TokensApi diff --git a/opal_security/api/agent_activity_api.py b/opal_security/api/agent_activity_api.py new file mode 100644 index 0000000..8e61d96 --- /dev/null +++ b/opal_security/api/agent_activity_api.py @@ -0,0 +1,1743 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Any, Dict, Optional +from typing_extensions import Annotated +from opal_security.models.agent_activity_client_settings import AgentActivityClientSettings +from opal_security.models.agent_activity_ingest_request import AgentActivityIngestRequest +from opal_security.models.agent_activity_ingest_result import AgentActivityIngestResult +from opal_security.models.agent_kill_switch import AgentKillSwitch +from opal_security.models.anthropic_inference_hook_verdict import AnthropicInferenceHookVerdict +from opal_security.models.mcp_config_report import McpConfigReport +from opal_security.models.mcp_config_report_result import McpConfigReportResult +from opal_security.models.set_agent_kill_switch_request import SetAgentKillSwitchRequest + +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType + + +class AgentActivityApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def anthropic_inference_hook( + self, + request_body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AnthropicInferenceHookVerdict: + """Anthropic inference hook verdict + + **Prototype (AG-336).** The AI security server endpoint for Anthropic Inference hooks. Anthropic POSTs each governed frame here and waits for an allow or deny verdict. Configure it in claude.ai with this URL and a custom `Authorization: Bearer ` request header. `tool_call` frames are evaluated against the organization's runtime policy rules. One verdict covers every tool call in the frame. Every other frame type, including `prompt`, is allowed without inspection. Any non-200 response is a webhook failure, so the organization's Anthropic failure-handling setting decides the outcome. Once the organization saves its Anthropic signing secret in Opal, a `tool_call` frame must carry a valid Standard Webhooks signature (`webhook-id`, `webhook-timestamp`, `webhook-signature`), or it is answered with a 401. + + :param request_body: (required) + :type request_body: Dict[str, object] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._anthropic_inference_hook_serialize( + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AnthropicInferenceHookVerdict", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def anthropic_inference_hook_with_http_info( + self, + request_body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AnthropicInferenceHookVerdict]: + """Anthropic inference hook verdict + + **Prototype (AG-336).** The AI security server endpoint for Anthropic Inference hooks. Anthropic POSTs each governed frame here and waits for an allow or deny verdict. Configure it in claude.ai with this URL and a custom `Authorization: Bearer ` request header. `tool_call` frames are evaluated against the organization's runtime policy rules. One verdict covers every tool call in the frame. Every other frame type, including `prompt`, is allowed without inspection. Any non-200 response is a webhook failure, so the organization's Anthropic failure-handling setting decides the outcome. Once the organization saves its Anthropic signing secret in Opal, a `tool_call` frame must carry a valid Standard Webhooks signature (`webhook-id`, `webhook-timestamp`, `webhook-signature`), or it is answered with a 401. + + :param request_body: (required) + :type request_body: Dict[str, object] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._anthropic_inference_hook_serialize( + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AnthropicInferenceHookVerdict", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def anthropic_inference_hook_without_preload_content( + self, + request_body: Dict[str, Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Anthropic inference hook verdict + + **Prototype (AG-336).** The AI security server endpoint for Anthropic Inference hooks. Anthropic POSTs each governed frame here and waits for an allow or deny verdict. Configure it in claude.ai with this URL and a custom `Authorization: Bearer ` request header. `tool_call` frames are evaluated against the organization's runtime policy rules. One verdict covers every tool call in the frame. Every other frame type, including `prompt`, is allowed without inspection. Any non-200 response is a webhook failure, so the organization's Anthropic failure-handling setting decides the outcome. Once the organization saves its Anthropic signing secret in Opal, a `tool_call` frame must carry a valid Standard Webhooks signature (`webhook-id`, `webhook-timestamp`, `webhook-signature`), or it is answered with a 401. + + :param request_body: (required) + :type request_body: Dict[str, object] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._anthropic_inference_hook_serialize( + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AnthropicInferenceHookVerdict", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _anthropic_inference_hook_serialize( + self, + request_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if request_body is not None: + _body_params = request_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/inference-hooks/anthropic', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_agent_activity_client_settings( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentActivityClientSettings: + """Get agent activity client settings + + **Prototype.** Returns how a client that reports agent activity (today, the Claude Code hook kit on a developer's machine) should send batched events for this organization: the minimum gap between two sends from one machine, the most events and bytes one request to `/agent-activity` may carry, the request rate to stay under, and how long the answer may be cached. The rate is derived from the organization's own rate limit for `POST /agent-activity`, which every client in the organization shares: the clients that asked for these settings in the last cache period or two share half of it evenly, and the checks before tool calls keep the other half. A check before a tool call is not batched and should not be held back by this rate. A client is counted by its `X-Opal-Host` and `X-Opal-Actor` headers, so it should send the same ones it sends to `/agent-activity`. A client should ask for these at most once per `cache_seconds`, and keep using its last answer, or its own defaults, when it cannot get one. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_agent_activity_client_settings_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentActivityClientSettings", + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_agent_activity_client_settings_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentActivityClientSettings]: + """Get agent activity client settings + + **Prototype.** Returns how a client that reports agent activity (today, the Claude Code hook kit on a developer's machine) should send batched events for this organization: the minimum gap between two sends from one machine, the most events and bytes one request to `/agent-activity` may carry, the request rate to stay under, and how long the answer may be cached. The rate is derived from the organization's own rate limit for `POST /agent-activity`, which every client in the organization shares: the clients that asked for these settings in the last cache period or two share half of it evenly, and the checks before tool calls keep the other half. A check before a tool call is not batched and should not be held back by this rate. A client is counted by its `X-Opal-Host` and `X-Opal-Actor` headers, so it should send the same ones it sends to `/agent-activity`. A client should ask for these at most once per `cache_seconds`, and keep using its last answer, or its own defaults, when it cannot get one. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_agent_activity_client_settings_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentActivityClientSettings", + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_agent_activity_client_settings_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get agent activity client settings + + **Prototype.** Returns how a client that reports agent activity (today, the Claude Code hook kit on a developer's machine) should send batched events for this organization: the minimum gap between two sends from one machine, the most events and bytes one request to `/agent-activity` may carry, the request rate to stay under, and how long the answer may be cached. The rate is derived from the organization's own rate limit for `POST /agent-activity`, which every client in the organization shares: the clients that asked for these settings in the last cache period or two share half of it evenly, and the checks before tool calls keep the other half. A check before a tool call is not batched and should not be held back by this rate. A client is counted by its `X-Opal-Host` and `X-Opal-Actor` headers, so it should send the same ones it sends to `/agent-activity`. A client should ask for these at most once per `cache_seconds`, and keep using its last answer, or its own defaults, when it cannot get one. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_agent_activity_client_settings_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentActivityClientSettings", + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_agent_activity_client_settings_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/agent-activity/client-settings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_agent_kill_switch( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentKillSwitch: + """Get the agent kill switch + + **Prototype (AG-297).** Returns whether agent tool calls are currently being denied for this organization, and the activation that is in force or that last was. `active` is evaluated against the clock on every read, so an activation past its `expires_at` reads as inactive without anything having swept it. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_agent_kill_switch_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentKillSwitch", + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_agent_kill_switch_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentKillSwitch]: + """Get the agent kill switch + + **Prototype (AG-297).** Returns whether agent tool calls are currently being denied for this organization, and the activation that is in force or that last was. `active` is evaluated against the clock on every read, so an activation past its `expires_at` reads as inactive without anything having swept it. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_agent_kill_switch_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentKillSwitch", + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_agent_kill_switch_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the agent kill switch + + **Prototype (AG-297).** Returns whether agent tool calls are currently being denied for this organization, and the activation that is in force or that last was. `active` is evaluated against the clock on every read, so an activation past its `expires_at` reads as inactive without anything having swept it. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_agent_kill_switch_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentKillSwitch", + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_agent_kill_switch_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/agent-kill-switch', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def report_agent_activity( + self, + agent_activity_ingest_request: AgentActivityIngestRequest, + x_opal_actor: Annotated[Optional[StrictStr], Field(description="The identity the reporting client claims this activity belongs to - an email or an Anthropic user id. **Unverified**: a Claude Code hook payload contains no user identity, so this has to be injected by whoever deploys the hook (via the http handler's `headers` map and `allowedEnvVars` interpolation), and whoever controls the machine controls the header. Used only when the API key itself does not identify a developer. When the email belongs to a person in the organization, that person is recorded as who the activity was reported for (always as a claim), and the activity is attributed to the one Claude agent they own, if they own exactly one. The API key's own email is never treated this way: a key belongs to whoever created it, which with a shared key is not who is at the keyboard. Omitting it is valid. When an event's `opal_reported` object carries other emails, Opal also tries them, in the order `configured_email`, `claude_account_email`, `git_email`, after this header and skipping any that repeat it. The first one that resolves to an agent wins.")] = None, + x_opal_host: Annotated[Optional[StrictStr], Field(description="The name of the machine that sent this request, as that machine reports it (`hostname -s`). **Unverified**: two machines can share a name, and whoever controls the machine controls the header. Stored with each event, so a reader can tell which machine reported it. When an event's own `opal_reported.hostname` names a different machine, this header wins and the body's value is kept beside it. Omitting it is valid.")] = None, + x_opal_content: Annotated[Optional[StrictStr], Field(description="`1` when the sender collects conversation content: the prompt of a `UserPromptSubmit` event, the `tool_response` of a `PostToolUse` event and the `last_assistant_message` of a `Stop` or `SubagentStop` event. Without it (or an event's own `opal_content`) those fields are read and discarded, as before. An `http` hook sets it in its `headers` map, because it cannot change the payload. Opal stores the content only when the organization stores content as well.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentActivityIngestResult: + """Report agent activity + + **Prototype (AG-285).** Reports activity observed by an agent runtime on a developer's machine - today, Claude Code hook events. This is **telemetry from cooperating machines, not attestation**. Opal can only see what a configured, consenting client chooses to send, cannot verify that a fleet is configured at all, and has no way to detect a machine that is reporting nothing. Absence of activity for an agent therefore means \"nothing was reported\", never \"the agent did nothing\". The request body is either a batch envelope (`{\"events\": [...]}`), a bare JSON array of events, or a single raw Claude Code hook payload - the last so a hook can POST here directly with no relay in between. The bearer token establishes the **organization** and nothing finer. No field in the payload is treated as an identity claim Opal trusts: the actor headers below are used for best-effort attribution and display only. Events that cannot be attributed to an agent are retained and surfaced as unattributed activity rather than dropped. + + :param agent_activity_ingest_request: (required) + :type agent_activity_ingest_request: AgentActivityIngestRequest + :param x_opal_actor: The identity the reporting client claims this activity belongs to - an email or an Anthropic user id. **Unverified**: a Claude Code hook payload contains no user identity, so this has to be injected by whoever deploys the hook (via the http handler's `headers` map and `allowedEnvVars` interpolation), and whoever controls the machine controls the header. Used only when the API key itself does not identify a developer. When the email belongs to a person in the organization, that person is recorded as who the activity was reported for (always as a claim), and the activity is attributed to the one Claude agent they own, if they own exactly one. The API key's own email is never treated this way: a key belongs to whoever created it, which with a shared key is not who is at the keyboard. Omitting it is valid. When an event's `opal_reported` object carries other emails, Opal also tries them, in the order `configured_email`, `claude_account_email`, `git_email`, after this header and skipping any that repeat it. The first one that resolves to an agent wins. + :type x_opal_actor: str + :param x_opal_host: The name of the machine that sent this request, as that machine reports it (`hostname -s`). **Unverified**: two machines can share a name, and whoever controls the machine controls the header. Stored with each event, so a reader can tell which machine reported it. When an event's own `opal_reported.hostname` names a different machine, this header wins and the body's value is kept beside it. Omitting it is valid. + :type x_opal_host: str + :param x_opal_content: `1` when the sender collects conversation content: the prompt of a `UserPromptSubmit` event, the `tool_response` of a `PostToolUse` event and the `last_assistant_message` of a `Stop` or `SubagentStop` event. Without it (or an event's own `opal_content`) those fields are read and discarded, as before. An `http` hook sets it in its `headers` map, because it cannot change the payload. Opal stores the content only when the organization stores content as well. + :type x_opal_content: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._report_agent_activity_serialize( + agent_activity_ingest_request=agent_activity_ingest_request, + x_opal_actor=x_opal_actor, + x_opal_host=x_opal_host, + x_opal_content=x_opal_content, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentActivityIngestResult", + '400': None, + '413': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def report_agent_activity_with_http_info( + self, + agent_activity_ingest_request: AgentActivityIngestRequest, + x_opal_actor: Annotated[Optional[StrictStr], Field(description="The identity the reporting client claims this activity belongs to - an email or an Anthropic user id. **Unverified**: a Claude Code hook payload contains no user identity, so this has to be injected by whoever deploys the hook (via the http handler's `headers` map and `allowedEnvVars` interpolation), and whoever controls the machine controls the header. Used only when the API key itself does not identify a developer. When the email belongs to a person in the organization, that person is recorded as who the activity was reported for (always as a claim), and the activity is attributed to the one Claude agent they own, if they own exactly one. The API key's own email is never treated this way: a key belongs to whoever created it, which with a shared key is not who is at the keyboard. Omitting it is valid. When an event's `opal_reported` object carries other emails, Opal also tries them, in the order `configured_email`, `claude_account_email`, `git_email`, after this header and skipping any that repeat it. The first one that resolves to an agent wins.")] = None, + x_opal_host: Annotated[Optional[StrictStr], Field(description="The name of the machine that sent this request, as that machine reports it (`hostname -s`). **Unverified**: two machines can share a name, and whoever controls the machine controls the header. Stored with each event, so a reader can tell which machine reported it. When an event's own `opal_reported.hostname` names a different machine, this header wins and the body's value is kept beside it. Omitting it is valid.")] = None, + x_opal_content: Annotated[Optional[StrictStr], Field(description="`1` when the sender collects conversation content: the prompt of a `UserPromptSubmit` event, the `tool_response` of a `PostToolUse` event and the `last_assistant_message` of a `Stop` or `SubagentStop` event. Without it (or an event's own `opal_content`) those fields are read and discarded, as before. An `http` hook sets it in its `headers` map, because it cannot change the payload. Opal stores the content only when the organization stores content as well.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentActivityIngestResult]: + """Report agent activity + + **Prototype (AG-285).** Reports activity observed by an agent runtime on a developer's machine - today, Claude Code hook events. This is **telemetry from cooperating machines, not attestation**. Opal can only see what a configured, consenting client chooses to send, cannot verify that a fleet is configured at all, and has no way to detect a machine that is reporting nothing. Absence of activity for an agent therefore means \"nothing was reported\", never \"the agent did nothing\". The request body is either a batch envelope (`{\"events\": [...]}`), a bare JSON array of events, or a single raw Claude Code hook payload - the last so a hook can POST here directly with no relay in between. The bearer token establishes the **organization** and nothing finer. No field in the payload is treated as an identity claim Opal trusts: the actor headers below are used for best-effort attribution and display only. Events that cannot be attributed to an agent are retained and surfaced as unattributed activity rather than dropped. + + :param agent_activity_ingest_request: (required) + :type agent_activity_ingest_request: AgentActivityIngestRequest + :param x_opal_actor: The identity the reporting client claims this activity belongs to - an email or an Anthropic user id. **Unverified**: a Claude Code hook payload contains no user identity, so this has to be injected by whoever deploys the hook (via the http handler's `headers` map and `allowedEnvVars` interpolation), and whoever controls the machine controls the header. Used only when the API key itself does not identify a developer. When the email belongs to a person in the organization, that person is recorded as who the activity was reported for (always as a claim), and the activity is attributed to the one Claude agent they own, if they own exactly one. The API key's own email is never treated this way: a key belongs to whoever created it, which with a shared key is not who is at the keyboard. Omitting it is valid. When an event's `opal_reported` object carries other emails, Opal also tries them, in the order `configured_email`, `claude_account_email`, `git_email`, after this header and skipping any that repeat it. The first one that resolves to an agent wins. + :type x_opal_actor: str + :param x_opal_host: The name of the machine that sent this request, as that machine reports it (`hostname -s`). **Unverified**: two machines can share a name, and whoever controls the machine controls the header. Stored with each event, so a reader can tell which machine reported it. When an event's own `opal_reported.hostname` names a different machine, this header wins and the body's value is kept beside it. Omitting it is valid. + :type x_opal_host: str + :param x_opal_content: `1` when the sender collects conversation content: the prompt of a `UserPromptSubmit` event, the `tool_response` of a `PostToolUse` event and the `last_assistant_message` of a `Stop` or `SubagentStop` event. Without it (or an event's own `opal_content`) those fields are read and discarded, as before. An `http` hook sets it in its `headers` map, because it cannot change the payload. Opal stores the content only when the organization stores content as well. + :type x_opal_content: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._report_agent_activity_serialize( + agent_activity_ingest_request=agent_activity_ingest_request, + x_opal_actor=x_opal_actor, + x_opal_host=x_opal_host, + x_opal_content=x_opal_content, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentActivityIngestResult", + '400': None, + '413': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def report_agent_activity_without_preload_content( + self, + agent_activity_ingest_request: AgentActivityIngestRequest, + x_opal_actor: Annotated[Optional[StrictStr], Field(description="The identity the reporting client claims this activity belongs to - an email or an Anthropic user id. **Unverified**: a Claude Code hook payload contains no user identity, so this has to be injected by whoever deploys the hook (via the http handler's `headers` map and `allowedEnvVars` interpolation), and whoever controls the machine controls the header. Used only when the API key itself does not identify a developer. When the email belongs to a person in the organization, that person is recorded as who the activity was reported for (always as a claim), and the activity is attributed to the one Claude agent they own, if they own exactly one. The API key's own email is never treated this way: a key belongs to whoever created it, which with a shared key is not who is at the keyboard. Omitting it is valid. When an event's `opal_reported` object carries other emails, Opal also tries them, in the order `configured_email`, `claude_account_email`, `git_email`, after this header and skipping any that repeat it. The first one that resolves to an agent wins.")] = None, + x_opal_host: Annotated[Optional[StrictStr], Field(description="The name of the machine that sent this request, as that machine reports it (`hostname -s`). **Unverified**: two machines can share a name, and whoever controls the machine controls the header. Stored with each event, so a reader can tell which machine reported it. When an event's own `opal_reported.hostname` names a different machine, this header wins and the body's value is kept beside it. Omitting it is valid.")] = None, + x_opal_content: Annotated[Optional[StrictStr], Field(description="`1` when the sender collects conversation content: the prompt of a `UserPromptSubmit` event, the `tool_response` of a `PostToolUse` event and the `last_assistant_message` of a `Stop` or `SubagentStop` event. Without it (or an event's own `opal_content`) those fields are read and discarded, as before. An `http` hook sets it in its `headers` map, because it cannot change the payload. Opal stores the content only when the organization stores content as well.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Report agent activity + + **Prototype (AG-285).** Reports activity observed by an agent runtime on a developer's machine - today, Claude Code hook events. This is **telemetry from cooperating machines, not attestation**. Opal can only see what a configured, consenting client chooses to send, cannot verify that a fleet is configured at all, and has no way to detect a machine that is reporting nothing. Absence of activity for an agent therefore means \"nothing was reported\", never \"the agent did nothing\". The request body is either a batch envelope (`{\"events\": [...]}`), a bare JSON array of events, or a single raw Claude Code hook payload - the last so a hook can POST here directly with no relay in between. The bearer token establishes the **organization** and nothing finer. No field in the payload is treated as an identity claim Opal trusts: the actor headers below are used for best-effort attribution and display only. Events that cannot be attributed to an agent are retained and surfaced as unattributed activity rather than dropped. + + :param agent_activity_ingest_request: (required) + :type agent_activity_ingest_request: AgentActivityIngestRequest + :param x_opal_actor: The identity the reporting client claims this activity belongs to - an email or an Anthropic user id. **Unverified**: a Claude Code hook payload contains no user identity, so this has to be injected by whoever deploys the hook (via the http handler's `headers` map and `allowedEnvVars` interpolation), and whoever controls the machine controls the header. Used only when the API key itself does not identify a developer. When the email belongs to a person in the organization, that person is recorded as who the activity was reported for (always as a claim), and the activity is attributed to the one Claude agent they own, if they own exactly one. The API key's own email is never treated this way: a key belongs to whoever created it, which with a shared key is not who is at the keyboard. Omitting it is valid. When an event's `opal_reported` object carries other emails, Opal also tries them, in the order `configured_email`, `claude_account_email`, `git_email`, after this header and skipping any that repeat it. The first one that resolves to an agent wins. + :type x_opal_actor: str + :param x_opal_host: The name of the machine that sent this request, as that machine reports it (`hostname -s`). **Unverified**: two machines can share a name, and whoever controls the machine controls the header. Stored with each event, so a reader can tell which machine reported it. When an event's own `opal_reported.hostname` names a different machine, this header wins and the body's value is kept beside it. Omitting it is valid. + :type x_opal_host: str + :param x_opal_content: `1` when the sender collects conversation content: the prompt of a `UserPromptSubmit` event, the `tool_response` of a `PostToolUse` event and the `last_assistant_message` of a `Stop` or `SubagentStop` event. Without it (or an event's own `opal_content`) those fields are read and discarded, as before. An `http` hook sets it in its `headers` map, because it cannot change the payload. Opal stores the content only when the organization stores content as well. + :type x_opal_content: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._report_agent_activity_serialize( + agent_activity_ingest_request=agent_activity_ingest_request, + x_opal_actor=x_opal_actor, + x_opal_host=x_opal_host, + x_opal_content=x_opal_content, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentActivityIngestResult", + '400': None, + '413': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _report_agent_activity_serialize( + self, + agent_activity_ingest_request, + x_opal_actor, + x_opal_host, + x_opal_content, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_opal_actor is not None: + _header_params['X-Opal-Actor'] = x_opal_actor + if x_opal_host is not None: + _header_params['X-Opal-Host'] = x_opal_host + if x_opal_content is not None: + _header_params['X-Opal-Content'] = x_opal_content + # process the form parameters + # process the body parameter + if agent_activity_ingest_request is not None: + _body_params = agent_activity_ingest_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/agent-activity', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def report_mcp_config( + self, + mcp_config_report: McpConfigReport, + x_opal_actor: Annotated[Optional[StrictStr], Field(description="The identity the reporting client claims - an email, or an operating-system user name. **Unverified**, used the same way as on `/agent-activity`.")] = None, + x_opal_host: Annotated[Optional[StrictStr], Field(description="The name of the machine that sent the report, as that machine reports it (`hostname -s`). **Unverified.** A server this machine listed before and this report leaves out is marked removed for the reporting person, unless another of their machines still lists it. Omitting it is valid: the reports without one count as one machine.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> McpConfigReportResult: + """Report MCP server configuration + + **Prototype.** Reports the MCP servers configured in Claude Code on one developer's machine, as the Opal hook kit read them: user-level and per-project servers in `~/.claude.json`, a project's `.mcp.json`, `managed-mcp.json`, and servers a plugin provides when they can be found. For each server the kit sends its name, the scope it was configured in, its transport, and either its URL (`http`, `sse`) or a hash of its command's shape (`stdio`). It never sends environment values, headers or command arguments, which can hold secrets. Opal adds each server to the organization's MCP server registry and records that this person has it configured. Nothing on the machine is changed. Like `/agent-activity`, this is **telemetry from cooperating machines**: the identity and the list are what the machine says. The bearer token establishes the organization and nothing finer. + + :param mcp_config_report: (required) + :type mcp_config_report: McpConfigReport + :param x_opal_actor: The identity the reporting client claims - an email, or an operating-system user name. **Unverified**, used the same way as on `/agent-activity`. + :type x_opal_actor: str + :param x_opal_host: The name of the machine that sent the report, as that machine reports it (`hostname -s`). **Unverified.** A server this machine listed before and this report leaves out is marked removed for the reporting person, unless another of their machines still lists it. Omitting it is valid: the reports without one count as one machine. + :type x_opal_host: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._report_mcp_config_serialize( + mcp_config_report=mcp_config_report, + x_opal_actor=x_opal_actor, + x_opal_host=x_opal_host, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "McpConfigReportResult", + '400': None, + '403': None, + '413': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def report_mcp_config_with_http_info( + self, + mcp_config_report: McpConfigReport, + x_opal_actor: Annotated[Optional[StrictStr], Field(description="The identity the reporting client claims - an email, or an operating-system user name. **Unverified**, used the same way as on `/agent-activity`.")] = None, + x_opal_host: Annotated[Optional[StrictStr], Field(description="The name of the machine that sent the report, as that machine reports it (`hostname -s`). **Unverified.** A server this machine listed before and this report leaves out is marked removed for the reporting person, unless another of their machines still lists it. Omitting it is valid: the reports without one count as one machine.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[McpConfigReportResult]: + """Report MCP server configuration + + **Prototype.** Reports the MCP servers configured in Claude Code on one developer's machine, as the Opal hook kit read them: user-level and per-project servers in `~/.claude.json`, a project's `.mcp.json`, `managed-mcp.json`, and servers a plugin provides when they can be found. For each server the kit sends its name, the scope it was configured in, its transport, and either its URL (`http`, `sse`) or a hash of its command's shape (`stdio`). It never sends environment values, headers or command arguments, which can hold secrets. Opal adds each server to the organization's MCP server registry and records that this person has it configured. Nothing on the machine is changed. Like `/agent-activity`, this is **telemetry from cooperating machines**: the identity and the list are what the machine says. The bearer token establishes the organization and nothing finer. + + :param mcp_config_report: (required) + :type mcp_config_report: McpConfigReport + :param x_opal_actor: The identity the reporting client claims - an email, or an operating-system user name. **Unverified**, used the same way as on `/agent-activity`. + :type x_opal_actor: str + :param x_opal_host: The name of the machine that sent the report, as that machine reports it (`hostname -s`). **Unverified.** A server this machine listed before and this report leaves out is marked removed for the reporting person, unless another of their machines still lists it. Omitting it is valid: the reports without one count as one machine. + :type x_opal_host: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._report_mcp_config_serialize( + mcp_config_report=mcp_config_report, + x_opal_actor=x_opal_actor, + x_opal_host=x_opal_host, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "McpConfigReportResult", + '400': None, + '403': None, + '413': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def report_mcp_config_without_preload_content( + self, + mcp_config_report: McpConfigReport, + x_opal_actor: Annotated[Optional[StrictStr], Field(description="The identity the reporting client claims - an email, or an operating-system user name. **Unverified**, used the same way as on `/agent-activity`.")] = None, + x_opal_host: Annotated[Optional[StrictStr], Field(description="The name of the machine that sent the report, as that machine reports it (`hostname -s`). **Unverified.** A server this machine listed before and this report leaves out is marked removed for the reporting person, unless another of their machines still lists it. Omitting it is valid: the reports without one count as one machine.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Report MCP server configuration + + **Prototype.** Reports the MCP servers configured in Claude Code on one developer's machine, as the Opal hook kit read them: user-level and per-project servers in `~/.claude.json`, a project's `.mcp.json`, `managed-mcp.json`, and servers a plugin provides when they can be found. For each server the kit sends its name, the scope it was configured in, its transport, and either its URL (`http`, `sse`) or a hash of its command's shape (`stdio`). It never sends environment values, headers or command arguments, which can hold secrets. Opal adds each server to the organization's MCP server registry and records that this person has it configured. Nothing on the machine is changed. Like `/agent-activity`, this is **telemetry from cooperating machines**: the identity and the list are what the machine says. The bearer token establishes the organization and nothing finer. + + :param mcp_config_report: (required) + :type mcp_config_report: McpConfigReport + :param x_opal_actor: The identity the reporting client claims - an email, or an operating-system user name. **Unverified**, used the same way as on `/agent-activity`. + :type x_opal_actor: str + :param x_opal_host: The name of the machine that sent the report, as that machine reports it (`hostname -s`). **Unverified.** A server this machine listed before and this report leaves out is marked removed for the reporting person, unless another of their machines still lists it. Omitting it is valid: the reports without one count as one machine. + :type x_opal_host: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._report_mcp_config_serialize( + mcp_config_report=mcp_config_report, + x_opal_actor=x_opal_actor, + x_opal_host=x_opal_host, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "McpConfigReportResult", + '400': None, + '403': None, + '413': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _report_mcp_config_serialize( + self, + mcp_config_report, + x_opal_actor, + x_opal_host, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if x_opal_actor is not None: + _header_params['X-Opal-Actor'] = x_opal_actor + if x_opal_host is not None: + _header_params['X-Opal-Host'] = x_opal_host + # process the form parameters + # process the body parameter + if mcp_config_report is not None: + _body_params = mcp_config_report + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/agent-activity/mcp-config', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_agent_kill_switch( + self, + set_agent_kill_switch_request: SetAgentKillSwitchRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentKillSwitch: + """Set the agent kill switch + + **Prototype (AG-297).** Turns the org-level agent kill switch on or off. Admin only. While it is on, Opal answers every `PreToolUse` hook POST to `/agent-activity` with a `deny` decision, so a cooperating Claude Code client stops running tools. **It is not a security boundary, and it fails open.** It reaches only clients that are configured to POST to `/agent-activity` and that honour the answer; a client on a non-default base URL, an older build, or with no hook deployed is unaffected. If Opal is unreachable or slow the tool call proceeds, because Claude Code treats a failed `PreToolUse` hook as a non-blocking error by design. Activation is always time-bound: `duration_minutes` is capped, and an activation that reaches `expires_at` stops denying on its own. + + :param set_agent_kill_switch_request: (required) + :type set_agent_kill_switch_request: SetAgentKillSwitchRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_agent_kill_switch_serialize( + set_agent_kill_switch_request=set_agent_kill_switch_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentKillSwitch", + '400': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def set_agent_kill_switch_with_http_info( + self, + set_agent_kill_switch_request: SetAgentKillSwitchRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentKillSwitch]: + """Set the agent kill switch + + **Prototype (AG-297).** Turns the org-level agent kill switch on or off. Admin only. While it is on, Opal answers every `PreToolUse` hook POST to `/agent-activity` with a `deny` decision, so a cooperating Claude Code client stops running tools. **It is not a security boundary, and it fails open.** It reaches only clients that are configured to POST to `/agent-activity` and that honour the answer; a client on a non-default base URL, an older build, or with no hook deployed is unaffected. If Opal is unreachable or slow the tool call proceeds, because Claude Code treats a failed `PreToolUse` hook as a non-blocking error by design. Activation is always time-bound: `duration_minutes` is capped, and an activation that reaches `expires_at` stops denying on its own. + + :param set_agent_kill_switch_request: (required) + :type set_agent_kill_switch_request: SetAgentKillSwitchRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_agent_kill_switch_serialize( + set_agent_kill_switch_request=set_agent_kill_switch_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentKillSwitch", + '400': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def set_agent_kill_switch_without_preload_content( + self, + set_agent_kill_switch_request: SetAgentKillSwitchRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set the agent kill switch + + **Prototype (AG-297).** Turns the org-level agent kill switch on or off. Admin only. While it is on, Opal answers every `PreToolUse` hook POST to `/agent-activity` with a `deny` decision, so a cooperating Claude Code client stops running tools. **It is not a security boundary, and it fails open.** It reaches only clients that are configured to POST to `/agent-activity` and that honour the answer; a client on a non-default base URL, an older build, or with no hook deployed is unaffected. If Opal is unreachable or slow the tool call proceeds, because Claude Code treats a failed `PreToolUse` hook as a non-blocking error by design. Activation is always time-bound: `duration_minutes` is capped, and an activation that reaches `expires_at` stops denying on its own. + + :param set_agent_kill_switch_request: (required) + :type set_agent_kill_switch_request: SetAgentKillSwitchRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_agent_kill_switch_serialize( + set_agent_kill_switch_request=set_agent_kill_switch_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentKillSwitch", + '400': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _set_agent_kill_switch_serialize( + self, + set_agent_kill_switch_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if set_agent_kill_switch_request is not None: + _body_params = set_agent_kill_switch_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/agent-kill-switch', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/opal_security/api/apps_api.py b/opal_security/api/apps_api.py index 7455a86..f733280 100644 --- a/opal_security/api/apps_api.py +++ b/opal_security/api/apps_api.py @@ -23,8 +23,11 @@ from uuid import UUID from opal_security.models.app import App from opal_security.models.app_type_enum import AppTypeEnum +from opal_security.models.app_visibility_info import AppVisibilityInfo from opal_security.models.apps_list import AppsList +from opal_security.models.create_app_info import CreateAppInfo from opal_security.models.sync_error_list import SyncErrorList +from opal_security.models.update_app_info import UpdateAppInfo from opal_security.api_client import ApiClient, RequestSerialized from opal_security.api_response import ApiResponse @@ -44,10 +47,1355 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def create_app( + self, + create_app_info: CreateAppInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> App: + """Create app + + Creates an `App` in Opal. Currently supports only Push-only apps (`CUSTOM`) and Custom Connector apps (`CUSTOM_CONNECTOR`). + + :param create_app_info: (required) + :type create_app_info: CreateAppInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_app_serialize( + create_app_info=create_app_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "App", + '400': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_app_with_http_info( + self, + create_app_info: CreateAppInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[App]: + """Create app + + Creates an `App` in Opal. Currently supports only Push-only apps (`CUSTOM`) and Custom Connector apps (`CUSTOM_CONNECTOR`). + + :param create_app_info: (required) + :type create_app_info: CreateAppInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_app_serialize( + create_app_info=create_app_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "App", + '400': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_app_without_preload_content( + self, + create_app_info: CreateAppInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create app + + Creates an `App` in Opal. Currently supports only Push-only apps (`CUSTOM`) and Custom Connector apps (`CUSTOM_CONNECTOR`). + + :param create_app_info: (required) + :type create_app_info: CreateAppInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_app_serialize( + create_app_info=create_app_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "App", + '400': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_app_serialize( + self, + create_app_info, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_app_info is not None: + _body_params = create_app_info + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/apps', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_app( + self, + app_id: Annotated[UUID, Field(description="The ID of the app.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete app + + Deletes an `App`. Currently supports only Push-only apps (`CUSTOM`) and Custom Connector apps (`CUSTOM_CONNECTOR`). Matches the UI: soft-deletes the app and cleans up its resources, groups, and users. + + :param app_id: The ID of the app. (required) + :type app_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_app_serialize( + app_id=app_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_app_with_http_info( + self, + app_id: Annotated[UUID, Field(description="The ID of the app.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete app + + Deletes an `App`. Currently supports only Push-only apps (`CUSTOM`) and Custom Connector apps (`CUSTOM_CONNECTOR`). Matches the UI: soft-deletes the app and cleans up its resources, groups, and users. + + :param app_id: The ID of the app. (required) + :type app_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_app_serialize( + app_id=app_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_app_without_preload_content( + self, + app_id: Annotated[UUID, Field(description="The ID of the app.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete app + + Deletes an `App`. Currently supports only Push-only apps (`CUSTOM`) and Custom Connector apps (`CUSTOM_CONNECTOR`). Matches the UI: soft-deletes the app and cleans up its resources, groups, and users. + + :param app_id: The ID of the app. (required) + :type app_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_app_serialize( + app_id=app_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_app_serialize( + self, + app_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if app_id is not None: + _path_params['app_id'] = app_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/apps/{app_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_app( self, - app_id: Annotated[UUID, Field(description="The ID of the app.")], + app_id: Annotated[UUID, Field(description="The ID of the app.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> App: + """Get app by ID + + Returns an `App` object. + + :param app_id: The ID of the app. (required) + :type app_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_app_serialize( + app_id=app_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "App", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_app_with_http_info( + self, + app_id: Annotated[UUID, Field(description="The ID of the app.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[App]: + """Get app by ID + + Returns an `App` object. + + :param app_id: The ID of the app. (required) + :type app_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_app_serialize( + app_id=app_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "App", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_app_without_preload_content( + self, + app_id: Annotated[UUID, Field(description="The ID of the app.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get app by ID + + Returns an `App` object. + + :param app_id: The ID of the app. (required) + :type app_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_app_serialize( + app_id=app_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "App", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_app_serialize( + self, + app_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if app_id is not None: + _path_params['app_id'] = app_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/apps/{app_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_app_visibility( + self, + app_id: Annotated[UUID, Field(description="The ID of the app.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AppVisibilityInfo: + """Get app visibility + + Returns the visibility of this app. + + :param app_id: The ID of the app. (required) + :type app_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_app_visibility_serialize( + app_id=app_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AppVisibilityInfo", + '400': None, + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_app_visibility_with_http_info( + self, + app_id: Annotated[UUID, Field(description="The ID of the app.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AppVisibilityInfo]: + """Get app visibility + + Returns the visibility of this app. + + :param app_id: The ID of the app. (required) + :type app_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_app_visibility_serialize( + app_id=app_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AppVisibilityInfo", + '400': None, + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_app_visibility_without_preload_content( + self, + app_id: Annotated[UUID, Field(description="The ID of the app.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get app visibility + + Returns the visibility of this app. + + :param app_id: The ID of the app. (required) + :type app_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_app_visibility_serialize( + app_id=app_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AppVisibilityInfo", + '400': None, + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_app_visibility_serialize( + self, + app_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if app_id is not None: + _path_params['app_id'] = app_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/apps/{app_id}/visibility', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_apps( + self, + app_type_filter: Annotated[Optional[List[AppTypeEnum]], Field(description="A list of app types to filter by.")] = None, + owner_filter: Annotated[Optional[UUID], Field(description="An owner ID to filter by.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AppsList: + """Get apps + + Returns a list of `App` objects. + + :param app_type_filter: A list of app types to filter by. + :type app_type_filter: List[AppTypeEnum] + :param owner_filter: An owner ID to filter by. + :type owner_filter: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_apps_serialize( + app_type_filter=app_type_filter, + owner_filter=owner_filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AppsList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_apps_with_http_info( + self, + app_type_filter: Annotated[Optional[List[AppTypeEnum]], Field(description="A list of app types to filter by.")] = None, + owner_filter: Annotated[Optional[UUID], Field(description="An owner ID to filter by.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AppsList]: + """Get apps + + Returns a list of `App` objects. + + :param app_type_filter: A list of app types to filter by. + :type app_type_filter: List[AppTypeEnum] + :param owner_filter: An owner ID to filter by. + :type owner_filter: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_apps_serialize( + app_type_filter=app_type_filter, + owner_filter=owner_filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AppsList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_apps_without_preload_content( + self, + app_type_filter: Annotated[Optional[List[AppTypeEnum]], Field(description="A list of app types to filter by.")] = None, + owner_filter: Annotated[Optional[UUID], Field(description="An owner ID to filter by.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get apps + + Returns a list of `App` objects. + + :param app_type_filter: A list of app types to filter by. + :type app_type_filter: List[AppTypeEnum] + :param owner_filter: An owner ID to filter by. + :type owner_filter: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_apps_serialize( + app_type_filter=app_type_filter, + owner_filter=owner_filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AppsList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_apps_serialize( + self, + app_type_filter, + owner_filter, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'app_type_filter': 'csv', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if app_type_filter is not None: + + _query_params.append(('app_type_filter', app_type_filter)) + + if owner_filter is not None: + + _query_params.append(('owner_filter', owner_filter)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/apps', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_sync_errors( + self, + app_id: Annotated[Optional[UUID], Field(description="The ID of the app to list sync errors for.")] = None, + resource_id: Annotated[Optional[UUID], Field(description="The ID of the resource to list sync errors for.")] = None, + group_id: Annotated[Optional[UUID], Field(description="The ID of the group to list sync errors for.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -60,13 +1408,17 @@ def get_app( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> App: - """Get app by ID + ) -> List[SyncErrorList]: + """get_sync_errors - Returns an `App` object. + Returns a list of recent sync errors that have occurred since the last successful sync. - :param app_id: The ID of the app. (required) + :param app_id: The ID of the app to list sync errors for. :type app_id: UUID + :param resource_id: The ID of the resource to list sync errors for. + :type resource_id: UUID + :param group_id: The ID of the group to list sync errors for. + :type group_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -89,8 +1441,10 @@ def get_app( :return: Returns the result object. """ # noqa: E501 - _param = self._get_app_serialize( + _param = self._get_sync_errors_serialize( app_id=app_id, + resource_id=resource_id, + group_id=group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -98,7 +1452,7 @@ def get_app( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "App", + '200': "List[SyncErrorList]", } response_data = self.api_client.call_api( *_param, @@ -112,9 +1466,11 @@ def get_app( @validate_call - def get_app_with_http_info( + def get_sync_errors_with_http_info( self, - app_id: Annotated[UUID, Field(description="The ID of the app.")], + app_id: Annotated[Optional[UUID], Field(description="The ID of the app to list sync errors for.")] = None, + resource_id: Annotated[Optional[UUID], Field(description="The ID of the resource to list sync errors for.")] = None, + group_id: Annotated[Optional[UUID], Field(description="The ID of the group to list sync errors for.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -127,13 +1483,17 @@ def get_app_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[App]: - """Get app by ID + ) -> ApiResponse[List[SyncErrorList]]: + """get_sync_errors - Returns an `App` object. + Returns a list of recent sync errors that have occurred since the last successful sync. - :param app_id: The ID of the app. (required) + :param app_id: The ID of the app to list sync errors for. :type app_id: UUID + :param resource_id: The ID of the resource to list sync errors for. + :type resource_id: UUID + :param group_id: The ID of the group to list sync errors for. + :type group_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -156,8 +1516,10 @@ def get_app_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_app_serialize( + _param = self._get_sync_errors_serialize( app_id=app_id, + resource_id=resource_id, + group_id=group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -165,7 +1527,7 @@ def get_app_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "App", + '200': "List[SyncErrorList]", } response_data = self.api_client.call_api( *_param, @@ -179,9 +1541,11 @@ def get_app_with_http_info( @validate_call - def get_app_without_preload_content( + def get_sync_errors_without_preload_content( self, - app_id: Annotated[UUID, Field(description="The ID of the app.")], + app_id: Annotated[Optional[UUID], Field(description="The ID of the app to list sync errors for.")] = None, + resource_id: Annotated[Optional[UUID], Field(description="The ID of the resource to list sync errors for.")] = None, + group_id: Annotated[Optional[UUID], Field(description="The ID of the group to list sync errors for.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -195,12 +1559,16 @@ def get_app_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get app by ID + """get_sync_errors - Returns an `App` object. + Returns a list of recent sync errors that have occurred since the last successful sync. - :param app_id: The ID of the app. (required) + :param app_id: The ID of the app to list sync errors for. :type app_id: UUID + :param resource_id: The ID of the resource to list sync errors for. + :type resource_id: UUID + :param group_id: The ID of the group to list sync errors for. + :type group_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -223,8 +1591,10 @@ def get_app_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_app_serialize( + _param = self._get_sync_errors_serialize( app_id=app_id, + resource_id=resource_id, + group_id=group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -232,7 +1602,7 @@ def get_app_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "App", + '200': "List[SyncErrorList]", } response_data = self.api_client.call_api( *_param, @@ -241,9 +1611,11 @@ def get_app_without_preload_content( return response_data.response - def _get_app_serialize( + def _get_sync_errors_serialize( self, app_id, + resource_id, + group_id, _request_auth, _content_type, _headers, @@ -265,9 +1637,19 @@ def _get_app_serialize( _body_params: Optional[bytes] = None # process the path parameters - if app_id is not None: - _path_params['app_id'] = app_id # process the query parameters + if app_id is not None: + + _query_params.append(('app_id', app_id)) + + if resource_id is not None: + + _query_params.append(('resource_id', resource_id)) + + if group_id is not None: + + _query_params.append(('group_id', group_id)) + # process the header parameters # process the form parameters # process the body parameter @@ -289,7 +1671,7 @@ def _get_app_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/apps/{app_id}', + resource_path='/sync_errors', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -306,10 +1688,10 @@ def _get_app_serialize( @validate_call - def get_apps( + def set_app_visibility( self, - app_type_filter: Annotated[Optional[List[AppTypeEnum]], Field(description="A list of app types to filter by.")] = None, - owner_filter: Annotated[Optional[UUID], Field(description="An owner ID to filter by.")] = None, + app_id: Annotated[UUID, Field(description="The ID of the app.")], + app_visibility_info: AppVisibilityInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -322,15 +1704,15 @@ def get_apps( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AppsList: - """Get apps + ) -> AppVisibilityInfo: + """Set app visibility - Returns a list of `App` objects. + Sets the visibility of this app. Preferred over setting `visibility` / `visibility_group_ids` / `import_visibility` inline on `POST /apps` or `PATCH /apps/{app_id}` for drift-sensitive callers (Terraform, GitOps). Semantics are a replace, not a merge: `visibility_group_ids` is written to exactly what the request sends (an omitted or empty array clears all groups), and `import_visibility` is updated only when present. - :param app_type_filter: A list of app types to filter by. - :type app_type_filter: List[AppTypeEnum] - :param owner_filter: An owner ID to filter by. - :type owner_filter: UUID + :param app_id: The ID of the app. (required) + :type app_id: UUID + :param app_visibility_info: (required) + :type app_visibility_info: AppVisibilityInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -353,9 +1735,9 @@ def get_apps( :return: Returns the result object. """ # noqa: E501 - _param = self._get_apps_serialize( - app_type_filter=app_type_filter, - owner_filter=owner_filter, + _param = self._set_app_visibility_serialize( + app_id=app_id, + app_visibility_info=app_visibility_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -363,7 +1745,10 @@ def get_apps( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AppsList", + '200': "AppVisibilityInfo", + '400': None, + '403': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -377,10 +1762,10 @@ def get_apps( @validate_call - def get_apps_with_http_info( + def set_app_visibility_with_http_info( self, - app_type_filter: Annotated[Optional[List[AppTypeEnum]], Field(description="A list of app types to filter by.")] = None, - owner_filter: Annotated[Optional[UUID], Field(description="An owner ID to filter by.")] = None, + app_id: Annotated[UUID, Field(description="The ID of the app.")], + app_visibility_info: AppVisibilityInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -393,15 +1778,15 @@ def get_apps_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AppsList]: - """Get apps + ) -> ApiResponse[AppVisibilityInfo]: + """Set app visibility - Returns a list of `App` objects. + Sets the visibility of this app. Preferred over setting `visibility` / `visibility_group_ids` / `import_visibility` inline on `POST /apps` or `PATCH /apps/{app_id}` for drift-sensitive callers (Terraform, GitOps). Semantics are a replace, not a merge: `visibility_group_ids` is written to exactly what the request sends (an omitted or empty array clears all groups), and `import_visibility` is updated only when present. - :param app_type_filter: A list of app types to filter by. - :type app_type_filter: List[AppTypeEnum] - :param owner_filter: An owner ID to filter by. - :type owner_filter: UUID + :param app_id: The ID of the app. (required) + :type app_id: UUID + :param app_visibility_info: (required) + :type app_visibility_info: AppVisibilityInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -424,9 +1809,9 @@ def get_apps_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_apps_serialize( - app_type_filter=app_type_filter, - owner_filter=owner_filter, + _param = self._set_app_visibility_serialize( + app_id=app_id, + app_visibility_info=app_visibility_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -434,7 +1819,10 @@ def get_apps_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AppsList", + '200': "AppVisibilityInfo", + '400': None, + '403': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -448,10 +1836,10 @@ def get_apps_with_http_info( @validate_call - def get_apps_without_preload_content( + def set_app_visibility_without_preload_content( self, - app_type_filter: Annotated[Optional[List[AppTypeEnum]], Field(description="A list of app types to filter by.")] = None, - owner_filter: Annotated[Optional[UUID], Field(description="An owner ID to filter by.")] = None, + app_id: Annotated[UUID, Field(description="The ID of the app.")], + app_visibility_info: AppVisibilityInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -465,14 +1853,14 @@ def get_apps_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get apps + """Set app visibility - Returns a list of `App` objects. + Sets the visibility of this app. Preferred over setting `visibility` / `visibility_group_ids` / `import_visibility` inline on `POST /apps` or `PATCH /apps/{app_id}` for drift-sensitive callers (Terraform, GitOps). Semantics are a replace, not a merge: `visibility_group_ids` is written to exactly what the request sends (an omitted or empty array clears all groups), and `import_visibility` is updated only when present. - :param app_type_filter: A list of app types to filter by. - :type app_type_filter: List[AppTypeEnum] - :param owner_filter: An owner ID to filter by. - :type owner_filter: UUID + :param app_id: The ID of the app. (required) + :type app_id: UUID + :param app_visibility_info: (required) + :type app_visibility_info: AppVisibilityInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -495,9 +1883,9 @@ def get_apps_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_apps_serialize( - app_type_filter=app_type_filter, - owner_filter=owner_filter, + _param = self._set_app_visibility_serialize( + app_id=app_id, + app_visibility_info=app_visibility_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -505,7 +1893,10 @@ def get_apps_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AppsList", + '200': "AppVisibilityInfo", + '400': None, + '403': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -514,10 +1905,10 @@ def get_apps_without_preload_content( return response_data.response - def _get_apps_serialize( + def _set_app_visibility_serialize( self, - app_type_filter, - owner_filter, + app_id, + app_visibility_info, _request_auth, _content_type, _headers, @@ -527,7 +1918,6 @@ def _get_apps_serialize( _host = None _collection_formats: Dict[str, str] = { - 'app_type_filter': 'csv', } _path_params: Dict[str, str] = {} @@ -540,18 +1930,14 @@ def _get_apps_serialize( _body_params: Optional[bytes] = None # process the path parameters + if app_id is not None: + _path_params['app_id'] = app_id # process the query parameters - if app_type_filter is not None: - - _query_params.append(('app_type_filter', app_type_filter)) - - if owner_filter is not None: - - _query_params.append(('owner_filter', owner_filter)) - # process the header parameters # process the form parameters # process the body parameter + if app_visibility_info is not None: + _body_params = app_visibility_info # set the HTTP header `Accept` @@ -562,6 +1948,19 @@ def _get_apps_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -569,8 +1968,8 @@ def _get_apps_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/apps', + method='PUT', + resource_path='/apps/{app_id}/visibility', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -587,11 +1986,10 @@ def _get_apps_serialize( @validate_call - def get_sync_errors( + def update_app( self, - app_id: Annotated[Optional[UUID], Field(description="The ID of the app to list sync errors for.")] = None, - resource_id: Annotated[Optional[UUID], Field(description="The ID of the resource to list sync errors for.")] = None, - group_id: Annotated[Optional[UUID], Field(description="The ID of the group to list sync errors for.")] = None, + app_id: Annotated[UUID, Field(description="The ID of the app.")], + update_app_info: UpdateAppInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -604,17 +2002,15 @@ def get_sync_errors( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[SyncErrorList]: - """get_sync_errors + ) -> App: + """Update app - Returns a list of recent sync errors that have occurred since the last successful sync. + Updates an `App`. Currently supports only Push-only apps (`CUSTOM`) and Custom Connector apps (`CUSTOM_CONNECTOR`). - :param app_id: The ID of the app to list sync errors for. + :param app_id: The ID of the app. (required) :type app_id: UUID - :param resource_id: The ID of the resource to list sync errors for. - :type resource_id: UUID - :param group_id: The ID of the group to list sync errors for. - :type group_id: UUID + :param update_app_info: (required) + :type update_app_info: UpdateAppInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -637,10 +2033,9 @@ def get_sync_errors( :return: Returns the result object. """ # noqa: E501 - _param = self._get_sync_errors_serialize( + _param = self._update_app_serialize( app_id=app_id, - resource_id=resource_id, - group_id=group_id, + update_app_info=update_app_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -648,7 +2043,8 @@ def get_sync_errors( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[SyncErrorList]", + '200': "App", + '400': None, } response_data = self.api_client.call_api( *_param, @@ -662,11 +2058,10 @@ def get_sync_errors( @validate_call - def get_sync_errors_with_http_info( + def update_app_with_http_info( self, - app_id: Annotated[Optional[UUID], Field(description="The ID of the app to list sync errors for.")] = None, - resource_id: Annotated[Optional[UUID], Field(description="The ID of the resource to list sync errors for.")] = None, - group_id: Annotated[Optional[UUID], Field(description="The ID of the group to list sync errors for.")] = None, + app_id: Annotated[UUID, Field(description="The ID of the app.")], + update_app_info: UpdateAppInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -679,17 +2074,15 @@ def get_sync_errors_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[SyncErrorList]]: - """get_sync_errors + ) -> ApiResponse[App]: + """Update app - Returns a list of recent sync errors that have occurred since the last successful sync. + Updates an `App`. Currently supports only Push-only apps (`CUSTOM`) and Custom Connector apps (`CUSTOM_CONNECTOR`). - :param app_id: The ID of the app to list sync errors for. + :param app_id: The ID of the app. (required) :type app_id: UUID - :param resource_id: The ID of the resource to list sync errors for. - :type resource_id: UUID - :param group_id: The ID of the group to list sync errors for. - :type group_id: UUID + :param update_app_info: (required) + :type update_app_info: UpdateAppInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -712,10 +2105,9 @@ def get_sync_errors_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_sync_errors_serialize( + _param = self._update_app_serialize( app_id=app_id, - resource_id=resource_id, - group_id=group_id, + update_app_info=update_app_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -723,7 +2115,8 @@ def get_sync_errors_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[SyncErrorList]", + '200': "App", + '400': None, } response_data = self.api_client.call_api( *_param, @@ -737,11 +2130,10 @@ def get_sync_errors_with_http_info( @validate_call - def get_sync_errors_without_preload_content( + def update_app_without_preload_content( self, - app_id: Annotated[Optional[UUID], Field(description="The ID of the app to list sync errors for.")] = None, - resource_id: Annotated[Optional[UUID], Field(description="The ID of the resource to list sync errors for.")] = None, - group_id: Annotated[Optional[UUID], Field(description="The ID of the group to list sync errors for.")] = None, + app_id: Annotated[UUID, Field(description="The ID of the app.")], + update_app_info: UpdateAppInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -755,16 +2147,14 @@ def get_sync_errors_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_sync_errors + """Update app - Returns a list of recent sync errors that have occurred since the last successful sync. + Updates an `App`. Currently supports only Push-only apps (`CUSTOM`) and Custom Connector apps (`CUSTOM_CONNECTOR`). - :param app_id: The ID of the app to list sync errors for. + :param app_id: The ID of the app. (required) :type app_id: UUID - :param resource_id: The ID of the resource to list sync errors for. - :type resource_id: UUID - :param group_id: The ID of the group to list sync errors for. - :type group_id: UUID + :param update_app_info: (required) + :type update_app_info: UpdateAppInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -787,10 +2177,9 @@ def get_sync_errors_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_sync_errors_serialize( + _param = self._update_app_serialize( app_id=app_id, - resource_id=resource_id, - group_id=group_id, + update_app_info=update_app_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -798,7 +2187,8 @@ def get_sync_errors_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[SyncErrorList]", + '200': "App", + '400': None, } response_data = self.api_client.call_api( *_param, @@ -807,11 +2197,10 @@ def get_sync_errors_without_preload_content( return response_data.response - def _get_sync_errors_serialize( + def _update_app_serialize( self, app_id, - resource_id, - group_id, + update_app_info, _request_auth, _content_type, _headers, @@ -833,22 +2222,14 @@ def _get_sync_errors_serialize( _body_params: Optional[bytes] = None # process the path parameters - # process the query parameters if app_id is not None: - - _query_params.append(('app_id', app_id)) - - if resource_id is not None: - - _query_params.append(('resource_id', resource_id)) - - if group_id is not None: - - _query_params.append(('group_id', group_id)) - + _path_params['app_id'] = app_id + # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if update_app_info is not None: + _body_params = update_app_info # set the HTTP header `Accept` @@ -859,6 +2240,19 @@ def _get_sync_errors_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -866,8 +2260,8 @@ def _get_sync_errors_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/sync_errors', + method='PUT', + resource_path='/apps/{app_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/opal_security/api/campaigns_api.py b/opal_security/api/campaigns_api.py new file mode 100644 index 0000000..8235c9a --- /dev/null +++ b/opal_security/api/campaigns_api.py @@ -0,0 +1,3604 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictBool, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from uuid import UUID +from opal_security.models.campaign import Campaign +from opal_security.models.campaign_item_status_enum import CampaignItemStatusEnum +from opal_security.models.campaign_status_enum import CampaignStatusEnum +from opal_security.models.create_campaign_info import CreateCampaignInfo +from opal_security.models.paginated_campaign_items_list import PaginatedCampaignItemsList +from opal_security.models.paginated_campaigns_list import PaginatedCampaignsList +from opal_security.models.paginated_viewer_campaign_items_list import PaginatedViewerCampaignItemsList +from opal_security.models.review_campaign_items_info import ReviewCampaignItemsInfo +from opal_security.models.review_campaign_items_response import ReviewCampaignItemsResponse +from opal_security.models.sort_direction_enum import SortDirectionEnum +from opal_security.models.stop_campaign_request import StopCampaignRequest +from opal_security.models.update_campaign_info import UpdateCampaignInfo +from opal_security.models.update_campaign_item_reviewers_info import UpdateCampaignItemReviewersInfo +from opal_security.models.update_campaign_item_reviewers_result import UpdateCampaignItemReviewersResult +from opal_security.models.viewer_campaign_item_sort_field_enum import ViewerCampaignItemSortFieldEnum +from opal_security.models.viewer_campaign_item_status_enum import ViewerCampaignItemStatusEnum + +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType + + +class CampaignsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_campaign( + self, + create_campaign_info: CreateCampaignInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Campaign: + """create_campaign + + Creates a campaign. Campaign scope only supports direct access edges: `configuration.query.edgeFilter.directOnly` defaults to `true`, is always stored as `true`, and passing `false` returns 400. + + :param create_campaign_info: (required) + :type create_campaign_info: CreateCampaignInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_campaign_serialize( + create_campaign_info=create_campaign_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_campaign_with_http_info( + self, + create_campaign_info: CreateCampaignInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Campaign]: + """create_campaign + + Creates a campaign. Campaign scope only supports direct access edges: `configuration.query.edgeFilter.directOnly` defaults to `true`, is always stored as `true`, and passing `false` returns 400. + + :param create_campaign_info: (required) + :type create_campaign_info: CreateCampaignInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_campaign_serialize( + create_campaign_info=create_campaign_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_campaign_without_preload_content( + self, + create_campaign_info: CreateCampaignInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_campaign + + Creates a campaign. Campaign scope only supports direct access edges: `configuration.query.edgeFilter.directOnly` defaults to `true`, is always stored as `true`, and passing `false` returns 400. + + :param create_campaign_info: (required) + :type create_campaign_info: CreateCampaignInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_campaign_serialize( + create_campaign_info=create_campaign_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_campaign_serialize( + self, + create_campaign_info, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_campaign_info is not None: + _body_params = create_campaign_info + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/campaigns', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def end_campaign( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Campaign: + """End campaign + + Ends a stopped campaign, setting `ended_at` and `ended_by_user_id`, applying pending access changes, and queuing report generation. Returns 400 unless the campaign is started and stopped and not already ended. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._end_campaign_serialize( + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def end_campaign_with_http_info( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Campaign]: + """End campaign + + Ends a stopped campaign, setting `ended_at` and `ended_by_user_id`, applying pending access changes, and queuing report generation. Returns 400 unless the campaign is started and stopped and not already ended. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._end_campaign_serialize( + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def end_campaign_without_preload_content( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """End campaign + + Ends a stopped campaign, setting `ended_at` and `ended_by_user_id`, applying pending access changes, and queuing report generation. Returns 400 unless the campaign is started and stopped and not already ended. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._end_campaign_serialize( + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _end_campaign_serialize( + self, + campaign_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if campaign_id is not None: + _path_params['campaign_id'] = campaign_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/campaigns/{campaign_id}/end', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_campaign( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Campaign: + """Get campaign by ID + + Returns a `Campaign` object. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_campaign_serialize( + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_campaign_with_http_info( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Campaign]: + """Get campaign by ID + + Returns a `Campaign` object. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_campaign_serialize( + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_campaign_without_preload_content( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get campaign by ID + + Returns a `Campaign` object. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_campaign_serialize( + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_campaign_serialize( + self, + campaign_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if campaign_id is not None: + _path_params['campaign_id'] = campaign_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/campaigns/{campaign_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_campaign_items( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True)]], Field(description="Number of results to return per page. Default is 200; maximum is 500 (the campaign-items list cap). ")] = None, + statuses: Annotated[Optional[List[CampaignItemStatusEnum]], Field(description="Filter by derived item status. When multiple values are provided, items matching any status are returned (OR). ")] = None, + reviewer_user_id: Annotated[Optional[UUID], Field(description="Restrict to items assigned to this reviewer user ID.")] = None, + unassigned: Annotated[Optional[StrictBool], Field(description="When true, restrict to items with no reviewer assigned.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive search over principal name, asset name, and reviewer name. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginatedCampaignItemsList: + """List campaign items + + Returns a paginated list of review items for a campaign — the same rows shown on the admin Reviews tab. Status is derived using the same rules as the UI Status column. Soft-deleted role assignments are still returned with `is_target_deleted: true`. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200; maximum is 500 (the campaign-items list cap). + :type page_size: int + :param statuses: Filter by derived item status. When multiple values are provided, items matching any status are returned (OR). + :type statuses: List[CampaignItemStatusEnum] + :param reviewer_user_id: Restrict to items assigned to this reviewer user ID. + :type reviewer_user_id: UUID + :param unassigned: When true, restrict to items with no reviewer assigned. + :type unassigned: bool + :param search: Case-insensitive search over principal name, asset name, and reviewer name. + :type search: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_campaign_items_serialize( + campaign_id=campaign_id, + cursor=cursor, + page_size=page_size, + statuses=statuses, + reviewer_user_id=reviewer_user_id, + unassigned=unassigned, + search=search, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedCampaignItemsList", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_campaign_items_with_http_info( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True)]], Field(description="Number of results to return per page. Default is 200; maximum is 500 (the campaign-items list cap). ")] = None, + statuses: Annotated[Optional[List[CampaignItemStatusEnum]], Field(description="Filter by derived item status. When multiple values are provided, items matching any status are returned (OR). ")] = None, + reviewer_user_id: Annotated[Optional[UUID], Field(description="Restrict to items assigned to this reviewer user ID.")] = None, + unassigned: Annotated[Optional[StrictBool], Field(description="When true, restrict to items with no reviewer assigned.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive search over principal name, asset name, and reviewer name. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PaginatedCampaignItemsList]: + """List campaign items + + Returns a paginated list of review items for a campaign — the same rows shown on the admin Reviews tab. Status is derived using the same rules as the UI Status column. Soft-deleted role assignments are still returned with `is_target_deleted: true`. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200; maximum is 500 (the campaign-items list cap). + :type page_size: int + :param statuses: Filter by derived item status. When multiple values are provided, items matching any status are returned (OR). + :type statuses: List[CampaignItemStatusEnum] + :param reviewer_user_id: Restrict to items assigned to this reviewer user ID. + :type reviewer_user_id: UUID + :param unassigned: When true, restrict to items with no reviewer assigned. + :type unassigned: bool + :param search: Case-insensitive search over principal name, asset name, and reviewer name. + :type search: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_campaign_items_serialize( + campaign_id=campaign_id, + cursor=cursor, + page_size=page_size, + statuses=statuses, + reviewer_user_id=reviewer_user_id, + unassigned=unassigned, + search=search, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedCampaignItemsList", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_campaign_items_without_preload_content( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True)]], Field(description="Number of results to return per page. Default is 200; maximum is 500 (the campaign-items list cap). ")] = None, + statuses: Annotated[Optional[List[CampaignItemStatusEnum]], Field(description="Filter by derived item status. When multiple values are provided, items matching any status are returned (OR). ")] = None, + reviewer_user_id: Annotated[Optional[UUID], Field(description="Restrict to items assigned to this reviewer user ID.")] = None, + unassigned: Annotated[Optional[StrictBool], Field(description="When true, restrict to items with no reviewer assigned.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive search over principal name, asset name, and reviewer name. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List campaign items + + Returns a paginated list of review items for a campaign — the same rows shown on the admin Reviews tab. Status is derived using the same rules as the UI Status column. Soft-deleted role assignments are still returned with `is_target_deleted: true`. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200; maximum is 500 (the campaign-items list cap). + :type page_size: int + :param statuses: Filter by derived item status. When multiple values are provided, items matching any status are returned (OR). + :type statuses: List[CampaignItemStatusEnum] + :param reviewer_user_id: Restrict to items assigned to this reviewer user ID. + :type reviewer_user_id: UUID + :param unassigned: When true, restrict to items with no reviewer assigned. + :type unassigned: bool + :param search: Case-insensitive search over principal name, asset name, and reviewer name. + :type search: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_campaign_items_serialize( + campaign_id=campaign_id, + cursor=cursor, + page_size=page_size, + statuses=statuses, + reviewer_user_id=reviewer_user_id, + unassigned=unassigned, + search=search, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedCampaignItemsList", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_campaign_items_serialize( + self, + campaign_id, + cursor, + page_size, + statuses, + reviewer_user_id, + unassigned, + search, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'statuses': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if campaign_id is not None: + _path_params['campaign_id'] = campaign_id + # process the query parameters + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if statuses is not None: + + _query_params.append(('statuses', statuses)) + + if reviewer_user_id is not None: + + _query_params.append(('reviewer_user_id', reviewer_user_id)) + + if unassigned is not None: + + _query_params.append(('unassigned', unassigned)) + + if search is not None: + + _query_params.append(('search', search)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/campaigns/{campaign_id}/items', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_campaign_viewer_items( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True)]], Field(description="Number of results to return per page. Default is 200; maximum is 500. ")] = None, + sort_field: Annotated[Optional[ViewerCampaignItemSortFieldEnum], Field(description="Sort by. Omit to sort by created_at. ")] = None, + sort_direction: Annotated[Optional[SortDirectionEnum], Field(description="Sort direction.")] = None, + statuses: Annotated[Optional[List[ViewerCampaignItemStatusEnum]], Field(description="Filter by review status. When multiple values are provided, items matching any status are returned (OR). ")] = None, + access_level_names: Annotated[Optional[List[StrictStr]], Field(description="Filter by access level name.")] = None, + principal_ids: Annotated[Optional[List[UUID]], Field(description="Filter by principal ID.")] = None, + entity_ids: Annotated[Optional[List[UUID]], Field(description="Filter by entity ID.")] = None, + item_ids: Annotated[Optional[List[UUID]], Field(description="Filter to specific campaign item review IDs.")] = None, + ai_bucket_id: Annotated[Optional[UUID], Field(description="Restrict to items in this AI-suggestion bucket.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginatedViewerCampaignItemsList: + """List viewer campaign items + + Returns a paginated list of campaign review items assigned to the current authenticated viewer. Matches GraphQL `Campaign.viewerItems`. Campaign access matches `GET /campaigns/{campaign_id}` and GraphQL `campaign(id)`: the caller must have access-review read permission or be a reviewer on the campaign. Otherwise the request fails with 403 (same as get-by-id). Item rows are still scoped to the caller's own reviews (empty page when the caller is an admin but not a reviewer). + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200; maximum is 500. + :type page_size: int + :param sort_field: Sort by. Omit to sort by created_at. + :type sort_field: ViewerCampaignItemSortFieldEnum + :param sort_direction: Sort direction. + :type sort_direction: SortDirectionEnum + :param statuses: Filter by review status. When multiple values are provided, items matching any status are returned (OR). + :type statuses: List[ViewerCampaignItemStatusEnum] + :param access_level_names: Filter by access level name. + :type access_level_names: List[str] + :param principal_ids: Filter by principal ID. + :type principal_ids: List[UUID] + :param entity_ids: Filter by entity ID. + :type entity_ids: List[UUID] + :param item_ids: Filter to specific campaign item review IDs. + :type item_ids: List[UUID] + :param ai_bucket_id: Restrict to items in this AI-suggestion bucket. + :type ai_bucket_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_campaign_viewer_items_serialize( + campaign_id=campaign_id, + cursor=cursor, + page_size=page_size, + sort_field=sort_field, + sort_direction=sort_direction, + statuses=statuses, + access_level_names=access_level_names, + principal_ids=principal_ids, + entity_ids=entity_ids, + item_ids=item_ids, + ai_bucket_id=ai_bucket_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedViewerCampaignItemsList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_campaign_viewer_items_with_http_info( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True)]], Field(description="Number of results to return per page. Default is 200; maximum is 500. ")] = None, + sort_field: Annotated[Optional[ViewerCampaignItemSortFieldEnum], Field(description="Sort by. Omit to sort by created_at. ")] = None, + sort_direction: Annotated[Optional[SortDirectionEnum], Field(description="Sort direction.")] = None, + statuses: Annotated[Optional[List[ViewerCampaignItemStatusEnum]], Field(description="Filter by review status. When multiple values are provided, items matching any status are returned (OR). ")] = None, + access_level_names: Annotated[Optional[List[StrictStr]], Field(description="Filter by access level name.")] = None, + principal_ids: Annotated[Optional[List[UUID]], Field(description="Filter by principal ID.")] = None, + entity_ids: Annotated[Optional[List[UUID]], Field(description="Filter by entity ID.")] = None, + item_ids: Annotated[Optional[List[UUID]], Field(description="Filter to specific campaign item review IDs.")] = None, + ai_bucket_id: Annotated[Optional[UUID], Field(description="Restrict to items in this AI-suggestion bucket.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PaginatedViewerCampaignItemsList]: + """List viewer campaign items + + Returns a paginated list of campaign review items assigned to the current authenticated viewer. Matches GraphQL `Campaign.viewerItems`. Campaign access matches `GET /campaigns/{campaign_id}` and GraphQL `campaign(id)`: the caller must have access-review read permission or be a reviewer on the campaign. Otherwise the request fails with 403 (same as get-by-id). Item rows are still scoped to the caller's own reviews (empty page when the caller is an admin but not a reviewer). + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200; maximum is 500. + :type page_size: int + :param sort_field: Sort by. Omit to sort by created_at. + :type sort_field: ViewerCampaignItemSortFieldEnum + :param sort_direction: Sort direction. + :type sort_direction: SortDirectionEnum + :param statuses: Filter by review status. When multiple values are provided, items matching any status are returned (OR). + :type statuses: List[ViewerCampaignItemStatusEnum] + :param access_level_names: Filter by access level name. + :type access_level_names: List[str] + :param principal_ids: Filter by principal ID. + :type principal_ids: List[UUID] + :param entity_ids: Filter by entity ID. + :type entity_ids: List[UUID] + :param item_ids: Filter to specific campaign item review IDs. + :type item_ids: List[UUID] + :param ai_bucket_id: Restrict to items in this AI-suggestion bucket. + :type ai_bucket_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_campaign_viewer_items_serialize( + campaign_id=campaign_id, + cursor=cursor, + page_size=page_size, + sort_field=sort_field, + sort_direction=sort_direction, + statuses=statuses, + access_level_names=access_level_names, + principal_ids=principal_ids, + entity_ids=entity_ids, + item_ids=item_ids, + ai_bucket_id=ai_bucket_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedViewerCampaignItemsList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_campaign_viewer_items_without_preload_content( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True)]], Field(description="Number of results to return per page. Default is 200; maximum is 500. ")] = None, + sort_field: Annotated[Optional[ViewerCampaignItemSortFieldEnum], Field(description="Sort by. Omit to sort by created_at. ")] = None, + sort_direction: Annotated[Optional[SortDirectionEnum], Field(description="Sort direction.")] = None, + statuses: Annotated[Optional[List[ViewerCampaignItemStatusEnum]], Field(description="Filter by review status. When multiple values are provided, items matching any status are returned (OR). ")] = None, + access_level_names: Annotated[Optional[List[StrictStr]], Field(description="Filter by access level name.")] = None, + principal_ids: Annotated[Optional[List[UUID]], Field(description="Filter by principal ID.")] = None, + entity_ids: Annotated[Optional[List[UUID]], Field(description="Filter by entity ID.")] = None, + item_ids: Annotated[Optional[List[UUID]], Field(description="Filter to specific campaign item review IDs.")] = None, + ai_bucket_id: Annotated[Optional[UUID], Field(description="Restrict to items in this AI-suggestion bucket.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List viewer campaign items + + Returns a paginated list of campaign review items assigned to the current authenticated viewer. Matches GraphQL `Campaign.viewerItems`. Campaign access matches `GET /campaigns/{campaign_id}` and GraphQL `campaign(id)`: the caller must have access-review read permission or be a reviewer on the campaign. Otherwise the request fails with 403 (same as get-by-id). Item rows are still scoped to the caller's own reviews (empty page when the caller is an admin but not a reviewer). + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200; maximum is 500. + :type page_size: int + :param sort_field: Sort by. Omit to sort by created_at. + :type sort_field: ViewerCampaignItemSortFieldEnum + :param sort_direction: Sort direction. + :type sort_direction: SortDirectionEnum + :param statuses: Filter by review status. When multiple values are provided, items matching any status are returned (OR). + :type statuses: List[ViewerCampaignItemStatusEnum] + :param access_level_names: Filter by access level name. + :type access_level_names: List[str] + :param principal_ids: Filter by principal ID. + :type principal_ids: List[UUID] + :param entity_ids: Filter by entity ID. + :type entity_ids: List[UUID] + :param item_ids: Filter to specific campaign item review IDs. + :type item_ids: List[UUID] + :param ai_bucket_id: Restrict to items in this AI-suggestion bucket. + :type ai_bucket_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_campaign_viewer_items_serialize( + campaign_id=campaign_id, + cursor=cursor, + page_size=page_size, + sort_field=sort_field, + sort_direction=sort_direction, + statuses=statuses, + access_level_names=access_level_names, + principal_ids=principal_ids, + entity_ids=entity_ids, + item_ids=item_ids, + ai_bucket_id=ai_bucket_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedViewerCampaignItemsList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_campaign_viewer_items_serialize( + self, + campaign_id, + cursor, + page_size, + sort_field, + sort_direction, + statuses, + access_level_names, + principal_ids, + entity_ids, + item_ids, + ai_bucket_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'statuses': 'multi', + 'access_level_names': 'multi', + 'principal_ids': 'multi', + 'entity_ids': 'multi', + 'item_ids': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if campaign_id is not None: + _path_params['campaign_id'] = campaign_id + # process the query parameters + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if sort_field is not None: + + _query_params.append(('sort_field', sort_field.value)) + + if sort_direction is not None: + + _query_params.append(('sort_direction', sort_direction.value)) + + if statuses is not None: + + _query_params.append(('statuses', statuses)) + + if access_level_names is not None: + + _query_params.append(('access_level_names', access_level_names)) + + if principal_ids is not None: + + _query_params.append(('principal_ids', principal_ids)) + + if entity_ids is not None: + + _query_params.append(('entity_ids', entity_ids)) + + if item_ids is not None: + + _query_params.append(('item_ids', item_ids)) + + if ai_bucket_id is not None: + + _query_params.append(('ai_bucket_id', ai_bucket_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/campaigns/{campaign_id}/viewer-items', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_campaigns( + self, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Campaign name to filter by. Returns campaigns whose names contain this substring (case-insensitive).")] = None, + status: Annotated[Optional[CampaignStatusEnum], Field(description="Filter by campaign status. Status is derived from lifecycle timestamps and review progress.")] = None, + created_at_after: Annotated[Optional[datetime], Field(description="Include campaigns created after this timestamp (exclusive). ISO 8601 format.")] = None, + created_at_before: Annotated[Optional[datetime], Field(description="Include campaigns created before this timestamp (exclusive). ISO 8601 format.")] = None, + started_at_after: Annotated[Optional[datetime], Field(description="Include campaigns started after this timestamp (exclusive). ISO 8601 format.")] = None, + started_at_before: Annotated[Optional[datetime], Field(description="Include campaigns started before this timestamp (exclusive). ISO 8601 format.")] = None, + ended_at_after: Annotated[Optional[datetime], Field(description="Include campaigns ended after this timestamp (exclusive). ISO 8601 format.")] = None, + ended_at_before: Annotated[Optional[datetime], Field(description="Include campaigns ended before this timestamp (exclusive). ISO 8601 format.")] = None, + stopped_at_after: Annotated[Optional[datetime], Field(description="Include campaigns stopped after this timestamp (exclusive). ISO 8601 format.")] = None, + stopped_at_before: Annotated[Optional[datetime], Field(description="Include campaigns stopped before this timestamp (exclusive). ISO 8601 format.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginatedCampaignsList: + """get_campaigns + + Returns a list of `Campaign` objects. + + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param name: Campaign name to filter by. Returns campaigns whose names contain this substring (case-insensitive). + :type name: str + :param status: Filter by campaign status. Status is derived from lifecycle timestamps and review progress. + :type status: CampaignStatusEnum + :param created_at_after: Include campaigns created after this timestamp (exclusive). ISO 8601 format. + :type created_at_after: datetime + :param created_at_before: Include campaigns created before this timestamp (exclusive). ISO 8601 format. + :type created_at_before: datetime + :param started_at_after: Include campaigns started after this timestamp (exclusive). ISO 8601 format. + :type started_at_after: datetime + :param started_at_before: Include campaigns started before this timestamp (exclusive). ISO 8601 format. + :type started_at_before: datetime + :param ended_at_after: Include campaigns ended after this timestamp (exclusive). ISO 8601 format. + :type ended_at_after: datetime + :param ended_at_before: Include campaigns ended before this timestamp (exclusive). ISO 8601 format. + :type ended_at_before: datetime + :param stopped_at_after: Include campaigns stopped after this timestamp (exclusive). ISO 8601 format. + :type stopped_at_after: datetime + :param stopped_at_before: Include campaigns stopped before this timestamp (exclusive). ISO 8601 format. + :type stopped_at_before: datetime + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_campaigns_serialize( + cursor=cursor, + page_size=page_size, + name=name, + status=status, + created_at_after=created_at_after, + created_at_before=created_at_before, + started_at_after=started_at_after, + started_at_before=started_at_before, + ended_at_after=ended_at_after, + ended_at_before=ended_at_before, + stopped_at_after=stopped_at_after, + stopped_at_before=stopped_at_before, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedCampaignsList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_campaigns_with_http_info( + self, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Campaign name to filter by. Returns campaigns whose names contain this substring (case-insensitive).")] = None, + status: Annotated[Optional[CampaignStatusEnum], Field(description="Filter by campaign status. Status is derived from lifecycle timestamps and review progress.")] = None, + created_at_after: Annotated[Optional[datetime], Field(description="Include campaigns created after this timestamp (exclusive). ISO 8601 format.")] = None, + created_at_before: Annotated[Optional[datetime], Field(description="Include campaigns created before this timestamp (exclusive). ISO 8601 format.")] = None, + started_at_after: Annotated[Optional[datetime], Field(description="Include campaigns started after this timestamp (exclusive). ISO 8601 format.")] = None, + started_at_before: Annotated[Optional[datetime], Field(description="Include campaigns started before this timestamp (exclusive). ISO 8601 format.")] = None, + ended_at_after: Annotated[Optional[datetime], Field(description="Include campaigns ended after this timestamp (exclusive). ISO 8601 format.")] = None, + ended_at_before: Annotated[Optional[datetime], Field(description="Include campaigns ended before this timestamp (exclusive). ISO 8601 format.")] = None, + stopped_at_after: Annotated[Optional[datetime], Field(description="Include campaigns stopped after this timestamp (exclusive). ISO 8601 format.")] = None, + stopped_at_before: Annotated[Optional[datetime], Field(description="Include campaigns stopped before this timestamp (exclusive). ISO 8601 format.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PaginatedCampaignsList]: + """get_campaigns + + Returns a list of `Campaign` objects. + + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param name: Campaign name to filter by. Returns campaigns whose names contain this substring (case-insensitive). + :type name: str + :param status: Filter by campaign status. Status is derived from lifecycle timestamps and review progress. + :type status: CampaignStatusEnum + :param created_at_after: Include campaigns created after this timestamp (exclusive). ISO 8601 format. + :type created_at_after: datetime + :param created_at_before: Include campaigns created before this timestamp (exclusive). ISO 8601 format. + :type created_at_before: datetime + :param started_at_after: Include campaigns started after this timestamp (exclusive). ISO 8601 format. + :type started_at_after: datetime + :param started_at_before: Include campaigns started before this timestamp (exclusive). ISO 8601 format. + :type started_at_before: datetime + :param ended_at_after: Include campaigns ended after this timestamp (exclusive). ISO 8601 format. + :type ended_at_after: datetime + :param ended_at_before: Include campaigns ended before this timestamp (exclusive). ISO 8601 format. + :type ended_at_before: datetime + :param stopped_at_after: Include campaigns stopped after this timestamp (exclusive). ISO 8601 format. + :type stopped_at_after: datetime + :param stopped_at_before: Include campaigns stopped before this timestamp (exclusive). ISO 8601 format. + :type stopped_at_before: datetime + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_campaigns_serialize( + cursor=cursor, + page_size=page_size, + name=name, + status=status, + created_at_after=created_at_after, + created_at_before=created_at_before, + started_at_after=started_at_after, + started_at_before=started_at_before, + ended_at_after=ended_at_after, + ended_at_before=ended_at_before, + stopped_at_after=stopped_at_after, + stopped_at_before=stopped_at_before, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedCampaignsList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_campaigns_without_preload_content( + self, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Campaign name to filter by. Returns campaigns whose names contain this substring (case-insensitive).")] = None, + status: Annotated[Optional[CampaignStatusEnum], Field(description="Filter by campaign status. Status is derived from lifecycle timestamps and review progress.")] = None, + created_at_after: Annotated[Optional[datetime], Field(description="Include campaigns created after this timestamp (exclusive). ISO 8601 format.")] = None, + created_at_before: Annotated[Optional[datetime], Field(description="Include campaigns created before this timestamp (exclusive). ISO 8601 format.")] = None, + started_at_after: Annotated[Optional[datetime], Field(description="Include campaigns started after this timestamp (exclusive). ISO 8601 format.")] = None, + started_at_before: Annotated[Optional[datetime], Field(description="Include campaigns started before this timestamp (exclusive). ISO 8601 format.")] = None, + ended_at_after: Annotated[Optional[datetime], Field(description="Include campaigns ended after this timestamp (exclusive). ISO 8601 format.")] = None, + ended_at_before: Annotated[Optional[datetime], Field(description="Include campaigns ended before this timestamp (exclusive). ISO 8601 format.")] = None, + stopped_at_after: Annotated[Optional[datetime], Field(description="Include campaigns stopped after this timestamp (exclusive). ISO 8601 format.")] = None, + stopped_at_before: Annotated[Optional[datetime], Field(description="Include campaigns stopped before this timestamp (exclusive). ISO 8601 format.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_campaigns + + Returns a list of `Campaign` objects. + + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param name: Campaign name to filter by. Returns campaigns whose names contain this substring (case-insensitive). + :type name: str + :param status: Filter by campaign status. Status is derived from lifecycle timestamps and review progress. + :type status: CampaignStatusEnum + :param created_at_after: Include campaigns created after this timestamp (exclusive). ISO 8601 format. + :type created_at_after: datetime + :param created_at_before: Include campaigns created before this timestamp (exclusive). ISO 8601 format. + :type created_at_before: datetime + :param started_at_after: Include campaigns started after this timestamp (exclusive). ISO 8601 format. + :type started_at_after: datetime + :param started_at_before: Include campaigns started before this timestamp (exclusive). ISO 8601 format. + :type started_at_before: datetime + :param ended_at_after: Include campaigns ended after this timestamp (exclusive). ISO 8601 format. + :type ended_at_after: datetime + :param ended_at_before: Include campaigns ended before this timestamp (exclusive). ISO 8601 format. + :type ended_at_before: datetime + :param stopped_at_after: Include campaigns stopped after this timestamp (exclusive). ISO 8601 format. + :type stopped_at_after: datetime + :param stopped_at_before: Include campaigns stopped before this timestamp (exclusive). ISO 8601 format. + :type stopped_at_before: datetime + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_campaigns_serialize( + cursor=cursor, + page_size=page_size, + name=name, + status=status, + created_at_after=created_at_after, + created_at_before=created_at_before, + started_at_after=started_at_after, + started_at_before=started_at_before, + ended_at_after=ended_at_after, + ended_at_before=ended_at_before, + stopped_at_after=stopped_at_after, + stopped_at_before=stopped_at_before, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedCampaignsList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_campaigns_serialize( + self, + cursor, + page_size, + name, + status, + created_at_after, + created_at_before, + started_at_after, + started_at_before, + ended_at_after, + ended_at_before, + stopped_at_after, + stopped_at_before, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if name is not None: + + _query_params.append(('name', name)) + + if status is not None: + + _query_params.append(('status', status.value)) + + if created_at_after is not None: + if isinstance(created_at_after, datetime): + _query_params.append( + ( + 'created_at_after', + created_at_after.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('created_at_after', created_at_after)) + + if created_at_before is not None: + if isinstance(created_at_before, datetime): + _query_params.append( + ( + 'created_at_before', + created_at_before.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('created_at_before', created_at_before)) + + if started_at_after is not None: + if isinstance(started_at_after, datetime): + _query_params.append( + ( + 'started_at_after', + started_at_after.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('started_at_after', started_at_after)) + + if started_at_before is not None: + if isinstance(started_at_before, datetime): + _query_params.append( + ( + 'started_at_before', + started_at_before.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('started_at_before', started_at_before)) + + if ended_at_after is not None: + if isinstance(ended_at_after, datetime): + _query_params.append( + ( + 'ended_at_after', + ended_at_after.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('ended_at_after', ended_at_after)) + + if ended_at_before is not None: + if isinstance(ended_at_before, datetime): + _query_params.append( + ( + 'ended_at_before', + ended_at_before.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('ended_at_before', ended_at_before)) + + if stopped_at_after is not None: + if isinstance(stopped_at_after, datetime): + _query_params.append( + ( + 'stopped_at_after', + stopped_at_after.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('stopped_at_after', stopped_at_after)) + + if stopped_at_before is not None: + if isinstance(stopped_at_before, datetime): + _query_params.append( + ( + 'stopped_at_before', + stopped_at_before.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('stopped_at_before', stopped_at_before)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/campaigns', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def review_campaign_items( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + review_campaign_items_info: ReviewCampaignItemsInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ReviewCampaignItemsResponse: + """Submit campaign item review decisions + + Submits one or more review decisions for campaign item reviews assigned to the authenticated user. Mirrors the GraphQL `reviewCampaignItems` mutation. Each decision targets a `campaign_item_review_id` that must belong to this campaign and be assigned to the caller. Supported decisions are `APPROVED`, `REVOKED`, `CHANGE_ROLE`, and `REASSIGNED`. For `CHANGE_ROLE`, `access_level_remote_id` is required. For `REASSIGNED`, either supply `new_reviewer_user_ids` (manual) or an `assignment_source` preset (`PRINCIPAL_MANAGER` / `ASSET_ADMIN_OWNER`). Reassignment also requires the campaign configuration flag `allow_reviewer_reassignment` to be enabled. When the campaign uses `revoke_on: ACTION`, `REVOKED` decisions revoke access immediately. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param review_campaign_items_info: (required) + :type review_campaign_items_info: ReviewCampaignItemsInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._review_campaign_items_serialize( + campaign_id=campaign_id, + review_campaign_items_info=review_campaign_items_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ReviewCampaignItemsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def review_campaign_items_with_http_info( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + review_campaign_items_info: ReviewCampaignItemsInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ReviewCampaignItemsResponse]: + """Submit campaign item review decisions + + Submits one or more review decisions for campaign item reviews assigned to the authenticated user. Mirrors the GraphQL `reviewCampaignItems` mutation. Each decision targets a `campaign_item_review_id` that must belong to this campaign and be assigned to the caller. Supported decisions are `APPROVED`, `REVOKED`, `CHANGE_ROLE`, and `REASSIGNED`. For `CHANGE_ROLE`, `access_level_remote_id` is required. For `REASSIGNED`, either supply `new_reviewer_user_ids` (manual) or an `assignment_source` preset (`PRINCIPAL_MANAGER` / `ASSET_ADMIN_OWNER`). Reassignment also requires the campaign configuration flag `allow_reviewer_reassignment` to be enabled. When the campaign uses `revoke_on: ACTION`, `REVOKED` decisions revoke access immediately. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param review_campaign_items_info: (required) + :type review_campaign_items_info: ReviewCampaignItemsInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._review_campaign_items_serialize( + campaign_id=campaign_id, + review_campaign_items_info=review_campaign_items_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ReviewCampaignItemsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def review_campaign_items_without_preload_content( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + review_campaign_items_info: ReviewCampaignItemsInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Submit campaign item review decisions + + Submits one or more review decisions for campaign item reviews assigned to the authenticated user. Mirrors the GraphQL `reviewCampaignItems` mutation. Each decision targets a `campaign_item_review_id` that must belong to this campaign and be assigned to the caller. Supported decisions are `APPROVED`, `REVOKED`, `CHANGE_ROLE`, and `REASSIGNED`. For `CHANGE_ROLE`, `access_level_remote_id` is required. For `REASSIGNED`, either supply `new_reviewer_user_ids` (manual) or an `assignment_source` preset (`PRINCIPAL_MANAGER` / `ASSET_ADMIN_OWNER`). Reassignment also requires the campaign configuration flag `allow_reviewer_reassignment` to be enabled. When the campaign uses `revoke_on: ACTION`, `REVOKED` decisions revoke access immediately. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param review_campaign_items_info: (required) + :type review_campaign_items_info: ReviewCampaignItemsInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._review_campaign_items_serialize( + campaign_id=campaign_id, + review_campaign_items_info=review_campaign_items_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ReviewCampaignItemsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _review_campaign_items_serialize( + self, + campaign_id, + review_campaign_items_info, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if campaign_id is not None: + _path_params['campaign_id'] = campaign_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if review_campaign_items_info is not None: + _body_params = review_campaign_items_info + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/campaigns/{campaign_id}/reviews', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def start_campaign( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Campaign: + """Start campaign + + Starts a draft campaign immediately, setting `started_at` and `started_by_user_id`. Returns 400 if the campaign is not in draft state, or if it is a recurring template (`is_template: true`) — templates spawn draft campaigns on their schedule and cannot be started directly. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_campaign_serialize( + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def start_campaign_with_http_info( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Campaign]: + """Start campaign + + Starts a draft campaign immediately, setting `started_at` and `started_by_user_id`. Returns 400 if the campaign is not in draft state, or if it is a recurring template (`is_template: true`) — templates spawn draft campaigns on their schedule and cannot be started directly. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_campaign_serialize( + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def start_campaign_without_preload_content( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start campaign + + Starts a draft campaign immediately, setting `started_at` and `started_by_user_id`. Returns 400 if the campaign is not in draft state, or if it is a recurring template (`is_template: true`) — templates spawn draft campaigns on their schedule and cannot be started directly. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_campaign_serialize( + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _start_campaign_serialize( + self, + campaign_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if campaign_id is not None: + _path_params['campaign_id'] = campaign_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/campaigns/{campaign_id}/start', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def stop_campaign( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + stop_campaign_request: Optional[StopCampaignRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Campaign: + """Stop campaign + + Stops an ongoing campaign immediately, setting `stopped_at` and `stopped_by_user_id`. Returns 400 if the campaign has not started or has already stopped. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param stop_campaign_request: + :type stop_campaign_request: StopCampaignRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._stop_campaign_serialize( + campaign_id=campaign_id, + stop_campaign_request=stop_campaign_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def stop_campaign_with_http_info( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + stop_campaign_request: Optional[StopCampaignRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Campaign]: + """Stop campaign + + Stops an ongoing campaign immediately, setting `stopped_at` and `stopped_by_user_id`. Returns 400 if the campaign has not started or has already stopped. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param stop_campaign_request: + :type stop_campaign_request: StopCampaignRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._stop_campaign_serialize( + campaign_id=campaign_id, + stop_campaign_request=stop_campaign_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def stop_campaign_without_preload_content( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + stop_campaign_request: Optional[StopCampaignRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Stop campaign + + Stops an ongoing campaign immediately, setting `stopped_at` and `stopped_by_user_id`. Returns 400 if the campaign has not started or has already stopped. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param stop_campaign_request: + :type stop_campaign_request: StopCampaignRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._stop_campaign_serialize( + campaign_id=campaign_id, + stop_campaign_request=stop_campaign_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _stop_campaign_serialize( + self, + campaign_id, + stop_campaign_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if campaign_id is not None: + _path_params['campaign_id'] = campaign_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if stop_campaign_request is not None: + _body_params = stop_campaign_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/campaigns/{campaign_id}/stop', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_campaign( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + update_campaign_info: UpdateCampaignInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Campaign: + """Update campaign + + Partially updates a campaign. Omitted fields are left unchanged. `configuration.query` and `configuration.reviewer_assignment_policy` cannot be updated after create; including either field returns 400. `configuration.cron_expression` and `configuration.recurring_duration_days` may only be set on template campaigns; setting them on a one-off campaign returns 400. `configuration.is_template` is immutable and not accepted on update. Configuration updates on a stopped or ended (non-template) campaign return 400. Name-only updates are still allowed. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param update_campaign_info: (required) + :type update_campaign_info: UpdateCampaignInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_campaign_serialize( + campaign_id=campaign_id, + update_campaign_info=update_campaign_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_campaign_with_http_info( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + update_campaign_info: UpdateCampaignInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Campaign]: + """Update campaign + + Partially updates a campaign. Omitted fields are left unchanged. `configuration.query` and `configuration.reviewer_assignment_policy` cannot be updated after create; including either field returns 400. `configuration.cron_expression` and `configuration.recurring_duration_days` may only be set on template campaigns; setting them on a one-off campaign returns 400. `configuration.is_template` is immutable and not accepted on update. Configuration updates on a stopped or ended (non-template) campaign return 400. Name-only updates are still allowed. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param update_campaign_info: (required) + :type update_campaign_info: UpdateCampaignInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_campaign_serialize( + campaign_id=campaign_id, + update_campaign_info=update_campaign_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_campaign_without_preload_content( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + update_campaign_info: UpdateCampaignInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update campaign + + Partially updates a campaign. Omitted fields are left unchanged. `configuration.query` and `configuration.reviewer_assignment_policy` cannot be updated after create; including either field returns 400. `configuration.cron_expression` and `configuration.recurring_duration_days` may only be set on template campaigns; setting them on a one-off campaign returns 400. `configuration.is_template` is immutable and not accepted on update. Configuration updates on a stopped or ended (non-template) campaign return 400. Name-only updates are still allowed. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param update_campaign_info: (required) + :type update_campaign_info: UpdateCampaignInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_campaign_serialize( + campaign_id=campaign_id, + update_campaign_info=update_campaign_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Campaign", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_campaign_serialize( + self, + campaign_id, + update_campaign_info, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if campaign_id is not None: + _path_params['campaign_id'] = campaign_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_campaign_info is not None: + _body_params = update_campaign_info + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/campaigns/{campaign_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_campaign_item_reviewers( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + update_campaign_item_reviewers_info: UpdateCampaignItemReviewersInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UpdateCampaignItemReviewersResult: + """Update campaign item reviewers + + Atomically assigns and unassigns reviewers on campaign items in one request. All `campaign_item_id`s must belong to `{campaign_id}`. Existing assign pairs are ignored; missing unassign pairs are skipped. Completed reviews (`decided_at` set) are never removed. Requires settings-edit permission. Returns 400 if the campaign has ended. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param update_campaign_item_reviewers_info: (required) + :type update_campaign_item_reviewers_info: UpdateCampaignItemReviewersInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_campaign_item_reviewers_serialize( + campaign_id=campaign_id, + update_campaign_item_reviewers_info=update_campaign_item_reviewers_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UpdateCampaignItemReviewersResult", + '400': None, + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_campaign_item_reviewers_with_http_info( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + update_campaign_item_reviewers_info: UpdateCampaignItemReviewersInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UpdateCampaignItemReviewersResult]: + """Update campaign item reviewers + + Atomically assigns and unassigns reviewers on campaign items in one request. All `campaign_item_id`s must belong to `{campaign_id}`. Existing assign pairs are ignored; missing unassign pairs are skipped. Completed reviews (`decided_at` set) are never removed. Requires settings-edit permission. Returns 400 if the campaign has ended. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param update_campaign_item_reviewers_info: (required) + :type update_campaign_item_reviewers_info: UpdateCampaignItemReviewersInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_campaign_item_reviewers_serialize( + campaign_id=campaign_id, + update_campaign_item_reviewers_info=update_campaign_item_reviewers_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UpdateCampaignItemReviewersResult", + '400': None, + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_campaign_item_reviewers_without_preload_content( + self, + campaign_id: Annotated[UUID, Field(description="The ID of the campaign.")], + update_campaign_item_reviewers_info: UpdateCampaignItemReviewersInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update campaign item reviewers + + Atomically assigns and unassigns reviewers on campaign items in one request. All `campaign_item_id`s must belong to `{campaign_id}`. Existing assign pairs are ignored; missing unassign pairs are skipped. Completed reviews (`decided_at` set) are never removed. Requires settings-edit permission. Returns 400 if the campaign has ended. + + :param campaign_id: The ID of the campaign. (required) + :type campaign_id: UUID + :param update_campaign_item_reviewers_info: (required) + :type update_campaign_item_reviewers_info: UpdateCampaignItemReviewersInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_campaign_item_reviewers_serialize( + campaign_id=campaign_id, + update_campaign_item_reviewers_info=update_campaign_item_reviewers_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UpdateCampaignItemReviewersResult", + '400': None, + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_campaign_item_reviewers_serialize( + self, + campaign_id, + update_campaign_item_reviewers_info, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if campaign_id is not None: + _path_params['campaign_id'] = campaign_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_campaign_item_reviewers_info is not None: + _body_params = update_campaign_item_reviewers_info + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/campaigns/{campaign_id}/item-reviewers', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/opal_security/api/groups_api.py b/opal_security/api/groups_api.py index 37436ce..327d97d 100644 --- a/opal_security/api/groups_api.py +++ b/opal_security/api/groups_api.py @@ -17,7 +17,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr +from pydantic import Field, StrictBool, StrictStr from typing import List, Optional from typing_extensions import Annotated from uuid import UUID @@ -25,8 +25,11 @@ from opal_security.models.add_group_user_request import AddGroupUserRequest from opal_security.models.create_group_info import CreateGroupInfo from opal_security.models.group import Group +from opal_security.models.group_access_level_list import GroupAccessLevelList +from opal_security.models.group_configuration_template import GroupConfigurationTemplate from opal_security.models.group_containing_group import GroupContainingGroup from opal_security.models.group_containing_group_list import GroupContainingGroupList +from opal_security.models.group_member_group_list import GroupMemberGroupList from opal_security.models.group_resource import GroupResource from opal_security.models.group_resource_list import GroupResourceList from opal_security.models.group_type_enum import GroupTypeEnum @@ -34,6 +37,7 @@ from opal_security.models.group_user_list import GroupUserList from opal_security.models.message_channel_id_list import MessageChannelIDList from opal_security.models.message_channel_list import MessageChannelList +from opal_security.models.name_match_type import NameMatchType from opal_security.models.on_call_schedule_id_list import OnCallScheduleIDList from opal_security.models.on_call_schedule_list import OnCallScheduleList from opal_security.models.paginated_groups_list import PaginatedGroupsList @@ -679,7 +683,7 @@ def add_group_user( self, group_id: Annotated[UUID, Field(description="The ID of the group.")], user_id: Annotated[UUID, Field(description="The ID of the user to add.")], - duration_minutes: Annotated[Optional[Annotated[int, Field(le=525960, strict=True)]], Field(description="The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite.")] = None, + duration_minutes: Annotated[Optional[Annotated[int, Field(le=153722867, strict=True)]], Field(description="The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite.")] = None, access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used.")] = None, add_group_user_request: Optional[AddGroupUserRequest] = None, _request_timeout: Union[ @@ -762,7 +766,7 @@ def add_group_user_with_http_info( self, group_id: Annotated[UUID, Field(description="The ID of the group.")], user_id: Annotated[UUID, Field(description="The ID of the user to add.")], - duration_minutes: Annotated[Optional[Annotated[int, Field(le=525960, strict=True)]], Field(description="The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite.")] = None, + duration_minutes: Annotated[Optional[Annotated[int, Field(le=153722867, strict=True)]], Field(description="The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite.")] = None, access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used.")] = None, add_group_user_request: Optional[AddGroupUserRequest] = None, _request_timeout: Union[ @@ -845,7 +849,7 @@ def add_group_user_without_preload_content( self, group_id: Annotated[UUID, Field(description="The ID of the group.")], user_id: Annotated[UUID, Field(description="The ID of the user to add.")], - duration_minutes: Annotated[Optional[Annotated[int, Field(le=525960, strict=True)]], Field(description="The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite.")] = None, + duration_minutes: Annotated[Optional[Annotated[int, Field(le=153722867, strict=True)]], Field(description="The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite.")] = None, access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used.")] = None, add_group_user_request: Optional[AddGroupUserRequest] = None, _request_timeout: Union[ @@ -2087,6 +2091,537 @@ def _get_group_serialize( + @validate_call + def get_group_access_levels( + self, + group_id: Annotated[UUID, Field(description="The ID of the group whose access levels to return.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GroupAccessLevelList: + """Get group access levels + + Returns the list of access levels defined for the group. Groups that only offer default (unnamed) access return an empty list. + + :param group_id: The ID of the group whose access levels to return. (required) + :type group_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_access_levels_serialize( + group_id=group_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupAccessLevelList", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_group_access_levels_with_http_info( + self, + group_id: Annotated[UUID, Field(description="The ID of the group whose access levels to return.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GroupAccessLevelList]: + """Get group access levels + + Returns the list of access levels defined for the group. Groups that only offer default (unnamed) access return an empty list. + + :param group_id: The ID of the group whose access levels to return. (required) + :type group_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_access_levels_serialize( + group_id=group_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupAccessLevelList", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_group_access_levels_without_preload_content( + self, + group_id: Annotated[UUID, Field(description="The ID of the group whose access levels to return.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get group access levels + + Returns the list of access levels defined for the group. Groups that only offer default (unnamed) access return an empty list. + + :param group_id: The ID of the group whose access levels to return. (required) + :type group_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_access_levels_serialize( + group_id=group_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupAccessLevelList", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_group_access_levels_serialize( + self, + group_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group_id is not None: + _path_params['group_id'] = group_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups/{group_id}/access_levels', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_group_configuration_template( + self, + group_id: Annotated[UUID, Field(description="The ID of the group whose configuration template link is being read.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GroupConfigurationTemplate: + """Get the ID of the configuration template linked to a group + + Returns the ID of the configuration template that the group is currently linked to. The response body is `{\"configuration_template_id\": \"\" | null}`: * `` is the ID of the configuration template the group is linked to. * `null` means the group is not linked to any configuration template and uses its own private configuration. This endpoint only exposes the link between a group and a configuration template — it does not return the template's own fields (name, description, request configurations, visibility, etc.). To read those, call `GET /configuration-templates/{configuration_template_id}` with the ID returned here. + + :param group_id: The ID of the group whose configuration template link is being read. (required) + :type group_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_configuration_template_serialize( + group_id=group_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupConfigurationTemplate", + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_group_configuration_template_with_http_info( + self, + group_id: Annotated[UUID, Field(description="The ID of the group whose configuration template link is being read.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GroupConfigurationTemplate]: + """Get the ID of the configuration template linked to a group + + Returns the ID of the configuration template that the group is currently linked to. The response body is `{\"configuration_template_id\": \"\" | null}`: * `` is the ID of the configuration template the group is linked to. * `null` means the group is not linked to any configuration template and uses its own private configuration. This endpoint only exposes the link between a group and a configuration template — it does not return the template's own fields (name, description, request configurations, visibility, etc.). To read those, call `GET /configuration-templates/{configuration_template_id}` with the ID returned here. + + :param group_id: The ID of the group whose configuration template link is being read. (required) + :type group_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_configuration_template_serialize( + group_id=group_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupConfigurationTemplate", + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_group_configuration_template_without_preload_content( + self, + group_id: Annotated[UUID, Field(description="The ID of the group whose configuration template link is being read.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the ID of the configuration template linked to a group + + Returns the ID of the configuration template that the group is currently linked to. The response body is `{\"configuration_template_id\": \"\" | null}`: * `` is the ID of the configuration template the group is linked to. * `null` means the group is not linked to any configuration template and uses its own private configuration. This endpoint only exposes the link between a group and a configuration template — it does not return the template's own fields (name, description, request configurations, visibility, etc.). To read those, call `GET /configuration-templates/{configuration_template_id}` with the ID returned here. + + :param group_id: The ID of the group whose configuration template link is being read. (required) + :type group_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_configuration_template_serialize( + group_id=group_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupConfigurationTemplate", + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_group_configuration_template_serialize( + self, + group_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group_id is not None: + _path_params['group_id'] = group_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups/{group_id}/configuration-template', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_group_containing_group( self, @@ -2641,6 +3176,273 @@ def _get_group_containing_groups_serialize( + @validate_call + def get_group_groups( + self, + group_id: Annotated[UUID, Field(description="The ID of the group.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GroupMemberGroupList: + """Get member groups + + Gets the list of groups that are nested directly in the group (its member groups). + + :param group_id: The ID of the group. (required) + :type group_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_groups_serialize( + group_id=group_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupMemberGroupList", + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_group_groups_with_http_info( + self, + group_id: Annotated[UUID, Field(description="The ID of the group.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GroupMemberGroupList]: + """Get member groups + + Gets the list of groups that are nested directly in the group (its member groups). + + :param group_id: The ID of the group. (required) + :type group_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_groups_serialize( + group_id=group_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupMemberGroupList", + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_group_groups_without_preload_content( + self, + group_id: Annotated[UUID, Field(description="The ID of the group.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get member groups + + Gets the list of groups that are nested directly in the group (its member groups). + + :param group_id: The ID of the group. (required) + :type group_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_group_groups_serialize( + group_id=group_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupMemberGroupList", + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_group_groups_serialize( + self, + group_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group_id is not None: + _path_params['group_id'] = group_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/groups/{group_id}/groups', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_group_message_channels( self, @@ -4218,7 +5020,7 @@ def get_group_users( self, group_id: Annotated[UUID, Field(description="The ID of the group.")], cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page, up to 1000. When set (or when a cursor is provided), the response contains a single page of results and a `next` cursor; the default page size is 200. When both page_size and cursor are omitted, the entire group membership is returned in one response with no `next` cursor. For large groups, prefer setting page_size and following `next`.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4240,7 +5042,7 @@ def get_group_users( :type group_id: UUID :param cursor: The pagination cursor value. :type cursor: str - :param page_size: Number of results to return per page. Default is 200. + :param page_size: Number of results to return per page, up to 1000. When set (or when a cursor is provided), the response contains a single page of results and a `next` cursor; the default page size is 200. When both page_size and cursor are omitted, the entire group membership is returned in one response with no `next` cursor. For large groups, prefer setting page_size and following `next`. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4293,7 +5095,7 @@ def get_group_users_with_http_info( self, group_id: Annotated[UUID, Field(description="The ID of the group.")], cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page, up to 1000. When set (or when a cursor is provided), the response contains a single page of results and a `next` cursor; the default page size is 200. When both page_size and cursor are omitted, the entire group membership is returned in one response with no `next` cursor. For large groups, prefer setting page_size and following `next`.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4315,7 +5117,7 @@ def get_group_users_with_http_info( :type group_id: UUID :param cursor: The pagination cursor value. :type cursor: str - :param page_size: Number of results to return per page. Default is 200. + :param page_size: Number of results to return per page, up to 1000. When set (or when a cursor is provided), the response contains a single page of results and a `next` cursor; the default page size is 200. When both page_size and cursor are omitted, the entire group membership is returned in one response with no `next` cursor. For large groups, prefer setting page_size and following `next`. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4368,7 +5170,7 @@ def get_group_users_without_preload_content( self, group_id: Annotated[UUID, Field(description="The ID of the group.")], cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page, up to 1000. When set (or when a cursor is provided), the response contains a single page of results and a `next` cursor; the default page size is 200. When both page_size and cursor are omitted, the entire group membership is returned in one response with no `next` cursor. For large groups, prefer setting page_size and following `next`.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4390,7 +5192,7 @@ def get_group_users_without_preload_content( :type group_id: UUID :param cursor: The pagination cursor value. :type cursor: str - :param page_size: Number of results to return per page. Default is 200. + :param page_size: Number of results to return per page, up to 1000. When set (or when a cursor is provided), the response contains a single page of results and a `next` cursor; the default page size is 200. When both page_size and cursor are omitted, the entire group membership is returned in one response with no `next` cursor. For large groups, prefer setting page_size and following `next`. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4563,6 +5365,7 @@ def get_group_visibility( _response_types_map: Dict[str, Optional[str]] = { '200': "VisibilityInfo", + '403': None, } response_data = self.api_client.call_api( *_param, @@ -4630,6 +5433,7 @@ def get_group_visibility_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "VisibilityInfo", + '403': None, } response_data = self.api_client.call_api( *_param, @@ -4697,6 +5501,7 @@ def get_group_visibility_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "VisibilityInfo", + '403': None, } response_data = self.api_client.call_api( *_param, @@ -4774,10 +5579,13 @@ def get_groups( self, cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, - group_type_filter: Annotated[Optional[GroupTypeEnum], Field(description="The group type to filter by.")] = None, + group_type_filter: Annotated[Optional[GroupTypeEnum], Field(description="The group type to filter by. Required when remote_id is provided.")] = None, group_ids: Annotated[Optional[List[UUID]], Field(description="The group ids to filter by.")] = None, - group_name: Annotated[Optional[StrictStr], Field(description="Group name.")] = None, + group_name: Annotated[Optional[StrictStr], Field(description="Filter groups by name. Matches against both `name` and `remote_name`. Matching is case-insensitive. Use `group_name_match` to choose the match type; when omitted, CONTAINS (substring) is used.")] = None, + group_name_match: Annotated[Optional[NameMatchType], Field(description="How to apply `group_name`. Requires `group_name` to be set. Defaults to CONTAINS when `group_name` is provided without this parameter.")] = None, + remote_id: Annotated[Optional[StrictStr], Field(description="Filter groups by their remote id. Returns groups whose remote id matches the provided value exactly. Requires group_type_filter. Remote ids are only unique within a connection, so groups from different connections can share a remote id and more than one group may be returned. Unmanaged groups are not returned.")] = None, tag_ids: Annotated[Optional[List[UUID]], Field(description="The IDs of the tags to filter by. Returns only groups that have any of these tags applied.")] = None, + requestable: Annotated[Optional[StrictBool], Field(description="If true, only return groups that allow access requests. Does not check whether the caller is permitted to request the group.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4799,14 +5607,20 @@ def get_groups( :type cursor: str :param page_size: Number of results to return per page. Default is 200. :type page_size: int - :param group_type_filter: The group type to filter by. + :param group_type_filter: The group type to filter by. Required when remote_id is provided. :type group_type_filter: GroupTypeEnum :param group_ids: The group ids to filter by. :type group_ids: List[UUID] - :param group_name: Group name. + :param group_name: Filter groups by name. Matches against both `name` and `remote_name`. Matching is case-insensitive. Use `group_name_match` to choose the match type; when omitted, CONTAINS (substring) is used. :type group_name: str + :param group_name_match: How to apply `group_name`. Requires `group_name` to be set. Defaults to CONTAINS when `group_name` is provided without this parameter. + :type group_name_match: NameMatchType + :param remote_id: Filter groups by their remote id. Returns groups whose remote id matches the provided value exactly. Requires group_type_filter. Remote ids are only unique within a connection, so groups from different connections can share a remote id and more than one group may be returned. Unmanaged groups are not returned. + :type remote_id: str :param tag_ids: The IDs of the tags to filter by. Returns only groups that have any of these tags applied. :type tag_ids: List[UUID] + :param requestable: If true, only return groups that allow access requests. Does not check whether the caller is permitted to request the group. + :type requestable: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4835,7 +5649,10 @@ def get_groups( group_type_filter=group_type_filter, group_ids=group_ids, group_name=group_name, + group_name_match=group_name_match, + remote_id=remote_id, tag_ids=tag_ids, + requestable=requestable, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4861,10 +5678,13 @@ def get_groups_with_http_info( self, cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, - group_type_filter: Annotated[Optional[GroupTypeEnum], Field(description="The group type to filter by.")] = None, + group_type_filter: Annotated[Optional[GroupTypeEnum], Field(description="The group type to filter by. Required when remote_id is provided.")] = None, group_ids: Annotated[Optional[List[UUID]], Field(description="The group ids to filter by.")] = None, - group_name: Annotated[Optional[StrictStr], Field(description="Group name.")] = None, + group_name: Annotated[Optional[StrictStr], Field(description="Filter groups by name. Matches against both `name` and `remote_name`. Matching is case-insensitive. Use `group_name_match` to choose the match type; when omitted, CONTAINS (substring) is used.")] = None, + group_name_match: Annotated[Optional[NameMatchType], Field(description="How to apply `group_name`. Requires `group_name` to be set. Defaults to CONTAINS when `group_name` is provided without this parameter.")] = None, + remote_id: Annotated[Optional[StrictStr], Field(description="Filter groups by their remote id. Returns groups whose remote id matches the provided value exactly. Requires group_type_filter. Remote ids are only unique within a connection, so groups from different connections can share a remote id and more than one group may be returned. Unmanaged groups are not returned.")] = None, tag_ids: Annotated[Optional[List[UUID]], Field(description="The IDs of the tags to filter by. Returns only groups that have any of these tags applied.")] = None, + requestable: Annotated[Optional[StrictBool], Field(description="If true, only return groups that allow access requests. Does not check whether the caller is permitted to request the group.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4886,14 +5706,20 @@ def get_groups_with_http_info( :type cursor: str :param page_size: Number of results to return per page. Default is 200. :type page_size: int - :param group_type_filter: The group type to filter by. + :param group_type_filter: The group type to filter by. Required when remote_id is provided. :type group_type_filter: GroupTypeEnum :param group_ids: The group ids to filter by. :type group_ids: List[UUID] - :param group_name: Group name. + :param group_name: Filter groups by name. Matches against both `name` and `remote_name`. Matching is case-insensitive. Use `group_name_match` to choose the match type; when omitted, CONTAINS (substring) is used. :type group_name: str + :param group_name_match: How to apply `group_name`. Requires `group_name` to be set. Defaults to CONTAINS when `group_name` is provided without this parameter. + :type group_name_match: NameMatchType + :param remote_id: Filter groups by their remote id. Returns groups whose remote id matches the provided value exactly. Requires group_type_filter. Remote ids are only unique within a connection, so groups from different connections can share a remote id and more than one group may be returned. Unmanaged groups are not returned. + :type remote_id: str :param tag_ids: The IDs of the tags to filter by. Returns only groups that have any of these tags applied. :type tag_ids: List[UUID] + :param requestable: If true, only return groups that allow access requests. Does not check whether the caller is permitted to request the group. + :type requestable: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4922,7 +5748,10 @@ def get_groups_with_http_info( group_type_filter=group_type_filter, group_ids=group_ids, group_name=group_name, + group_name_match=group_name_match, + remote_id=remote_id, tag_ids=tag_ids, + requestable=requestable, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4948,10 +5777,13 @@ def get_groups_without_preload_content( self, cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, - group_type_filter: Annotated[Optional[GroupTypeEnum], Field(description="The group type to filter by.")] = None, + group_type_filter: Annotated[Optional[GroupTypeEnum], Field(description="The group type to filter by. Required when remote_id is provided.")] = None, group_ids: Annotated[Optional[List[UUID]], Field(description="The group ids to filter by.")] = None, - group_name: Annotated[Optional[StrictStr], Field(description="Group name.")] = None, + group_name: Annotated[Optional[StrictStr], Field(description="Filter groups by name. Matches against both `name` and `remote_name`. Matching is case-insensitive. Use `group_name_match` to choose the match type; when omitted, CONTAINS (substring) is used.")] = None, + group_name_match: Annotated[Optional[NameMatchType], Field(description="How to apply `group_name`. Requires `group_name` to be set. Defaults to CONTAINS when `group_name` is provided without this parameter.")] = None, + remote_id: Annotated[Optional[StrictStr], Field(description="Filter groups by their remote id. Returns groups whose remote id matches the provided value exactly. Requires group_type_filter. Remote ids are only unique within a connection, so groups from different connections can share a remote id and more than one group may be returned. Unmanaged groups are not returned.")] = None, tag_ids: Annotated[Optional[List[UUID]], Field(description="The IDs of the tags to filter by. Returns only groups that have any of these tags applied.")] = None, + requestable: Annotated[Optional[StrictBool], Field(description="If true, only return groups that allow access requests. Does not check whether the caller is permitted to request the group.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4973,14 +5805,20 @@ def get_groups_without_preload_content( :type cursor: str :param page_size: Number of results to return per page. Default is 200. :type page_size: int - :param group_type_filter: The group type to filter by. + :param group_type_filter: The group type to filter by. Required when remote_id is provided. :type group_type_filter: GroupTypeEnum :param group_ids: The group ids to filter by. :type group_ids: List[UUID] - :param group_name: Group name. + :param group_name: Filter groups by name. Matches against both `name` and `remote_name`. Matching is case-insensitive. Use `group_name_match` to choose the match type; when omitted, CONTAINS (substring) is used. :type group_name: str + :param group_name_match: How to apply `group_name`. Requires `group_name` to be set. Defaults to CONTAINS when `group_name` is provided without this parameter. + :type group_name_match: NameMatchType + :param remote_id: Filter groups by their remote id. Returns groups whose remote id matches the provided value exactly. Requires group_type_filter. Remote ids are only unique within a connection, so groups from different connections can share a remote id and more than one group may be returned. Unmanaged groups are not returned. + :type remote_id: str :param tag_ids: The IDs of the tags to filter by. Returns only groups that have any of these tags applied. :type tag_ids: List[UUID] + :param requestable: If true, only return groups that allow access requests. Does not check whether the caller is permitted to request the group. + :type requestable: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5009,7 +5847,10 @@ def get_groups_without_preload_content( group_type_filter=group_type_filter, group_ids=group_ids, group_name=group_name, + group_name_match=group_name_match, + remote_id=remote_id, tag_ids=tag_ids, + requestable=requestable, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5033,7 +5874,10 @@ def _get_groups_serialize( group_type_filter, group_ids, group_name, + group_name_match, + remote_id, tag_ids, + requestable, _request_auth, _content_type, _headers, @@ -5078,10 +5922,22 @@ def _get_groups_serialize( _query_params.append(('group_name', group_name)) + if group_name_match is not None: + + _query_params.append(('group_name_match', group_name_match.value)) + + if remote_id is not None: + + _query_params.append(('remote_id', remote_id)) + if tag_ids is not None: _query_params.append(('tag_ids', tag_ids)) + if requestable is not None: + + _query_params.append(('requestable', requestable)) + # process the header parameters # process the form parameters # process the body parameter @@ -7433,6 +8289,304 @@ def _set_group_visibility_serialize( + @validate_call + def update_group_configuration_template( + self, + group_id: Annotated[UUID, Field(description="The ID of the group whose configuration template link is being set.")], + group_configuration_template: GroupConfigurationTemplate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GroupConfigurationTemplate: + """Set the ID of the configuration template linked to a group + + Attaches, repoints, or detaches the configuration template linked to a group. This endpoint only manages the link (by ID) between a group and an existing configuration template — it does not create, modify, or delete the template itself. To manage a template's own fields (name, description, request configurations, visibility, etc.), use the `/configuration-templates` endpoints. The request body is `{\"configuration_template_id\": \"\" | null}`: * A `` value links the group to the configuration template with that ID. If the group was previously linked to a different template, the group is repointed in place. * `null` detaches the group from its current configuration template. The template is deep-copied into a new private configuration with the same settings so the group's current behaviour is preserved, and the group is repointed at the fork. The `configuration_template_id` field is required. Sending `{}` or any body in which the field is omitted is rejected with `400`. The call is idempotent: if the request body matches the group's current link, no changes are made and no audit events are emitted. This endpoint is the preferred, Terraform-friendly surface for linking and unlinking configuration templates on groups. The equivalent `configuration_template_id` field on `PUT /groups` remains available but is deprecated for this purpose. + + :param group_id: The ID of the group whose configuration template link is being set. (required) + :type group_id: UUID + :param group_configuration_template: (required) + :type group_configuration_template: GroupConfigurationTemplate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_group_configuration_template_serialize( + group_id=group_id, + group_configuration_template=group_configuration_template, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupConfigurationTemplate", + '400': None, + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_group_configuration_template_with_http_info( + self, + group_id: Annotated[UUID, Field(description="The ID of the group whose configuration template link is being set.")], + group_configuration_template: GroupConfigurationTemplate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GroupConfigurationTemplate]: + """Set the ID of the configuration template linked to a group + + Attaches, repoints, or detaches the configuration template linked to a group. This endpoint only manages the link (by ID) between a group and an existing configuration template — it does not create, modify, or delete the template itself. To manage a template's own fields (name, description, request configurations, visibility, etc.), use the `/configuration-templates` endpoints. The request body is `{\"configuration_template_id\": \"\" | null}`: * A `` value links the group to the configuration template with that ID. If the group was previously linked to a different template, the group is repointed in place. * `null` detaches the group from its current configuration template. The template is deep-copied into a new private configuration with the same settings so the group's current behaviour is preserved, and the group is repointed at the fork. The `configuration_template_id` field is required. Sending `{}` or any body in which the field is omitted is rejected with `400`. The call is idempotent: if the request body matches the group's current link, no changes are made and no audit events are emitted. This endpoint is the preferred, Terraform-friendly surface for linking and unlinking configuration templates on groups. The equivalent `configuration_template_id` field on `PUT /groups` remains available but is deprecated for this purpose. + + :param group_id: The ID of the group whose configuration template link is being set. (required) + :type group_id: UUID + :param group_configuration_template: (required) + :type group_configuration_template: GroupConfigurationTemplate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_group_configuration_template_serialize( + group_id=group_id, + group_configuration_template=group_configuration_template, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupConfigurationTemplate", + '400': None, + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_group_configuration_template_without_preload_content( + self, + group_id: Annotated[UUID, Field(description="The ID of the group whose configuration template link is being set.")], + group_configuration_template: GroupConfigurationTemplate, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set the ID of the configuration template linked to a group + + Attaches, repoints, or detaches the configuration template linked to a group. This endpoint only manages the link (by ID) between a group and an existing configuration template — it does not create, modify, or delete the template itself. To manage a template's own fields (name, description, request configurations, visibility, etc.), use the `/configuration-templates` endpoints. The request body is `{\"configuration_template_id\": \"\" | null}`: * A `` value links the group to the configuration template with that ID. If the group was previously linked to a different template, the group is repointed in place. * `null` detaches the group from its current configuration template. The template is deep-copied into a new private configuration with the same settings so the group's current behaviour is preserved, and the group is repointed at the fork. The `configuration_template_id` field is required. Sending `{}` or any body in which the field is omitted is rejected with `400`. The call is idempotent: if the request body matches the group's current link, no changes are made and no audit events are emitted. This endpoint is the preferred, Terraform-friendly surface for linking and unlinking configuration templates on groups. The equivalent `configuration_template_id` field on `PUT /groups` remains available but is deprecated for this purpose. + + :param group_id: The ID of the group whose configuration template link is being set. (required) + :type group_id: UUID + :param group_configuration_template: (required) + :type group_configuration_template: GroupConfigurationTemplate + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_group_configuration_template_serialize( + group_id=group_id, + group_configuration_template=group_configuration_template, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GroupConfigurationTemplate", + '400': None, + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_group_configuration_template_serialize( + self, + group_id, + group_configuration_template, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if group_id is not None: + _path_params['group_id'] = group_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if group_configuration_template is not None: + _body_params = group_configuration_template + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/groups/{group_id}/configuration-template', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_group_user( self, diff --git a/opal_security/api/opal_queries_api.py b/opal_security/api/opal_queries_api.py index e5bb1df..aca276c 100644 --- a/opal_security/api/opal_queries_api.py +++ b/opal_security/api/opal_queries_api.py @@ -17,8 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from opal_security.models.opal_node_query import OpalNodeQuery -from opal_security.models.opal_node_query_results import OpalNodeQueryResults +from opal_security.models.opal_query_results import OpalQueryResults +from opal_security.models.run_opal_query_request import RunOpalQueryRequest from opal_security.api_client import ApiClient, RequestSerialized from opal_security.api_response import ApiResponse @@ -41,7 +41,7 @@ def __init__(self, api_client=None) -> None: @validate_call def run_opal_query( self, - body: OpalNodeQuery, + run_opal_query_request: RunOpalQueryRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -54,13 +54,13 @@ def run_opal_query( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpalNodeQueryResults: + ) -> OpalQueryResults: """Run an ad-hoc OpalQuery - Runs an ad-hoc OpalQuery and returns the results. Currently supports NODE queries (users, resources, groups). This endpoint is only available to our OpalQuery beta group. Please contact Opal support if you'd like to be added to the beta. + Executes an ad-hoc OpalQuery and returns paginated results. Two query types are supported: a **Node** query filters and returns entities (users, resources, or groups); an **Access** query returns the access grants between principals and their entitlements, one per (principal, entitlement, access level). Set `type` to `NODE` or `ACCESS` in the request body to select the query type. This endpoint is available to OpalQuery beta participants. To request access, contact Opal support. - :param body: (required) - :type body: OpalNodeQuery + :param run_opal_query_request: (required) + :type run_opal_query_request: RunOpalQueryRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -84,7 +84,7 @@ def run_opal_query( """ # noqa: E501 _param = self._run_opal_query_serialize( - body=body, + run_opal_query_request=run_opal_query_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -92,7 +92,7 @@ def run_opal_query( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OpalNodeQueryResults", + '200': "OpalQueryResults", } response_data = self.api_client.call_api( *_param, @@ -108,7 +108,7 @@ def run_opal_query( @validate_call def run_opal_query_with_http_info( self, - body: OpalNodeQuery, + run_opal_query_request: RunOpalQueryRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -121,13 +121,13 @@ def run_opal_query_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpalNodeQueryResults]: + ) -> ApiResponse[OpalQueryResults]: """Run an ad-hoc OpalQuery - Runs an ad-hoc OpalQuery and returns the results. Currently supports NODE queries (users, resources, groups). This endpoint is only available to our OpalQuery beta group. Please contact Opal support if you'd like to be added to the beta. + Executes an ad-hoc OpalQuery and returns paginated results. Two query types are supported: a **Node** query filters and returns entities (users, resources, or groups); an **Access** query returns the access grants between principals and their entitlements, one per (principal, entitlement, access level). Set `type` to `NODE` or `ACCESS` in the request body to select the query type. This endpoint is available to OpalQuery beta participants. To request access, contact Opal support. - :param body: (required) - :type body: OpalNodeQuery + :param run_opal_query_request: (required) + :type run_opal_query_request: RunOpalQueryRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -151,7 +151,7 @@ def run_opal_query_with_http_info( """ # noqa: E501 _param = self._run_opal_query_serialize( - body=body, + run_opal_query_request=run_opal_query_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -159,7 +159,7 @@ def run_opal_query_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OpalNodeQueryResults", + '200': "OpalQueryResults", } response_data = self.api_client.call_api( *_param, @@ -175,7 +175,7 @@ def run_opal_query_with_http_info( @validate_call def run_opal_query_without_preload_content( self, - body: OpalNodeQuery, + run_opal_query_request: RunOpalQueryRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -191,10 +191,10 @@ def run_opal_query_without_preload_content( ) -> RESTResponseType: """Run an ad-hoc OpalQuery - Runs an ad-hoc OpalQuery and returns the results. Currently supports NODE queries (users, resources, groups). This endpoint is only available to our OpalQuery beta group. Please contact Opal support if you'd like to be added to the beta. + Executes an ad-hoc OpalQuery and returns paginated results. Two query types are supported: a **Node** query filters and returns entities (users, resources, or groups); an **Access** query returns the access grants between principals and their entitlements, one per (principal, entitlement, access level). Set `type` to `NODE` or `ACCESS` in the request body to select the query type. This endpoint is available to OpalQuery beta participants. To request access, contact Opal support. - :param body: (required) - :type body: OpalNodeQuery + :param run_opal_query_request: (required) + :type run_opal_query_request: RunOpalQueryRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -218,7 +218,7 @@ def run_opal_query_without_preload_content( """ # noqa: E501 _param = self._run_opal_query_serialize( - body=body, + run_opal_query_request=run_opal_query_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -226,7 +226,7 @@ def run_opal_query_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OpalNodeQueryResults", + '200': "OpalQueryResults", } response_data = self.api_client.call_api( *_param, @@ -237,7 +237,7 @@ def run_opal_query_without_preload_content( def _run_opal_query_serialize( self, - body, + run_opal_query_request, _request_auth, _content_type, _headers, @@ -263,8 +263,8 @@ def _run_opal_query_serialize( # process the header parameters # process the form parameters # process the body parameter - if body is not None: - _body_params = body + if run_opal_query_request is not None: + _body_params = run_opal_query_request # set the HTTP header `Accept` diff --git a/opal_security/api/opal_scripts_api.py b/opal_security/api/opal_scripts_api.py new file mode 100644 index 0000000..1810f27 --- /dev/null +++ b/opal_security/api/opal_scripts_api.py @@ -0,0 +1,1628 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from uuid import UUID +from opal_security.models.create_opal_script_info import CreateOpalScriptInfo +from opal_security.models.opal_script import OpalScript +from opal_security.models.opal_script_list import OpalScriptList +from opal_security.models.update_opal_script_info import UpdateOpalScriptInfo + +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType + + +class OpalScriptsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_opal_script( + self, + create_opal_script_info: CreateOpalScriptInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OpalScript: + """Create OpalScript + + Creates a new `OpalScript`. + + :param create_opal_script_info: (required) + :type create_opal_script_info: CreateOpalScriptInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_opal_script_serialize( + create_opal_script_info=create_opal_script_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OpalScript", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_opal_script_with_http_info( + self, + create_opal_script_info: CreateOpalScriptInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OpalScript]: + """Create OpalScript + + Creates a new `OpalScript`. + + :param create_opal_script_info: (required) + :type create_opal_script_info: CreateOpalScriptInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_opal_script_serialize( + create_opal_script_info=create_opal_script_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OpalScript", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_opal_script_without_preload_content( + self, + create_opal_script_info: CreateOpalScriptInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create OpalScript + + Creates a new `OpalScript`. + + :param create_opal_script_info: (required) + :type create_opal_script_info: CreateOpalScriptInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_opal_script_serialize( + create_opal_script_info=create_opal_script_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OpalScript", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_opal_script_serialize( + self, + create_opal_script_info, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_opal_script_info is not None: + _body_params = create_opal_script_info + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/opal-scripts', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_opal_script( + self, + opal_script_id: Annotated[UUID, Field(description="The ID of the OpalScript.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete OpalScript + + Deletes an `OpalScript`, along with the service user that backs it. A script that is still named as a reviewer, or referenced by a delegation, is rejected until those references are removed. + + :param opal_script_id: The ID of the OpalScript. (required) + :type opal_script_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_opal_script_serialize( + opal_script_id=opal_script_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_opal_script_with_http_info( + self, + opal_script_id: Annotated[UUID, Field(description="The ID of the OpalScript.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete OpalScript + + Deletes an `OpalScript`, along with the service user that backs it. A script that is still named as a reviewer, or referenced by a delegation, is rejected until those references are removed. + + :param opal_script_id: The ID of the OpalScript. (required) + :type opal_script_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_opal_script_serialize( + opal_script_id=opal_script_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_opal_script_without_preload_content( + self, + opal_script_id: Annotated[UUID, Field(description="The ID of the OpalScript.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete OpalScript + + Deletes an `OpalScript`, along with the service user that backs it. A script that is still named as a reviewer, or referenced by a delegation, is rejected until those references are removed. + + :param opal_script_id: The ID of the OpalScript. (required) + :type opal_script_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_opal_script_serialize( + opal_script_id=opal_script_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_opal_script_serialize( + self, + opal_script_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if opal_script_id is not None: + _path_params['opal_script_id'] = opal_script_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/opal-scripts/{opal_script_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_opal_script( + self, + opal_script_id: Annotated[UUID, Field(description="The ID of the OpalScript.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OpalScript: + """Get OpalScript by ID + + Returns an `OpalScript` object. + + :param opal_script_id: The ID of the OpalScript. (required) + :type opal_script_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_opal_script_serialize( + opal_script_id=opal_script_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OpalScript", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_opal_script_with_http_info( + self, + opal_script_id: Annotated[UUID, Field(description="The ID of the OpalScript.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OpalScript]: + """Get OpalScript by ID + + Returns an `OpalScript` object. + + :param opal_script_id: The ID of the OpalScript. (required) + :type opal_script_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_opal_script_serialize( + opal_script_id=opal_script_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OpalScript", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_opal_script_without_preload_content( + self, + opal_script_id: Annotated[UUID, Field(description="The ID of the OpalScript.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get OpalScript by ID + + Returns an `OpalScript` object. + + :param opal_script_id: The ID of the OpalScript. (required) + :type opal_script_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_opal_script_serialize( + opal_script_id=opal_script_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OpalScript", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_opal_script_serialize( + self, + opal_script_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if opal_script_id is not None: + _path_params['opal_script_id'] = opal_script_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/opal-scripts/{opal_script_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_opal_script_from_name( + self, + opal_script_name: Annotated[StrictStr, Field(description="The name of the OpalScript.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OpalScript: + """Get OpalScript by name + + Returns the `OpalScript` whose name exactly matches the given name. OpalScript names are not unique; when more than one script matches, the request fails and the script must be referenced by ID instead. + + :param opal_script_name: The name of the OpalScript. (required) + :type opal_script_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_opal_script_from_name_serialize( + opal_script_name=opal_script_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OpalScript", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_opal_script_from_name_with_http_info( + self, + opal_script_name: Annotated[StrictStr, Field(description="The name of the OpalScript.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OpalScript]: + """Get OpalScript by name + + Returns the `OpalScript` whose name exactly matches the given name. OpalScript names are not unique; when more than one script matches, the request fails and the script must be referenced by ID instead. + + :param opal_script_name: The name of the OpalScript. (required) + :type opal_script_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_opal_script_from_name_serialize( + opal_script_name=opal_script_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OpalScript", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_opal_script_from_name_without_preload_content( + self, + opal_script_name: Annotated[StrictStr, Field(description="The name of the OpalScript.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get OpalScript by name + + Returns the `OpalScript` whose name exactly matches the given name. OpalScript names are not unique; when more than one script matches, the request fails and the script must be referenced by ID instead. + + :param opal_script_name: The name of the OpalScript. (required) + :type opal_script_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_opal_script_from_name_serialize( + opal_script_name=opal_script_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OpalScript", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_opal_script_from_name_serialize( + self, + opal_script_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if opal_script_name is not None: + _path_params['opal_script_name'] = opal_script_name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/opal-scripts/name/{opal_script_name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_opal_scripts( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OpalScriptList: + """List OpalScripts + + Returns the `OpalScript` objects in the caller's organization. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_opal_scripts_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OpalScriptList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_opal_scripts_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OpalScriptList]: + """List OpalScripts + + Returns the `OpalScript` objects in the caller's organization. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_opal_scripts_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OpalScriptList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_opal_scripts_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List OpalScripts + + Returns the `OpalScript` objects in the caller's organization. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_opal_scripts_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OpalScriptList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_opal_scripts_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/opal-scripts', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_opal_script( + self, + opal_script_id: Annotated[UUID, Field(description="The ID of the OpalScript.")], + update_opal_script_info: UpdateOpalScriptInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OpalScript: + """Update OpalScript + + Updates an `OpalScript` object. + + :param opal_script_id: The ID of the OpalScript. (required) + :type opal_script_id: UUID + :param update_opal_script_info: (required) + :type update_opal_script_info: UpdateOpalScriptInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_opal_script_serialize( + opal_script_id=opal_script_id, + update_opal_script_info=update_opal_script_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OpalScript", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_opal_script_with_http_info( + self, + opal_script_id: Annotated[UUID, Field(description="The ID of the OpalScript.")], + update_opal_script_info: UpdateOpalScriptInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OpalScript]: + """Update OpalScript + + Updates an `OpalScript` object. + + :param opal_script_id: The ID of the OpalScript. (required) + :type opal_script_id: UUID + :param update_opal_script_info: (required) + :type update_opal_script_info: UpdateOpalScriptInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_opal_script_serialize( + opal_script_id=opal_script_id, + update_opal_script_info=update_opal_script_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OpalScript", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_opal_script_without_preload_content( + self, + opal_script_id: Annotated[UUID, Field(description="The ID of the OpalScript.")], + update_opal_script_info: UpdateOpalScriptInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update OpalScript + + Updates an `OpalScript` object. + + :param opal_script_id: The ID of the OpalScript. (required) + :type opal_script_id: UUID + :param update_opal_script_info: (required) + :type update_opal_script_info: UpdateOpalScriptInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_opal_script_serialize( + opal_script_id=opal_script_id, + update_opal_script_info=update_opal_script_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OpalScript", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_opal_script_serialize( + self, + opal_script_id, + update_opal_script_info, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if opal_script_id is not None: + _path_params['opal_script_id'] = opal_script_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_opal_script_info is not None: + _body_params = update_opal_script_info + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/opal-scripts/{opal_script_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/opal_security/api/paladin_api.py b/opal_security/api/paladin_api.py new file mode 100644 index 0000000..b5db725 --- /dev/null +++ b/opal_security/api/paladin_api.py @@ -0,0 +1,2204 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from uuid import UUID +from opal_security.models.create_paladin_context_source_info import CreatePaladinContextSourceInfo +from opal_security.models.create_paladin_info import CreatePaladinInfo +from opal_security.models.paladin import Paladin +from opal_security.models.paladin_context_source import PaladinContextSource +from opal_security.models.paladin_context_source_list import PaladinContextSourceList +from opal_security.models.paladin_list import PaladinList +from opal_security.models.update_paladin_info import UpdatePaladinInfo + +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType + + +class PaladinApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_paladin( + self, + create_paladin_info: CreatePaladinInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Paladin: + """Create Paladin + + Creates a new `Paladin`. + + :param create_paladin_info: (required) + :type create_paladin_info: CreatePaladinInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_paladin_serialize( + create_paladin_info=create_paladin_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Paladin", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_paladin_with_http_info( + self, + create_paladin_info: CreatePaladinInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Paladin]: + """Create Paladin + + Creates a new `Paladin`. + + :param create_paladin_info: (required) + :type create_paladin_info: CreatePaladinInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_paladin_serialize( + create_paladin_info=create_paladin_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Paladin", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_paladin_without_preload_content( + self, + create_paladin_info: CreatePaladinInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Paladin + + Creates a new `Paladin`. + + :param create_paladin_info: (required) + :type create_paladin_info: CreatePaladinInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_paladin_serialize( + create_paladin_info=create_paladin_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Paladin", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_paladin_serialize( + self, + create_paladin_info, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_paladin_info is not None: + _body_params = create_paladin_info + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/paladin', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_paladin_context_source( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + create_paladin_context_source_info: CreatePaladinContextSourceInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaladinContextSource: + """Add a Paladin context source + + Configures a context source (a Slack channel or a document) for a Paladin to read. Idempotent, so re-adding an existing source returns it. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param create_paladin_context_source_info: (required) + :type create_paladin_context_source_info: CreatePaladinContextSourceInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_paladin_context_source_serialize( + paladin_id=paladin_id, + create_paladin_context_source_info=create_paladin_context_source_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaladinContextSource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_paladin_context_source_with_http_info( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + create_paladin_context_source_info: CreatePaladinContextSourceInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PaladinContextSource]: + """Add a Paladin context source + + Configures a context source (a Slack channel or a document) for a Paladin to read. Idempotent, so re-adding an existing source returns it. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param create_paladin_context_source_info: (required) + :type create_paladin_context_source_info: CreatePaladinContextSourceInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_paladin_context_source_serialize( + paladin_id=paladin_id, + create_paladin_context_source_info=create_paladin_context_source_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaladinContextSource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_paladin_context_source_without_preload_content( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + create_paladin_context_source_info: CreatePaladinContextSourceInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a Paladin context source + + Configures a context source (a Slack channel or a document) for a Paladin to read. Idempotent, so re-adding an existing source returns it. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param create_paladin_context_source_info: (required) + :type create_paladin_context_source_info: CreatePaladinContextSourceInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_paladin_context_source_serialize( + paladin_id=paladin_id, + create_paladin_context_source_info=create_paladin_context_source_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaladinContextSource", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_paladin_context_source_serialize( + self, + paladin_id, + create_paladin_context_source_info, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if paladin_id is not None: + _path_params['paladin_id'] = paladin_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_paladin_context_source_info is not None: + _body_params = create_paladin_context_source_info + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/paladin/{paladin_id}/context-sources', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_paladin( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete Paladin + + Deletes a Paladin, removing the underlying service user. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_paladin_serialize( + paladin_id=paladin_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_paladin_with_http_info( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Paladin + + Deletes a Paladin, removing the underlying service user. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_paladin_serialize( + paladin_id=paladin_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_paladin_without_preload_content( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Paladin + + Deletes a Paladin, removing the underlying service user. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_paladin_serialize( + paladin_id=paladin_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_paladin_serialize( + self, + paladin_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if paladin_id is not None: + _path_params['paladin_id'] = paladin_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/paladin/{paladin_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_paladin_context_source( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + context_source_id: Annotated[UUID, Field(description="The ID of the context source.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove a Paladin context source + + Removes a context source from a Paladin. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param context_source_id: The ID of the context source. (required) + :type context_source_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_paladin_context_source_serialize( + paladin_id=paladin_id, + context_source_id=context_source_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_paladin_context_source_with_http_info( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + context_source_id: Annotated[UUID, Field(description="The ID of the context source.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove a Paladin context source + + Removes a context source from a Paladin. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param context_source_id: The ID of the context source. (required) + :type context_source_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_paladin_context_source_serialize( + paladin_id=paladin_id, + context_source_id=context_source_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_paladin_context_source_without_preload_content( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + context_source_id: Annotated[UUID, Field(description="The ID of the context source.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove a Paladin context source + + Removes a context source from a Paladin. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param context_source_id: The ID of the context source. (required) + :type context_source_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_paladin_context_source_serialize( + paladin_id=paladin_id, + context_source_id=context_source_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_paladin_context_source_serialize( + self, + paladin_id, + context_source_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if paladin_id is not None: + _path_params['paladin_id'] = paladin_id + if context_source_id is not None: + _path_params['context_source_id'] = context_source_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/paladin/{paladin_id}/context-sources/{context_source_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_paladin( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Paladin: + """Get Paladin by ID + + Returns a `Paladin` object. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_paladin_serialize( + paladin_id=paladin_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Paladin", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_paladin_with_http_info( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Paladin]: + """Get Paladin by ID + + Returns a `Paladin` object. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_paladin_serialize( + paladin_id=paladin_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Paladin", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_paladin_without_preload_content( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Paladin by ID + + Returns a `Paladin` object. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_paladin_serialize( + paladin_id=paladin_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Paladin", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_paladin_serialize( + self, + paladin_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if paladin_id is not None: + _path_params['paladin_id'] = paladin_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/paladin/{paladin_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_paladin_from_name( + self, + paladin_name: Annotated[StrictStr, Field(description="The name of the Paladin.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaladinList: + """Get Paladins by name + + Returns all Paladins whose name exactly matches the given name. Names are not unique, so the result is a list and may be empty. + + :param paladin_name: The name of the Paladin. (required) + :type paladin_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_paladin_from_name_serialize( + paladin_name=paladin_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaladinList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_paladin_from_name_with_http_info( + self, + paladin_name: Annotated[StrictStr, Field(description="The name of the Paladin.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PaladinList]: + """Get Paladins by name + + Returns all Paladins whose name exactly matches the given name. Names are not unique, so the result is a list and may be empty. + + :param paladin_name: The name of the Paladin. (required) + :type paladin_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_paladin_from_name_serialize( + paladin_name=paladin_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaladinList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_paladin_from_name_without_preload_content( + self, + paladin_name: Annotated[StrictStr, Field(description="The name of the Paladin.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Paladins by name + + Returns all Paladins whose name exactly matches the given name. Names are not unique, so the result is a list and may be empty. + + :param paladin_name: The name of the Paladin. (required) + :type paladin_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_paladin_from_name_serialize( + paladin_name=paladin_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaladinList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_paladin_from_name_serialize( + self, + paladin_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if paladin_name is not None: + _path_params['paladin_name'] = paladin_name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/paladin/name/{paladin_name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_paladin_context_sources( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaladinContextSourceList: + """List Paladin context sources + + Returns the context sources (Slack channels and documents) configured for a Paladin. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_paladin_context_sources_serialize( + paladin_id=paladin_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaladinContextSourceList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_paladin_context_sources_with_http_info( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PaladinContextSourceList]: + """List Paladin context sources + + Returns the context sources (Slack channels and documents) configured for a Paladin. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_paladin_context_sources_serialize( + paladin_id=paladin_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaladinContextSourceList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_paladin_context_sources_without_preload_content( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Paladin context sources + + Returns the context sources (Slack channels and documents) configured for a Paladin. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_paladin_context_sources_serialize( + paladin_id=paladin_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaladinContextSourceList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_paladin_context_sources_serialize( + self, + paladin_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if paladin_id is not None: + _path_params['paladin_id'] = paladin_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/paladin/{paladin_id}/context-sources', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_paladin( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + update_paladin_info: UpdatePaladinInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Paladin: + """Update Paladin + + Updates a `Paladin` object. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param update_paladin_info: (required) + :type update_paladin_info: UpdatePaladinInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_paladin_serialize( + paladin_id=paladin_id, + update_paladin_info=update_paladin_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Paladin", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_paladin_with_http_info( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + update_paladin_info: UpdatePaladinInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Paladin]: + """Update Paladin + + Updates a `Paladin` object. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param update_paladin_info: (required) + :type update_paladin_info: UpdatePaladinInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_paladin_serialize( + paladin_id=paladin_id, + update_paladin_info=update_paladin_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Paladin", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_paladin_without_preload_content( + self, + paladin_id: Annotated[UUID, Field(description="The ID of the Paladin.")], + update_paladin_info: UpdatePaladinInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Paladin + + Updates a `Paladin` object. + + :param paladin_id: The ID of the Paladin. (required) + :type paladin_id: UUID + :param update_paladin_info: (required) + :type update_paladin_info: UpdatePaladinInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_paladin_serialize( + paladin_id=paladin_id, + update_paladin_info=update_paladin_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Paladin", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_paladin_serialize( + self, + paladin_id, + update_paladin_info, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if paladin_id is not None: + _path_params['paladin_id'] = paladin_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_paladin_info is not None: + _body_params = update_paladin_info + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/paladin/{paladin_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/opal_security/api/request_templates_api.py b/opal_security/api/request_templates_api.py new file mode 100644 index 0000000..92e7a9d --- /dev/null +++ b/opal_security/api/request_templates_api.py @@ -0,0 +1,1352 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field +from typing_extensions import Annotated +from uuid import UUID +from opal_security.models.create_request_template_info import CreateRequestTemplateInfo +from opal_security.models.paginated_request_template_list import PaginatedRequestTemplateList +from opal_security.models.request_template import RequestTemplate +from opal_security.models.update_request_template_info import UpdateRequestTemplateInfo + +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType + + +class RequestTemplatesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_request_template( + self, + create_request_template_info: CreateRequestTemplateInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RequestTemplate: + """create_request_template + + Creates a request template. + + :param create_request_template_info: (required) + :type create_request_template_info: CreateRequestTemplateInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_request_template_serialize( + create_request_template_info=create_request_template_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RequestTemplate", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_request_template_with_http_info( + self, + create_request_template_info: CreateRequestTemplateInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RequestTemplate]: + """create_request_template + + Creates a request template. + + :param create_request_template_info: (required) + :type create_request_template_info: CreateRequestTemplateInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_request_template_serialize( + create_request_template_info=create_request_template_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RequestTemplate", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_request_template_without_preload_content( + self, + create_request_template_info: CreateRequestTemplateInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_request_template + + Creates a request template. + + :param create_request_template_info: (required) + :type create_request_template_info: CreateRequestTemplateInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_request_template_serialize( + create_request_template_info=create_request_template_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RequestTemplate", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_request_template_serialize( + self, + create_request_template_info, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_request_template_info is not None: + _body_params = create_request_template_info + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/request-templates', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_request_template( + self, + request_template_id: Annotated[UUID, Field(description="The ID of the request template.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_request_template + + Deletes a request template. + + :param request_template_id: The ID of the request template. (required) + :type request_template_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_request_template_serialize( + request_template_id=request_template_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_request_template_with_http_info( + self, + request_template_id: Annotated[UUID, Field(description="The ID of the request template.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_request_template + + Deletes a request template. + + :param request_template_id: The ID of the request template. (required) + :type request_template_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_request_template_serialize( + request_template_id=request_template_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_request_template_without_preload_content( + self, + request_template_id: Annotated[UUID, Field(description="The ID of the request template.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_request_template + + Deletes a request template. + + :param request_template_id: The ID of the request template. (required) + :type request_template_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_request_template_serialize( + request_template_id=request_template_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_request_template_serialize( + self, + request_template_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if request_template_id is not None: + _path_params['request_template_id'] = request_template_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/request-templates/{request_template_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_request_template( + self, + request_template_id: Annotated[UUID, Field(description="The ID of the request template.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RequestTemplate: + """get_request_template + + Returns a `RequestTemplate` object. + + :param request_template_id: The ID of the request template. (required) + :type request_template_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_request_template_serialize( + request_template_id=request_template_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RequestTemplate", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_request_template_with_http_info( + self, + request_template_id: Annotated[UUID, Field(description="The ID of the request template.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RequestTemplate]: + """get_request_template + + Returns a `RequestTemplate` object. + + :param request_template_id: The ID of the request template. (required) + :type request_template_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_request_template_serialize( + request_template_id=request_template_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RequestTemplate", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_request_template_without_preload_content( + self, + request_template_id: Annotated[UUID, Field(description="The ID of the request template.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_request_template + + Returns a `RequestTemplate` object. + + :param request_template_id: The ID of the request template. (required) + :type request_template_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_request_template_serialize( + request_template_id=request_template_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RequestTemplate", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_request_template_serialize( + self, + request_template_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if request_template_id is not None: + _path_params['request_template_id'] = request_template_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/request-templates/{request_template_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_request_templates( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginatedRequestTemplateList: + """get_request_templates + + Returns a list of `RequestTemplate` objects. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_request_templates_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedRequestTemplateList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_request_templates_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PaginatedRequestTemplateList]: + """get_request_templates + + Returns a list of `RequestTemplate` objects. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_request_templates_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedRequestTemplateList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_request_templates_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_request_templates + + Returns a list of `RequestTemplate` objects. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_request_templates_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedRequestTemplateList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_request_templates_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/request-templates', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_request_template( + self, + update_request_template_info: Annotated[UpdateRequestTemplateInfo, Field(description="Request template to be updated")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RequestTemplate: + """update_request_template + + Updates a request template. + + :param update_request_template_info: Request template to be updated (required) + :type update_request_template_info: UpdateRequestTemplateInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_request_template_serialize( + update_request_template_info=update_request_template_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RequestTemplate", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_request_template_with_http_info( + self, + update_request_template_info: Annotated[UpdateRequestTemplateInfo, Field(description="Request template to be updated")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RequestTemplate]: + """update_request_template + + Updates a request template. + + :param update_request_template_info: Request template to be updated (required) + :type update_request_template_info: UpdateRequestTemplateInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_request_template_serialize( + update_request_template_info=update_request_template_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RequestTemplate", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_request_template_without_preload_content( + self, + update_request_template_info: Annotated[UpdateRequestTemplateInfo, Field(description="Request template to be updated")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_request_template + + Updates a request template. + + :param update_request_template_info: Request template to be updated (required) + :type update_request_template_info: UpdateRequestTemplateInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_request_template_serialize( + update_request_template_info=update_request_template_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RequestTemplate", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_request_template_serialize( + self, + update_request_template_info, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_request_template_info is not None: + _body_params = update_request_template_info + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/request-templates', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/opal_security/api/requests_api.py b/opal_security/api/requests_api.py index 4de25ad..ad98f61 100644 --- a/opal_security/api/requests_api.py +++ b/opal_security/api/requests_api.py @@ -23,10 +23,12 @@ from uuid import UUID from opal_security.models.approve_request200_response import ApproveRequest200Response from opal_security.models.approve_request_request import ApproveRequestRequest +from opal_security.models.cancel_request_request import CancelRequestRequest from opal_security.models.create_request200_response import CreateRequest200Response from opal_security.models.create_request_comment_request import CreateRequestCommentRequest from opal_security.models.create_request_info import CreateRequestInfo from opal_security.models.deny_request_request import DenyRequestRequest +from opal_security.models.escalate_request200_response import EscalateRequest200Response from opal_security.models.request import Request from opal_security.models.request_comment_list import RequestCommentList from opal_security.models.request_connection import RequestConnection @@ -341,9 +343,10 @@ def _approve_request_serialize( @validate_call - def create_request( + def cancel_request( self, - create_request_info: Annotated[CreateRequestInfo, Field(description="Resources to be updated")], + id: Annotated[UUID, Field(description="The ID of the request to cancel.")], + cancel_request_request: Optional[CancelRequestRequest] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -356,13 +359,15 @@ def create_request( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreateRequest200Response: - """create_request + ) -> Request: + """Cancel request - Create an access request + Cancels a pending access request. - :param create_request_info: Resources to be updated (required) - :type create_request_info: CreateRequestInfo + :param id: The ID of the request to cancel. (required) + :type id: UUID + :param cancel_request_request: + :type cancel_request_request: CancelRequestRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -385,8 +390,9 @@ def create_request( :return: Returns the result object. """ # noqa: E501 - _param = self._create_request_serialize( - create_request_info=create_request_info, + _param = self._cancel_request_serialize( + id=id, + cancel_request_request=cancel_request_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -394,7 +400,11 @@ def create_request( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateRequest200Response", + '200': "Request", + '400': None, + '403': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -408,9 +418,10 @@ def create_request( @validate_call - def create_request_with_http_info( + def cancel_request_with_http_info( self, - create_request_info: Annotated[CreateRequestInfo, Field(description="Resources to be updated")], + id: Annotated[UUID, Field(description="The ID of the request to cancel.")], + cancel_request_request: Optional[CancelRequestRequest] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -423,13 +434,15 @@ def create_request_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CreateRequest200Response]: - """create_request + ) -> ApiResponse[Request]: + """Cancel request - Create an access request + Cancels a pending access request. - :param create_request_info: Resources to be updated (required) - :type create_request_info: CreateRequestInfo + :param id: The ID of the request to cancel. (required) + :type id: UUID + :param cancel_request_request: + :type cancel_request_request: CancelRequestRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -452,8 +465,9 @@ def create_request_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_request_serialize( - create_request_info=create_request_info, + _param = self._cancel_request_serialize( + id=id, + cancel_request_request=cancel_request_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -461,7 +475,11 @@ def create_request_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateRequest200Response", + '200': "Request", + '400': None, + '403': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -475,9 +493,10 @@ def create_request_with_http_info( @validate_call - def create_request_without_preload_content( + def cancel_request_without_preload_content( self, - create_request_info: Annotated[CreateRequestInfo, Field(description="Resources to be updated")], + id: Annotated[UUID, Field(description="The ID of the request to cancel.")], + cancel_request_request: Optional[CancelRequestRequest] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -491,12 +510,14 @@ def create_request_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """create_request + """Cancel request - Create an access request + Cancels a pending access request. - :param create_request_info: Resources to be updated (required) - :type create_request_info: CreateRequestInfo + :param id: The ID of the request to cancel. (required) + :type id: UUID + :param cancel_request_request: + :type cancel_request_request: CancelRequestRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -519,8 +540,9 @@ def create_request_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_request_serialize( - create_request_info=create_request_info, + _param = self._cancel_request_serialize( + id=id, + cancel_request_request=cancel_request_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -528,7 +550,11 @@ def create_request_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateRequest200Response", + '200': "Request", + '400': None, + '403': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -537,9 +563,10 @@ def create_request_without_preload_content( return response_data.response - def _create_request_serialize( + def _cancel_request_serialize( self, - create_request_info, + id, + cancel_request_request, _request_auth, _content_type, _headers, @@ -561,12 +588,14 @@ def _create_request_serialize( _body_params: Optional[bytes] = None # process the path parameters + if id is not None: + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_request_info is not None: - _body_params = create_request_info + if cancel_request_request is not None: + _body_params = cancel_request_request # set the HTTP header `Accept` @@ -598,7 +627,7 @@ def _create_request_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/requests', + resource_path='/requests/{id}/cancel', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -615,10 +644,9 @@ def _create_request_serialize( @validate_call - def create_request_comment( + def create_request( self, - id: Annotated[UUID, Field(description="The ID of the request to comment on")], - create_request_comment_request: Annotated[CreateRequestCommentRequest, Field(description="Comment parameters")], + create_request_info: Annotated[CreateRequestInfo, Field(description="Resources to be updated")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -631,15 +659,13 @@ def create_request_comment( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApproveRequest200Response: - """create_request_comment + ) -> CreateRequest200Response: + """create_request - Comment on an access request + Create an access request - :param id: The ID of the request to comment on (required) - :type id: UUID - :param create_request_comment_request: Comment parameters (required) - :type create_request_comment_request: CreateRequestCommentRequest + :param create_request_info: Resources to be updated (required) + :type create_request_info: CreateRequestInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -662,9 +688,8 @@ def create_request_comment( :return: Returns the result object. """ # noqa: E501 - _param = self._create_request_comment_serialize( - id=id, - create_request_comment_request=create_request_comment_request, + _param = self._create_request_serialize( + create_request_info=create_request_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -672,7 +697,7 @@ def create_request_comment( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApproveRequest200Response", + '200': "CreateRequest200Response", } response_data = self.api_client.call_api( *_param, @@ -686,10 +711,9 @@ def create_request_comment( @validate_call - def create_request_comment_with_http_info( + def create_request_with_http_info( self, - id: Annotated[UUID, Field(description="The ID of the request to comment on")], - create_request_comment_request: Annotated[CreateRequestCommentRequest, Field(description="Comment parameters")], + create_request_info: Annotated[CreateRequestInfo, Field(description="Resources to be updated")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -702,15 +726,13 @@ def create_request_comment_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApproveRequest200Response]: - """create_request_comment + ) -> ApiResponse[CreateRequest200Response]: + """create_request - Comment on an access request + Create an access request - :param id: The ID of the request to comment on (required) - :type id: UUID - :param create_request_comment_request: Comment parameters (required) - :type create_request_comment_request: CreateRequestCommentRequest + :param create_request_info: Resources to be updated (required) + :type create_request_info: CreateRequestInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -733,9 +755,8 @@ def create_request_comment_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_request_comment_serialize( - id=id, - create_request_comment_request=create_request_comment_request, + _param = self._create_request_serialize( + create_request_info=create_request_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -743,7 +764,7 @@ def create_request_comment_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApproveRequest200Response", + '200': "CreateRequest200Response", } response_data = self.api_client.call_api( *_param, @@ -757,10 +778,9 @@ def create_request_comment_with_http_info( @validate_call - def create_request_comment_without_preload_content( + def create_request_without_preload_content( self, - id: Annotated[UUID, Field(description="The ID of the request to comment on")], - create_request_comment_request: Annotated[CreateRequestCommentRequest, Field(description="Comment parameters")], + create_request_info: Annotated[CreateRequestInfo, Field(description="Resources to be updated")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -774,14 +794,12 @@ def create_request_comment_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """create_request_comment + """create_request - Comment on an access request + Create an access request - :param id: The ID of the request to comment on (required) - :type id: UUID - :param create_request_comment_request: Comment parameters (required) - :type create_request_comment_request: CreateRequestCommentRequest + :param create_request_info: Resources to be updated (required) + :type create_request_info: CreateRequestInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -804,9 +822,8 @@ def create_request_comment_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_request_comment_serialize( - id=id, - create_request_comment_request=create_request_comment_request, + _param = self._create_request_serialize( + create_request_info=create_request_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -814,7 +831,7 @@ def create_request_comment_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApproveRequest200Response", + '200': "CreateRequest200Response", } response_data = self.api_client.call_api( *_param, @@ -823,10 +840,9 @@ def create_request_comment_without_preload_content( return response_data.response - def _create_request_comment_serialize( + def _create_request_serialize( self, - id, - create_request_comment_request, + create_request_info, _request_auth, _content_type, _headers, @@ -848,14 +864,12 @@ def _create_request_comment_serialize( _body_params: Optional[bytes] = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_request_comment_request is not None: - _body_params = create_request_comment_request + if create_request_info is not None: + _body_params = create_request_info # set the HTTP header `Accept` @@ -887,7 +901,7 @@ def _create_request_comment_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/requests/{id}/comments', + resource_path='/requests', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -904,10 +918,10 @@ def _create_request_comment_serialize( @validate_call - def deny_request( + def create_request_comment( self, - id: Annotated[UUID, Field(description="The ID of the request to deny")], - deny_request_request: Annotated[DenyRequestRequest, Field(description="Denial parameters")], + id: Annotated[UUID, Field(description="The ID of the request to comment on")], + create_request_comment_request: Annotated[CreateRequestCommentRequest, Field(description="Comment parameters")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -921,14 +935,14 @@ def deny_request( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApproveRequest200Response: - """deny_request + """create_request_comment - Deny an access request + Comment on an access request - :param id: The ID of the request to deny (required) + :param id: The ID of the request to comment on (required) :type id: UUID - :param deny_request_request: Denial parameters (required) - :type deny_request_request: DenyRequestRequest + :param create_request_comment_request: Comment parameters (required) + :type create_request_comment_request: CreateRequestCommentRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -951,9 +965,9 @@ def deny_request( :return: Returns the result object. """ # noqa: E501 - _param = self._deny_request_serialize( + _param = self._create_request_comment_serialize( id=id, - deny_request_request=deny_request_request, + create_request_comment_request=create_request_comment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -975,10 +989,10 @@ def deny_request( @validate_call - def deny_request_with_http_info( + def create_request_comment_with_http_info( self, - id: Annotated[UUID, Field(description="The ID of the request to deny")], - deny_request_request: Annotated[DenyRequestRequest, Field(description="Denial parameters")], + id: Annotated[UUID, Field(description="The ID of the request to comment on")], + create_request_comment_request: Annotated[CreateRequestCommentRequest, Field(description="Comment parameters")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -992,14 +1006,14 @@ def deny_request_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ApproveRequest200Response]: - """deny_request + """create_request_comment - Deny an access request + Comment on an access request - :param id: The ID of the request to deny (required) + :param id: The ID of the request to comment on (required) :type id: UUID - :param deny_request_request: Denial parameters (required) - :type deny_request_request: DenyRequestRequest + :param create_request_comment_request: Comment parameters (required) + :type create_request_comment_request: CreateRequestCommentRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1022,9 +1036,9 @@ def deny_request_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._deny_request_serialize( + _param = self._create_request_comment_serialize( id=id, - deny_request_request=deny_request_request, + create_request_comment_request=create_request_comment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1046,10 +1060,10 @@ def deny_request_with_http_info( @validate_call - def deny_request_without_preload_content( + def create_request_comment_without_preload_content( self, - id: Annotated[UUID, Field(description="The ID of the request to deny")], - deny_request_request: Annotated[DenyRequestRequest, Field(description="Denial parameters")], + id: Annotated[UUID, Field(description="The ID of the request to comment on")], + create_request_comment_request: Annotated[CreateRequestCommentRequest, Field(description="Comment parameters")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1063,14 +1077,14 @@ def deny_request_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """deny_request + """create_request_comment - Deny an access request + Comment on an access request - :param id: The ID of the request to deny (required) + :param id: The ID of the request to comment on (required) :type id: UUID - :param deny_request_request: Denial parameters (required) - :type deny_request_request: DenyRequestRequest + :param create_request_comment_request: Comment parameters (required) + :type create_request_comment_request: CreateRequestCommentRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1093,9 +1107,9 @@ def deny_request_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._deny_request_serialize( + _param = self._create_request_comment_serialize( id=id, - deny_request_request=deny_request_request, + create_request_comment_request=create_request_comment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1112,10 +1126,10 @@ def deny_request_without_preload_content( return response_data.response - def _deny_request_serialize( + def _create_request_comment_serialize( self, id, - deny_request_request, + create_request_comment_request, _request_auth, _content_type, _headers, @@ -1143,8 +1157,8 @@ def _deny_request_serialize( # process the header parameters # process the form parameters # process the body parameter - if deny_request_request is not None: - _body_params = deny_request_request + if create_request_comment_request is not None: + _body_params = create_request_comment_request # set the HTTP header `Accept` @@ -1176,7 +1190,7 @@ def _deny_request_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/requests/{id}/deny', + resource_path='/requests/{id}/comments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1193,9 +1207,10 @@ def _deny_request_serialize( @validate_call - def get_request( + def deny_request( self, - id: Annotated[UUID, Field(description="The ID of the request.")], + id: Annotated[UUID, Field(description="The ID of the request to deny")], + deny_request_request: Annotated[DenyRequestRequest, Field(description="Denial parameters")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1208,13 +1223,15 @@ def get_request( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Request: - """Get request by ID + ) -> ApproveRequest200Response: + """deny_request - Returns a request by ID. + Deny an access request - :param id: The ID of the request. (required) + :param id: The ID of the request to deny (required) :type id: UUID + :param deny_request_request: Denial parameters (required) + :type deny_request_request: DenyRequestRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1237,8 +1254,9 @@ def get_request( :return: Returns the result object. """ # noqa: E501 - _param = self._get_request_serialize( + _param = self._deny_request_serialize( id=id, + deny_request_request=deny_request_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1246,7 +1264,7 @@ def get_request( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Request", + '200': "ApproveRequest200Response", } response_data = self.api_client.call_api( *_param, @@ -1260,9 +1278,10 @@ def get_request( @validate_call - def get_request_with_http_info( + def deny_request_with_http_info( self, - id: Annotated[UUID, Field(description="The ID of the request.")], + id: Annotated[UUID, Field(description="The ID of the request to deny")], + deny_request_request: Annotated[DenyRequestRequest, Field(description="Denial parameters")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1275,13 +1294,15 @@ def get_request_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Request]: - """Get request by ID + ) -> ApiResponse[ApproveRequest200Response]: + """deny_request - Returns a request by ID. + Deny an access request - :param id: The ID of the request. (required) + :param id: The ID of the request to deny (required) :type id: UUID + :param deny_request_request: Denial parameters (required) + :type deny_request_request: DenyRequestRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1304,8 +1325,9 @@ def get_request_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_request_serialize( + _param = self._deny_request_serialize( id=id, + deny_request_request=deny_request_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1313,7 +1335,7 @@ def get_request_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Request", + '200': "ApproveRequest200Response", } response_data = self.api_client.call_api( *_param, @@ -1327,9 +1349,10 @@ def get_request_with_http_info( @validate_call - def get_request_without_preload_content( + def deny_request_without_preload_content( self, - id: Annotated[UUID, Field(description="The ID of the request.")], + id: Annotated[UUID, Field(description="The ID of the request to deny")], + deny_request_request: Annotated[DenyRequestRequest, Field(description="Denial parameters")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1343,12 +1366,14 @@ def get_request_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get request by ID + """deny_request - Returns a request by ID. + Deny an access request - :param id: The ID of the request. (required) + :param id: The ID of the request to deny (required) :type id: UUID + :param deny_request_request: Denial parameters (required) + :type deny_request_request: DenyRequestRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1371,8 +1396,9 @@ def get_request_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_request_serialize( + _param = self._deny_request_serialize( id=id, + deny_request_request=deny_request_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1380,7 +1406,7 @@ def get_request_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Request", + '200': "ApproveRequest200Response", } response_data = self.api_client.call_api( *_param, @@ -1389,9 +1415,10 @@ def get_request_without_preload_content( return response_data.response - def _get_request_serialize( + def _deny_request_serialize( self, id, + deny_request_request, _request_auth, _content_type, _headers, @@ -1419,6 +1446,8 @@ def _get_request_serialize( # process the header parameters # process the form parameters # process the body parameter + if deny_request_request is not None: + _body_params = deny_request_request # set the HTTP header `Accept` @@ -1429,6 +1458,19 @@ def _get_request_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1436,8 +1478,8 @@ def _get_request_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/requests/{id}', + method='POST', + resource_path='/requests/{id}/deny', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1454,9 +1496,9 @@ def _get_request_serialize( @validate_call - def get_request_comments( + def escalate_request( self, - id: Annotated[UUID, Field(description="The ID of the request to get comments for")], + id: Annotated[UUID, Field(description="The ID of the request to escalate.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1469,12 +1511,12 @@ def get_request_comments( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RequestCommentList: - """get_request_comments + ) -> EscalateRequest200Response: + """Escalate request to skip-manager - Returns a list of comments for a specific request. + Escalates a pending access request to the target user's skip-level manager. Only the request's requester may call this endpoint. - :param id: The ID of the request to get comments for (required) + :param id: The ID of the request to escalate. (required) :type id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1498,7 +1540,7 @@ def get_request_comments( :return: Returns the result object. """ # noqa: E501 - _param = self._get_request_comments_serialize( + _param = self._escalate_request_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -1507,7 +1549,11 @@ def get_request_comments( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RequestCommentList", + '200': "EscalateRequest200Response", + '400': None, + '403': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -1521,9 +1567,9 @@ def get_request_comments( @validate_call - def get_request_comments_with_http_info( + def escalate_request_with_http_info( self, - id: Annotated[UUID, Field(description="The ID of the request to get comments for")], + id: Annotated[UUID, Field(description="The ID of the request to escalate.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1536,12 +1582,12 @@ def get_request_comments_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RequestCommentList]: - """get_request_comments + ) -> ApiResponse[EscalateRequest200Response]: + """Escalate request to skip-manager - Returns a list of comments for a specific request. + Escalates a pending access request to the target user's skip-level manager. Only the request's requester may call this endpoint. - :param id: The ID of the request to get comments for (required) + :param id: The ID of the request to escalate. (required) :type id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1565,7 +1611,7 @@ def get_request_comments_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_request_comments_serialize( + _param = self._escalate_request_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -1574,7 +1620,11 @@ def get_request_comments_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RequestCommentList", + '200': "EscalateRequest200Response", + '400': None, + '403': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -1588,9 +1638,9 @@ def get_request_comments_with_http_info( @validate_call - def get_request_comments_without_preload_content( + def escalate_request_without_preload_content( self, - id: Annotated[UUID, Field(description="The ID of the request to get comments for")], + id: Annotated[UUID, Field(description="The ID of the request to escalate.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1604,11 +1654,11 @@ def get_request_comments_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_request_comments + """Escalate request to skip-manager - Returns a list of comments for a specific request. + Escalates a pending access request to the target user's skip-level manager. Only the request's requester may call this endpoint. - :param id: The ID of the request to get comments for (required) + :param id: The ID of the request to escalate. (required) :type id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1632,7 +1682,7 @@ def get_request_comments_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_request_comments_serialize( + _param = self._escalate_request_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -1641,7 +1691,11 @@ def get_request_comments_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RequestCommentList", + '200': "EscalateRequest200Response", + '400': None, + '403': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -1650,7 +1704,7 @@ def get_request_comments_without_preload_content( return response_data.response - def _get_request_comments_serialize( + def _escalate_request_serialize( self, id, _request_auth, @@ -1697,8 +1751,8 @@ def _get_request_comments_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/requests/{id}/comments', + method='POST', + resource_path='/requests/{id}/escalate', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1715,17 +1769,9 @@ def _get_request_comments_serialize( @validate_call - def get_requests( + def get_request( self, - start_date_filter: Annotated[Optional[StrictStr], Field(description="A start date filter for the events.")] = None, - end_date_filter: Annotated[Optional[StrictStr], Field(description="An end date filter for the events.")] = None, - requester_id: Annotated[Optional[UUID], Field(description="Filter requests by their requester ID.")] = None, - target_user_id: Annotated[Optional[UUID], Field(description="Filter requests by their target user ID.")] = None, - resource_id: Annotated[Optional[UUID], Field(description="Filter requests by the resource ID that was requested.")] = None, - group_id: Annotated[Optional[UUID], Field(description="Filter requests by the group ID that was requested.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, - show_pending_only: Annotated[Optional[StrictBool], Field(description="Boolean toggle for if it should only show pending requests.")] = None, + id: Annotated[UUID, Field(description="The ID of the request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1738,29 +1784,13 @@ def get_requests( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RequestList: - """Get requests + ) -> Request: + """Get request by ID - Returns a list of requests for your organization that is visible by the admin. + Returns a request by ID. - :param start_date_filter: A start date filter for the events. - :type start_date_filter: str - :param end_date_filter: An end date filter for the events. - :type end_date_filter: str - :param requester_id: Filter requests by their requester ID. - :type requester_id: UUID - :param target_user_id: Filter requests by their target user ID. - :type target_user_id: UUID - :param resource_id: Filter requests by the resource ID that was requested. - :type resource_id: UUID - :param group_id: Filter requests by the group ID that was requested. - :type group_id: UUID - :param cursor: The pagination cursor value. - :type cursor: str - :param page_size: Number of results to return per page. Default is 200. - :type page_size: int - :param show_pending_only: Boolean toggle for if it should only show pending requests. - :type show_pending_only: bool + :param id: The ID of the request. (required) + :type id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1783,16 +1813,8 @@ def get_requests( :return: Returns the result object. """ # noqa: E501 - _param = self._get_requests_serialize( - start_date_filter=start_date_filter, - end_date_filter=end_date_filter, - requester_id=requester_id, - target_user_id=target_user_id, - resource_id=resource_id, - group_id=group_id, - cursor=cursor, - page_size=page_size, - show_pending_only=show_pending_only, + _param = self._get_request_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1800,7 +1822,7 @@ def get_requests( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RequestList", + '200': "Request", } response_data = self.api_client.call_api( *_param, @@ -1814,17 +1836,9 @@ def get_requests( @validate_call - def get_requests_with_http_info( + def get_request_with_http_info( self, - start_date_filter: Annotated[Optional[StrictStr], Field(description="A start date filter for the events.")] = None, - end_date_filter: Annotated[Optional[StrictStr], Field(description="An end date filter for the events.")] = None, - requester_id: Annotated[Optional[UUID], Field(description="Filter requests by their requester ID.")] = None, - target_user_id: Annotated[Optional[UUID], Field(description="Filter requests by their target user ID.")] = None, - resource_id: Annotated[Optional[UUID], Field(description="Filter requests by the resource ID that was requested.")] = None, - group_id: Annotated[Optional[UUID], Field(description="Filter requests by the group ID that was requested.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, - show_pending_only: Annotated[Optional[StrictBool], Field(description="Boolean toggle for if it should only show pending requests.")] = None, + id: Annotated[UUID, Field(description="The ID of the request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1837,29 +1851,13 @@ def get_requests_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RequestList]: - """Get requests + ) -> ApiResponse[Request]: + """Get request by ID - Returns a list of requests for your organization that is visible by the admin. + Returns a request by ID. - :param start_date_filter: A start date filter for the events. - :type start_date_filter: str - :param end_date_filter: An end date filter for the events. - :type end_date_filter: str - :param requester_id: Filter requests by their requester ID. - :type requester_id: UUID - :param target_user_id: Filter requests by their target user ID. - :type target_user_id: UUID - :param resource_id: Filter requests by the resource ID that was requested. - :type resource_id: UUID - :param group_id: Filter requests by the group ID that was requested. - :type group_id: UUID - :param cursor: The pagination cursor value. - :type cursor: str - :param page_size: Number of results to return per page. Default is 200. - :type page_size: int - :param show_pending_only: Boolean toggle for if it should only show pending requests. - :type show_pending_only: bool + :param id: The ID of the request. (required) + :type id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1882,16 +1880,8 @@ def get_requests_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_requests_serialize( - start_date_filter=start_date_filter, - end_date_filter=end_date_filter, - requester_id=requester_id, - target_user_id=target_user_id, - resource_id=resource_id, - group_id=group_id, - cursor=cursor, - page_size=page_size, - show_pending_only=show_pending_only, + _param = self._get_request_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1899,7 +1889,7 @@ def get_requests_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RequestList", + '200': "Request", } response_data = self.api_client.call_api( *_param, @@ -1913,17 +1903,9 @@ def get_requests_with_http_info( @validate_call - def get_requests_without_preload_content( + def get_request_without_preload_content( self, - start_date_filter: Annotated[Optional[StrictStr], Field(description="A start date filter for the events.")] = None, - end_date_filter: Annotated[Optional[StrictStr], Field(description="An end date filter for the events.")] = None, - requester_id: Annotated[Optional[UUID], Field(description="Filter requests by their requester ID.")] = None, - target_user_id: Annotated[Optional[UUID], Field(description="Filter requests by their target user ID.")] = None, - resource_id: Annotated[Optional[UUID], Field(description="Filter requests by the resource ID that was requested.")] = None, - group_id: Annotated[Optional[UUID], Field(description="Filter requests by the group ID that was requested.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, - show_pending_only: Annotated[Optional[StrictBool], Field(description="Boolean toggle for if it should only show pending requests.")] = None, + id: Annotated[UUID, Field(description="The ID of the request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1937,28 +1919,12 @@ def get_requests_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get requests + """Get request by ID - Returns a list of requests for your organization that is visible by the admin. + Returns a request by ID. - :param start_date_filter: A start date filter for the events. - :type start_date_filter: str - :param end_date_filter: An end date filter for the events. - :type end_date_filter: str - :param requester_id: Filter requests by their requester ID. - :type requester_id: UUID - :param target_user_id: Filter requests by their target user ID. - :type target_user_id: UUID - :param resource_id: Filter requests by the resource ID that was requested. - :type resource_id: UUID - :param group_id: Filter requests by the group ID that was requested. - :type group_id: UUID - :param cursor: The pagination cursor value. - :type cursor: str - :param page_size: Number of results to return per page. Default is 200. - :type page_size: int - :param show_pending_only: Boolean toggle for if it should only show pending requests. - :type show_pending_only: bool + :param id: The ID of the request. (required) + :type id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1981,16 +1947,8 @@ def get_requests_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_requests_serialize( - start_date_filter=start_date_filter, - end_date_filter=end_date_filter, - requester_id=requester_id, - target_user_id=target_user_id, - resource_id=resource_id, - group_id=group_id, - cursor=cursor, - page_size=page_size, - show_pending_only=show_pending_only, + _param = self._get_request_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1998,7 +1956,7 @@ def get_requests_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RequestList", + '200': "Request", } response_data = self.api_client.call_api( *_param, @@ -2007,17 +1965,9 @@ def get_requests_without_preload_content( return response_data.response - def _get_requests_serialize( + def _get_request_serialize( self, - start_date_filter, - end_date_filter, - requester_id, - target_user_id, - resource_id, - group_id, - cursor, - page_size, - show_pending_only, + id, _request_auth, _content_type, _headers, @@ -2039,43 +1989,9 @@ def _get_requests_serialize( _body_params: Optional[bytes] = None # process the path parameters + if id is not None: + _path_params['id'] = id # process the query parameters - if start_date_filter is not None: - - _query_params.append(('start_date_filter', start_date_filter)) - - if end_date_filter is not None: - - _query_params.append(('end_date_filter', end_date_filter)) - - if requester_id is not None: - - _query_params.append(('requester_id', requester_id)) - - if target_user_id is not None: - - _query_params.append(('target_user_id', target_user_id)) - - if resource_id is not None: - - _query_params.append(('resource_id', resource_id)) - - if group_id is not None: - - _query_params.append(('group_id', group_id)) - - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if page_size is not None: - - _query_params.append(('page_size', page_size)) - - if show_pending_only is not None: - - _query_params.append(('show_pending_only', show_pending_only)) - # process the header parameters # process the form parameters # process the body parameter @@ -2097,7 +2013,7 @@ def _get_requests_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/requests', + resource_path='/requests/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2114,15 +2030,9 @@ def _get_requests_serialize( @validate_call - def get_requests_relay( + def get_request_comments( self, - first: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results to return after the cursor. Use either first/after or last/before, not both.")] = None, - after: Annotated[Optional[StrictStr], Field(description="Cursor to fetch results after. Used with 'first' for forward pagination.")] = None, - last: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results to return before the cursor. Use either first/after or last/before, not both.")] = None, - before: Annotated[Optional[StrictStr], Field(description="Cursor to fetch results before. Used with 'last' for backward pagination.")] = None, - status: Annotated[Optional[RequestStatusEnum], Field(description="Filter requests by their status.")] = None, - to: Annotated[Optional[UUID], Field(description="Filter requests assigned to a specific user ID.")] = None, - var_from: Annotated[Optional[UUID], Field(description="Filter requests made by a specific user ID.")] = None, + id: Annotated[UUID, Field(description="The ID of the request to get comments for")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2135,25 +2045,13 @@ def get_requests_relay( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RequestConnection: - """(Deprecated) Get requests via Relay + ) -> RequestCommentList: + """get_request_comments - Returns a paginated list of requests using Relay-style cursor pagination. + Returns a list of comments for a specific request. - :param first: Number of results to return after the cursor. Use either first/after or last/before, not both. - :type first: int - :param after: Cursor to fetch results after. Used with 'first' for forward pagination. - :type after: str - :param last: Number of results to return before the cursor. Use either first/after or last/before, not both. - :type last: int - :param before: Cursor to fetch results before. Used with 'last' for backward pagination. - :type before: str - :param status: Filter requests by their status. - :type status: RequestStatusEnum - :param to: Filter requests assigned to a specific user ID. - :type to: UUID - :param var_from: Filter requests made by a specific user ID. - :type var_from: UUID + :param id: The ID of the request to get comments for (required) + :type id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2175,16 +2073,9 @@ def get_requests_relay( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /requests/relay is deprecated.", DeprecationWarning) - _param = self._get_requests_relay_serialize( - first=first, - after=after, - last=last, - before=before, - status=status, - to=to, - var_from=var_from, + _param = self._get_request_comments_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2192,7 +2083,7 @@ def get_requests_relay( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RequestConnection", + '200': "RequestCommentList", } response_data = self.api_client.call_api( *_param, @@ -2206,15 +2097,9 @@ def get_requests_relay( @validate_call - def get_requests_relay_with_http_info( + def get_request_comments_with_http_info( self, - first: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results to return after the cursor. Use either first/after or last/before, not both.")] = None, - after: Annotated[Optional[StrictStr], Field(description="Cursor to fetch results after. Used with 'first' for forward pagination.")] = None, - last: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results to return before the cursor. Use either first/after or last/before, not both.")] = None, - before: Annotated[Optional[StrictStr], Field(description="Cursor to fetch results before. Used with 'last' for backward pagination.")] = None, - status: Annotated[Optional[RequestStatusEnum], Field(description="Filter requests by their status.")] = None, - to: Annotated[Optional[UUID], Field(description="Filter requests assigned to a specific user ID.")] = None, - var_from: Annotated[Optional[UUID], Field(description="Filter requests made by a specific user ID.")] = None, + id: Annotated[UUID, Field(description="The ID of the request to get comments for")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2227,25 +2112,13 @@ def get_requests_relay_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RequestConnection]: - """(Deprecated) Get requests via Relay + ) -> ApiResponse[RequestCommentList]: + """get_request_comments - Returns a paginated list of requests using Relay-style cursor pagination. + Returns a list of comments for a specific request. - :param first: Number of results to return after the cursor. Use either first/after or last/before, not both. - :type first: int - :param after: Cursor to fetch results after. Used with 'first' for forward pagination. - :type after: str - :param last: Number of results to return before the cursor. Use either first/after or last/before, not both. - :type last: int - :param before: Cursor to fetch results before. Used with 'last' for backward pagination. - :type before: str - :param status: Filter requests by their status. - :type status: RequestStatusEnum - :param to: Filter requests assigned to a specific user ID. - :type to: UUID - :param var_from: Filter requests made by a specific user ID. - :type var_from: UUID + :param id: The ID of the request to get comments for (required) + :type id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2267,16 +2140,9 @@ def get_requests_relay_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /requests/relay is deprecated.", DeprecationWarning) - _param = self._get_requests_relay_serialize( - first=first, - after=after, - last=last, - before=before, - status=status, - to=to, - var_from=var_from, + _param = self._get_request_comments_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2284,7 +2150,7 @@ def get_requests_relay_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RequestConnection", + '200': "RequestCommentList", } response_data = self.api_client.call_api( *_param, @@ -2298,15 +2164,9 @@ def get_requests_relay_with_http_info( @validate_call - def get_requests_relay_without_preload_content( + def get_request_comments_without_preload_content( self, - first: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results to return after the cursor. Use either first/after or last/before, not both.")] = None, - after: Annotated[Optional[StrictStr], Field(description="Cursor to fetch results after. Used with 'first' for forward pagination.")] = None, - last: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results to return before the cursor. Use either first/after or last/before, not both.")] = None, - before: Annotated[Optional[StrictStr], Field(description="Cursor to fetch results before. Used with 'last' for backward pagination.")] = None, - status: Annotated[Optional[RequestStatusEnum], Field(description="Filter requests by their status.")] = None, - to: Annotated[Optional[UUID], Field(description="Filter requests assigned to a specific user ID.")] = None, - var_from: Annotated[Optional[UUID], Field(description="Filter requests made by a specific user ID.")] = None, + id: Annotated[UUID, Field(description="The ID of the request to get comments for")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2320,24 +2180,12 @@ def get_requests_relay_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Get requests via Relay + """get_request_comments - Returns a paginated list of requests using Relay-style cursor pagination. + Returns a list of comments for a specific request. - :param first: Number of results to return after the cursor. Use either first/after or last/before, not both. - :type first: int - :param after: Cursor to fetch results after. Used with 'first' for forward pagination. - :type after: str - :param last: Number of results to return before the cursor. Use either first/after or last/before, not both. - :type last: int - :param before: Cursor to fetch results before. Used with 'last' for backward pagination. - :type before: str - :param status: Filter requests by their status. - :type status: RequestStatusEnum - :param to: Filter requests assigned to a specific user ID. - :type to: UUID - :param var_from: Filter requests made by a specific user ID. - :type var_from: UUID + :param id: The ID of the request to get comments for (required) + :type id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2359,16 +2207,9 @@ def get_requests_relay_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /requests/relay is deprecated.", DeprecationWarning) - _param = self._get_requests_relay_serialize( - first=first, - after=after, - last=last, - before=before, - status=status, - to=to, - var_from=var_from, + _param = self._get_request_comments_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2376,7 +2217,7 @@ def get_requests_relay_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RequestConnection", + '200': "RequestCommentList", } response_data = self.api_client.call_api( *_param, @@ -2385,15 +2226,9 @@ def get_requests_relay_without_preload_content( return response_data.response - def _get_requests_relay_serialize( + def _get_request_comments_serialize( self, - first, - after, - last, - before, - status, - to, - var_from, + id, _request_auth, _content_type, _headers, @@ -2415,35 +2250,9 @@ def _get_requests_relay_serialize( _body_params: Optional[bytes] = None # process the path parameters + if id is not None: + _path_params['id'] = id # process the query parameters - if first is not None: - - _query_params.append(('first', first)) - - if after is not None: - - _query_params.append(('after', after)) - - if last is not None: - - _query_params.append(('last', last)) - - if before is not None: - - _query_params.append(('before', before)) - - if status is not None: - - _query_params.append(('status', status.value)) - - if to is not None: - - _query_params.append(('to', to)) - - if var_from is not None: - - _query_params.append(('from', var_from)) - # process the header parameters # process the form parameters # process the body parameter @@ -2465,7 +2274,1346 @@ def _get_requests_relay_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/requests/relay', + resource_path='/requests/{id}/comments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_requests( + self, + start_date_filter: Annotated[Optional[StrictStr], Field(description="A start date filter for the events.")] = None, + end_date_filter: Annotated[Optional[StrictStr], Field(description="An end date filter for the events.")] = None, + requester_id: Annotated[Optional[UUID], Field(description="Filter requests by their requester ID.")] = None, + target_user_id: Annotated[Optional[UUID], Field(description="Filter requests by their target user ID.")] = None, + resource_id: Annotated[Optional[UUID], Field(description="Filter requests by the resource ID that was requested.")] = None, + group_id: Annotated[Optional[UUID], Field(description="Filter requests by the group ID that was requested.")] = None, + app_id: Annotated[Optional[UUID], Field(description="Filter requests by the ID of the app that a requested resource or group belongs to. Returns an empty page if the app does not exist or has no requests visible to the caller.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + show_pending_only: Annotated[Optional[StrictBool], Field(description="Boolean toggle for if it should only show pending requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RequestList: + """Get requests + + Returns a list of requests for your organization that is visible by the admin. + + :param start_date_filter: A start date filter for the events. + :type start_date_filter: str + :param end_date_filter: An end date filter for the events. + :type end_date_filter: str + :param requester_id: Filter requests by their requester ID. + :type requester_id: UUID + :param target_user_id: Filter requests by their target user ID. + :type target_user_id: UUID + :param resource_id: Filter requests by the resource ID that was requested. + :type resource_id: UUID + :param group_id: Filter requests by the group ID that was requested. + :type group_id: UUID + :param app_id: Filter requests by the ID of the app that a requested resource or group belongs to. Returns an empty page if the app does not exist or has no requests visible to the caller. + :type app_id: UUID + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param show_pending_only: Boolean toggle for if it should only show pending requests. + :type show_pending_only: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_requests_serialize( + start_date_filter=start_date_filter, + end_date_filter=end_date_filter, + requester_id=requester_id, + target_user_id=target_user_id, + resource_id=resource_id, + group_id=group_id, + app_id=app_id, + cursor=cursor, + page_size=page_size, + show_pending_only=show_pending_only, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RequestList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_requests_with_http_info( + self, + start_date_filter: Annotated[Optional[StrictStr], Field(description="A start date filter for the events.")] = None, + end_date_filter: Annotated[Optional[StrictStr], Field(description="An end date filter for the events.")] = None, + requester_id: Annotated[Optional[UUID], Field(description="Filter requests by their requester ID.")] = None, + target_user_id: Annotated[Optional[UUID], Field(description="Filter requests by their target user ID.")] = None, + resource_id: Annotated[Optional[UUID], Field(description="Filter requests by the resource ID that was requested.")] = None, + group_id: Annotated[Optional[UUID], Field(description="Filter requests by the group ID that was requested.")] = None, + app_id: Annotated[Optional[UUID], Field(description="Filter requests by the ID of the app that a requested resource or group belongs to. Returns an empty page if the app does not exist or has no requests visible to the caller.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + show_pending_only: Annotated[Optional[StrictBool], Field(description="Boolean toggle for if it should only show pending requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RequestList]: + """Get requests + + Returns a list of requests for your organization that is visible by the admin. + + :param start_date_filter: A start date filter for the events. + :type start_date_filter: str + :param end_date_filter: An end date filter for the events. + :type end_date_filter: str + :param requester_id: Filter requests by their requester ID. + :type requester_id: UUID + :param target_user_id: Filter requests by their target user ID. + :type target_user_id: UUID + :param resource_id: Filter requests by the resource ID that was requested. + :type resource_id: UUID + :param group_id: Filter requests by the group ID that was requested. + :type group_id: UUID + :param app_id: Filter requests by the ID of the app that a requested resource or group belongs to. Returns an empty page if the app does not exist or has no requests visible to the caller. + :type app_id: UUID + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param show_pending_only: Boolean toggle for if it should only show pending requests. + :type show_pending_only: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_requests_serialize( + start_date_filter=start_date_filter, + end_date_filter=end_date_filter, + requester_id=requester_id, + target_user_id=target_user_id, + resource_id=resource_id, + group_id=group_id, + app_id=app_id, + cursor=cursor, + page_size=page_size, + show_pending_only=show_pending_only, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RequestList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_requests_without_preload_content( + self, + start_date_filter: Annotated[Optional[StrictStr], Field(description="A start date filter for the events.")] = None, + end_date_filter: Annotated[Optional[StrictStr], Field(description="An end date filter for the events.")] = None, + requester_id: Annotated[Optional[UUID], Field(description="Filter requests by their requester ID.")] = None, + target_user_id: Annotated[Optional[UUID], Field(description="Filter requests by their target user ID.")] = None, + resource_id: Annotated[Optional[UUID], Field(description="Filter requests by the resource ID that was requested.")] = None, + group_id: Annotated[Optional[UUID], Field(description="Filter requests by the group ID that was requested.")] = None, + app_id: Annotated[Optional[UUID], Field(description="Filter requests by the ID of the app that a requested resource or group belongs to. Returns an empty page if the app does not exist or has no requests visible to the caller.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + show_pending_only: Annotated[Optional[StrictBool], Field(description="Boolean toggle for if it should only show pending requests.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get requests + + Returns a list of requests for your organization that is visible by the admin. + + :param start_date_filter: A start date filter for the events. + :type start_date_filter: str + :param end_date_filter: An end date filter for the events. + :type end_date_filter: str + :param requester_id: Filter requests by their requester ID. + :type requester_id: UUID + :param target_user_id: Filter requests by their target user ID. + :type target_user_id: UUID + :param resource_id: Filter requests by the resource ID that was requested. + :type resource_id: UUID + :param group_id: Filter requests by the group ID that was requested. + :type group_id: UUID + :param app_id: Filter requests by the ID of the app that a requested resource or group belongs to. Returns an empty page if the app does not exist or has no requests visible to the caller. + :type app_id: UUID + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param show_pending_only: Boolean toggle for if it should only show pending requests. + :type show_pending_only: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_requests_serialize( + start_date_filter=start_date_filter, + end_date_filter=end_date_filter, + requester_id=requester_id, + target_user_id=target_user_id, + resource_id=resource_id, + group_id=group_id, + app_id=app_id, + cursor=cursor, + page_size=page_size, + show_pending_only=show_pending_only, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RequestList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_requests_serialize( + self, + start_date_filter, + end_date_filter, + requester_id, + target_user_id, + resource_id, + group_id, + app_id, + cursor, + page_size, + show_pending_only, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_date_filter is not None: + + _query_params.append(('start_date_filter', start_date_filter)) + + if end_date_filter is not None: + + _query_params.append(('end_date_filter', end_date_filter)) + + if requester_id is not None: + + _query_params.append(('requester_id', requester_id)) + + if target_user_id is not None: + + _query_params.append(('target_user_id', target_user_id)) + + if resource_id is not None: + + _query_params.append(('resource_id', resource_id)) + + if group_id is not None: + + _query_params.append(('group_id', group_id)) + + if app_id is not None: + + _query_params.append(('app_id', app_id)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if show_pending_only is not None: + + _query_params.append(('show_pending_only', show_pending_only)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/requests', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_requests_relay( + self, + first: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results to return after the cursor. Use either first/after or last/before, not both.")] = None, + after: Annotated[Optional[StrictStr], Field(description="Cursor to fetch results after. Used with 'first' for forward pagination.")] = None, + last: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results to return before the cursor. Use either first/after or last/before, not both.")] = None, + before: Annotated[Optional[StrictStr], Field(description="Cursor to fetch results before. Used with 'last' for backward pagination.")] = None, + status: Annotated[Optional[RequestStatusEnum], Field(description="Filter requests by their status.")] = None, + to: Annotated[Optional[UUID], Field(description="Filter requests assigned to a specific user ID.")] = None, + var_from: Annotated[Optional[UUID], Field(description="Filter requests made by a specific user ID.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RequestConnection: + """(Deprecated) Get requests via Relay + + Returns a paginated list of requests using Relay-style cursor pagination. + + :param first: Number of results to return after the cursor. Use either first/after or last/before, not both. + :type first: int + :param after: Cursor to fetch results after. Used with 'first' for forward pagination. + :type after: str + :param last: Number of results to return before the cursor. Use either first/after or last/before, not both. + :type last: int + :param before: Cursor to fetch results before. Used with 'last' for backward pagination. + :type before: str + :param status: Filter requests by their status. + :type status: RequestStatusEnum + :param to: Filter requests assigned to a specific user ID. + :type to: UUID + :param var_from: Filter requests made by a specific user ID. + :type var_from: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /requests/relay is deprecated.", DeprecationWarning) + + _param = self._get_requests_relay_serialize( + first=first, + after=after, + last=last, + before=before, + status=status, + to=to, + var_from=var_from, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RequestConnection", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_requests_relay_with_http_info( + self, + first: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results to return after the cursor. Use either first/after or last/before, not both.")] = None, + after: Annotated[Optional[StrictStr], Field(description="Cursor to fetch results after. Used with 'first' for forward pagination.")] = None, + last: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results to return before the cursor. Use either first/after or last/before, not both.")] = None, + before: Annotated[Optional[StrictStr], Field(description="Cursor to fetch results before. Used with 'last' for backward pagination.")] = None, + status: Annotated[Optional[RequestStatusEnum], Field(description="Filter requests by their status.")] = None, + to: Annotated[Optional[UUID], Field(description="Filter requests assigned to a specific user ID.")] = None, + var_from: Annotated[Optional[UUID], Field(description="Filter requests made by a specific user ID.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RequestConnection]: + """(Deprecated) Get requests via Relay + + Returns a paginated list of requests using Relay-style cursor pagination. + + :param first: Number of results to return after the cursor. Use either first/after or last/before, not both. + :type first: int + :param after: Cursor to fetch results after. Used with 'first' for forward pagination. + :type after: str + :param last: Number of results to return before the cursor. Use either first/after or last/before, not both. + :type last: int + :param before: Cursor to fetch results before. Used with 'last' for backward pagination. + :type before: str + :param status: Filter requests by their status. + :type status: RequestStatusEnum + :param to: Filter requests assigned to a specific user ID. + :type to: UUID + :param var_from: Filter requests made by a specific user ID. + :type var_from: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /requests/relay is deprecated.", DeprecationWarning) + + _param = self._get_requests_relay_serialize( + first=first, + after=after, + last=last, + before=before, + status=status, + to=to, + var_from=var_from, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RequestConnection", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_requests_relay_without_preload_content( + self, + first: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results to return after the cursor. Use either first/after or last/before, not both.")] = None, + after: Annotated[Optional[StrictStr], Field(description="Cursor to fetch results after. Used with 'first' for forward pagination.")] = None, + last: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results to return before the cursor. Use either first/after or last/before, not both.")] = None, + before: Annotated[Optional[StrictStr], Field(description="Cursor to fetch results before. Used with 'last' for backward pagination.")] = None, + status: Annotated[Optional[RequestStatusEnum], Field(description="Filter requests by their status.")] = None, + to: Annotated[Optional[UUID], Field(description="Filter requests assigned to a specific user ID.")] = None, + var_from: Annotated[Optional[UUID], Field(description="Filter requests made by a specific user ID.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get requests via Relay + + Returns a paginated list of requests using Relay-style cursor pagination. + + :param first: Number of results to return after the cursor. Use either first/after or last/before, not both. + :type first: int + :param after: Cursor to fetch results after. Used with 'first' for forward pagination. + :type after: str + :param last: Number of results to return before the cursor. Use either first/after or last/before, not both. + :type last: int + :param before: Cursor to fetch results before. Used with 'last' for backward pagination. + :type before: str + :param status: Filter requests by their status. + :type status: RequestStatusEnum + :param to: Filter requests assigned to a specific user ID. + :type to: UUID + :param var_from: Filter requests made by a specific user ID. + :type var_from: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /requests/relay is deprecated.", DeprecationWarning) + + _param = self._get_requests_relay_serialize( + first=first, + after=after, + last=last, + before=before, + status=status, + to=to, + var_from=var_from, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RequestConnection", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_requests_relay_serialize( + self, + first, + after, + last, + before, + status, + to, + var_from, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if first is not None: + + _query_params.append(('first', first)) + + if after is not None: + + _query_params.append(('after', after)) + + if last is not None: + + _query_params.append(('last', last)) + + if before is not None: + + _query_params.append(('before', before)) + + if status is not None: + + _query_params.append(('status', status.value)) + + if to is not None: + + _query_params.append(('to', to)) + + if var_from is not None: + + _query_params.append(('from', var_from)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/requests/relay', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remind_request( + self, + id: Annotated[UUID, Field(description="The ID of the request whose reviewers should be reminded.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EscalateRequest200Response: + """Send request reminder + + Sends a reminder to all pending reviewers of the request. + + :param id: The ID of the request whose reviewers should be reminded. (required) + :type id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remind_request_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EscalateRequest200Response", + '400': None, + '404': None, + '429': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def remind_request_with_http_info( + self, + id: Annotated[UUID, Field(description="The ID of the request whose reviewers should be reminded.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EscalateRequest200Response]: + """Send request reminder + + Sends a reminder to all pending reviewers of the request. + + :param id: The ID of the request whose reviewers should be reminded. (required) + :type id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remind_request_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EscalateRequest200Response", + '400': None, + '404': None, + '429': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def remind_request_without_preload_content( + self, + id: Annotated[UUID, Field(description="The ID of the request whose reviewers should be reminded.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send request reminder + + Sends a reminder to all pending reviewers of the request. + + :param id: The ID of the request whose reviewers should be reminded. (required) + :type id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remind_request_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EscalateRequest200Response", + '400': None, + '404': None, + '429': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remind_request_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/requests/{id}/remind', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remind_request_reviewer( + self, + id: Annotated[UUID, Field(description="The ID of the request whose reviewer should be reminded.")], + reviewer_id: Annotated[UUID, Field(description="The ID of the pending reviewer to remind.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EscalateRequest200Response: + """Send reminder to a reviewer + + Sends a reminder to one pending reviewer of the request. + + :param id: The ID of the request whose reviewer should be reminded. (required) + :type id: UUID + :param reviewer_id: The ID of the pending reviewer to remind. (required) + :type reviewer_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remind_request_reviewer_serialize( + id=id, + reviewer_id=reviewer_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EscalateRequest200Response", + '400': None, + '404': None, + '429': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def remind_request_reviewer_with_http_info( + self, + id: Annotated[UUID, Field(description="The ID of the request whose reviewer should be reminded.")], + reviewer_id: Annotated[UUID, Field(description="The ID of the pending reviewer to remind.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EscalateRequest200Response]: + """Send reminder to a reviewer + + Sends a reminder to one pending reviewer of the request. + + :param id: The ID of the request whose reviewer should be reminded. (required) + :type id: UUID + :param reviewer_id: The ID of the pending reviewer to remind. (required) + :type reviewer_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remind_request_reviewer_serialize( + id=id, + reviewer_id=reviewer_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EscalateRequest200Response", + '400': None, + '404': None, + '429': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def remind_request_reviewer_without_preload_content( + self, + id: Annotated[UUID, Field(description="The ID of the request whose reviewer should be reminded.")], + reviewer_id: Annotated[UUID, Field(description="The ID of the pending reviewer to remind.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send reminder to a reviewer + + Sends a reminder to one pending reviewer of the request. + + :param id: The ID of the request whose reviewer should be reminded. (required) + :type id: UUID + :param reviewer_id: The ID of the pending reviewer to remind. (required) + :type reviewer_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remind_request_reviewer_serialize( + id=id, + reviewer_id=reviewer_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EscalateRequest200Response", + '400': None, + '404': None, + '429': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remind_request_reviewer_serialize( + self, + id, + reviewer_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + if reviewer_id is not None: + _path_params['reviewer_id'] = reviewer_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/requests/{id}/reviewers/{reviewer_id}/remind', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/opal_security/api/resources_api.py b/opal_security/api/resources_api.py index 02aa00b..0858668 100644 --- a/opal_security/api/resources_api.py +++ b/opal_security/api/resources_api.py @@ -24,14 +24,20 @@ from opal_security.models.access_list import AccessList from opal_security.models.add_resource_nhi_request import AddResourceNhiRequest from opal_security.models.add_resource_user_request import AddResourceUserRequest +from opal_security.models.create_resource_custom_access_level_info import CreateResourceCustomAccessLevelInfo from opal_security.models.create_resource_info import CreateResourceInfo from opal_security.models.get_resource_user200_response import GetResourceUser200Response from opal_security.models.group_resource_list import GroupResourceList from opal_security.models.message_channel_id_list import MessageChannelIDList from opal_security.models.message_channel_list import MessageChannelList +from opal_security.models.name_match_type import NameMatchType from opal_security.models.paginated_resources_list import PaginatedResourcesList from opal_security.models.resource import Resource +from opal_security.models.resource_access_level_list import ResourceAccessLevelList from opal_security.models.resource_access_user_list import ResourceAccessUserList +from opal_security.models.resource_configuration_template import ResourceConfigurationTemplate +from opal_security.models.resource_custom_access_level_list import ResourceCustomAccessLevelList +from opal_security.models.resource_custom_access_level_response import ResourceCustomAccessLevelResponse from opal_security.models.resource_nhi import ResourceNHI from opal_security.models.resource_type_enum import ResourceTypeEnum from opal_security.models.resource_user import ResourceUser @@ -41,6 +47,7 @@ from opal_security.models.reviewer_stage_list import ReviewerStageList from opal_security.models.scoped_role_permission_list import ScopedRolePermissionList from opal_security.models.tags_list import TagsList +from opal_security.models.update_resource_custom_access_level_info import UpdateResourceCustomAccessLevelInfo from opal_security.models.update_resource_info_list import UpdateResourceInfoList from opal_security.models.update_resource_user_request import UpdateResourceUserRequest from opal_security.models.visibility_info import VisibilityInfo @@ -372,7 +379,7 @@ def add_resource_user( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], user_id: Annotated[UUID, Field(description="The ID of the user to add.")], - duration_minutes: Annotated[Optional[Annotated[int, Field(le=525960, strict=True)]], Field(description="The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.")] = None, + duration_minutes: Annotated[Optional[Annotated[int, Field(le=153722867, strict=True)]], Field(description="The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.")] = None, access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used.")] = None, add_resource_user_request: Optional[AddResourceUserRequest] = None, _request_timeout: Union[ @@ -455,7 +462,7 @@ def add_resource_user_with_http_info( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], user_id: Annotated[UUID, Field(description="The ID of the user to add.")], - duration_minutes: Annotated[Optional[Annotated[int, Field(le=525960, strict=True)]], Field(description="The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.")] = None, + duration_minutes: Annotated[Optional[Annotated[int, Field(le=153722867, strict=True)]], Field(description="The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.")] = None, access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used.")] = None, add_resource_user_request: Optional[AddResourceUserRequest] = None, _request_timeout: Union[ @@ -538,7 +545,7 @@ def add_resource_user_without_preload_content( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], user_id: Annotated[UUID, Field(description="The ID of the user to add.")], - duration_minutes: Annotated[Optional[Annotated[int, Field(le=525960, strict=True)]], Field(description="The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.")] = None, + duration_minutes: Annotated[Optional[Annotated[int, Field(le=153722867, strict=True)]], Field(description="The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.")] = None, access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used.")] = None, add_resource_user_request: Optional[AddResourceUserRequest] = None, _request_timeout: Union[ @@ -980,9 +987,10 @@ def _create_resource_serialize( @validate_call - def delete_resource( + def create_resource_custom_access_level( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + create_resource_custom_access_level_info: CreateResourceCustomAccessLevelInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -995,13 +1003,15 @@ def delete_resource( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """delete_resource + ) -> ResourceCustomAccessLevelResponse: + """create_resource_custom_access_level - Deletes a resource. + Creates a custom access level on a resource. If the resource is a parent type, the role is created on all child resources. :param resource_id: The ID of the resource. (required) :type resource_id: UUID + :param create_resource_custom_access_level_info: (required) + :type create_resource_custom_access_level_info: CreateResourceCustomAccessLevelInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1024,8 +1034,9 @@ def delete_resource( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_resource_serialize( + _param = self._create_resource_custom_access_level_serialize( resource_id=resource_id, + create_resource_custom_access_level_info=create_resource_custom_access_level_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1033,7 +1044,10 @@ def delete_resource( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "ResourceCustomAccessLevelResponse", + '400': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -1047,9 +1061,10 @@ def delete_resource( @validate_call - def delete_resource_with_http_info( + def create_resource_custom_access_level_with_http_info( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + create_resource_custom_access_level_info: CreateResourceCustomAccessLevelInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1062,13 +1077,15 @@ def delete_resource_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """delete_resource + ) -> ApiResponse[ResourceCustomAccessLevelResponse]: + """create_resource_custom_access_level - Deletes a resource. + Creates a custom access level on a resource. If the resource is a parent type, the role is created on all child resources. :param resource_id: The ID of the resource. (required) :type resource_id: UUID + :param create_resource_custom_access_level_info: (required) + :type create_resource_custom_access_level_info: CreateResourceCustomAccessLevelInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1091,8 +1108,9 @@ def delete_resource_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_resource_serialize( + _param = self._create_resource_custom_access_level_serialize( resource_id=resource_id, + create_resource_custom_access_level_info=create_resource_custom_access_level_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1100,7 +1118,10 @@ def delete_resource_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "ResourceCustomAccessLevelResponse", + '400': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -1114,9 +1135,10 @@ def delete_resource_with_http_info( @validate_call - def delete_resource_without_preload_content( + def create_resource_custom_access_level_without_preload_content( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + create_resource_custom_access_level_info: CreateResourceCustomAccessLevelInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1130,12 +1152,14 @@ def delete_resource_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_resource + """create_resource_custom_access_level - Deletes a resource. + Creates a custom access level on a resource. If the resource is a parent type, the role is created on all child resources. :param resource_id: The ID of the resource. (required) :type resource_id: UUID + :param create_resource_custom_access_level_info: (required) + :type create_resource_custom_access_level_info: CreateResourceCustomAccessLevelInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1158,8 +1182,9 @@ def delete_resource_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_resource_serialize( + _param = self._create_resource_custom_access_level_serialize( resource_id=resource_id, + create_resource_custom_access_level_info=create_resource_custom_access_level_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1167,7 +1192,10 @@ def delete_resource_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "ResourceCustomAccessLevelResponse", + '400': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -1176,9 +1204,10 @@ def delete_resource_without_preload_content( return response_data.response - def _delete_resource_serialize( + def _create_resource_custom_access_level_serialize( self, resource_id, + create_resource_custom_access_level_info, _request_auth, _content_type, _headers, @@ -1206,9 +1235,31 @@ def _delete_resource_serialize( # process the header parameters # process the form parameters # process the body parameter + if create_resource_custom_access_level_info is not None: + _body_params = create_resource_custom_access_level_info + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1216,8 +1267,8 @@ def _delete_resource_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/resources/{resource_id}', + method='POST', + resource_path='/resources/{resource_id}/custom-access-levels', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1234,11 +1285,9 @@ def _delete_resource_serialize( @validate_call - def delete_resource_nhi( + def delete_resource( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - non_human_identity_id: Annotated[UUID, Field(description="The resource ID of the non-human identity to remove from this resource.")], - access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1252,16 +1301,12 @@ def delete_resource_nhi( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """delete_resource_nhi + """delete_resource - Removes a non-human identity's direct access from this resource. + Deletes a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param non_human_identity_id: The resource ID of the non-human identity to remove from this resource. (required) - :type non_human_identity_id: UUID - :param access_level_remote_id: The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. - :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1284,10 +1329,8 @@ def delete_resource_nhi( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_resource_nhi_serialize( + _param = self._delete_resource_serialize( resource_id=resource_id, - non_human_identity_id=non_human_identity_id, - access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1309,11 +1352,9 @@ def delete_resource_nhi( @validate_call - def delete_resource_nhi_with_http_info( + def delete_resource_with_http_info( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - non_human_identity_id: Annotated[UUID, Field(description="The resource ID of the non-human identity to remove from this resource.")], - access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1327,16 +1368,12 @@ def delete_resource_nhi_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """delete_resource_nhi + """delete_resource - Removes a non-human identity's direct access from this resource. + Deletes a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param non_human_identity_id: The resource ID of the non-human identity to remove from this resource. (required) - :type non_human_identity_id: UUID - :param access_level_remote_id: The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. - :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1359,10 +1396,8 @@ def delete_resource_nhi_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_resource_nhi_serialize( + _param = self._delete_resource_serialize( resource_id=resource_id, - non_human_identity_id=non_human_identity_id, - access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1384,11 +1419,9 @@ def delete_resource_nhi_with_http_info( @validate_call - def delete_resource_nhi_without_preload_content( + def delete_resource_without_preload_content( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - non_human_identity_id: Annotated[UUID, Field(description="The resource ID of the non-human identity to remove from this resource.")], - access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1402,16 +1435,12 @@ def delete_resource_nhi_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_resource_nhi + """delete_resource - Removes a non-human identity's direct access from this resource. + Deletes a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param non_human_identity_id: The resource ID of the non-human identity to remove from this resource. (required) - :type non_human_identity_id: UUID - :param access_level_remote_id: The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. - :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1434,10 +1463,8 @@ def delete_resource_nhi_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_resource_nhi_serialize( + _param = self._delete_resource_serialize( resource_id=resource_id, - non_human_identity_id=non_human_identity_id, - access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1454,11 +1481,9 @@ def delete_resource_nhi_without_preload_content( return response_data.response - def _delete_resource_nhi_serialize( + def _delete_resource_serialize( self, resource_id, - non_human_identity_id, - access_level_remote_id, _request_auth, _content_type, _headers, @@ -1482,13 +1507,7 @@ def _delete_resource_nhi_serialize( # process the path parameters if resource_id is not None: _path_params['resource_id'] = resource_id - if non_human_identity_id is not None: - _path_params['non_human_identity_id'] = non_human_identity_id # process the query parameters - if access_level_remote_id is not None: - - _query_params.append(('access_level_remote_id', access_level_remote_id)) - # process the header parameters # process the form parameters # process the body parameter @@ -1503,7 +1522,7 @@ def _delete_resource_nhi_serialize( return self.api_client.param_serialize( method='DELETE', - resource_path='/resources/{resource_id}/non-human-identities/{non_human_identity_id}', + resource_path='/resources/{resource_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1520,11 +1539,10 @@ def _delete_resource_nhi_serialize( @validate_call - def delete_resource_user( + def delete_resource_custom_access_level( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - user_id: Annotated[UUID, Field(description="The ID of a user to remove from this resource.")], - access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, + access_level_remote_id: Annotated[StrictStr, Field(description="The remote ID of the access level.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1538,15 +1556,13 @@ def delete_resource_user( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """delete_resource_user + """delete_resource_custom_access_level - Removes a user's direct access from this resource. + Deletes a custom access level identified by its remote ID. If the resource is a parent type, the deletion fans out to all child resources. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param user_id: The ID of a user to remove from this resource. (required) - :type user_id: UUID - :param access_level_remote_id: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + :param access_level_remote_id: The remote ID of the access level. (required) :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1570,9 +1586,8 @@ def delete_resource_user( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_resource_user_serialize( + _param = self._delete_resource_custom_access_level_serialize( resource_id=resource_id, - user_id=user_id, access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1582,6 +1597,8 @@ def delete_resource_user( _response_types_map: Dict[str, Optional[str]] = { '200': None, + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -1595,11 +1612,10 @@ def delete_resource_user( @validate_call - def delete_resource_user_with_http_info( + def delete_resource_custom_access_level_with_http_info( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - user_id: Annotated[UUID, Field(description="The ID of a user to remove from this resource.")], - access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, + access_level_remote_id: Annotated[StrictStr, Field(description="The remote ID of the access level.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1613,15 +1629,13 @@ def delete_resource_user_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """delete_resource_user + """delete_resource_custom_access_level - Removes a user's direct access from this resource. + Deletes a custom access level identified by its remote ID. If the resource is a parent type, the deletion fans out to all child resources. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param user_id: The ID of a user to remove from this resource. (required) - :type user_id: UUID - :param access_level_remote_id: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + :param access_level_remote_id: The remote ID of the access level. (required) :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1645,9 +1659,8 @@ def delete_resource_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_resource_user_serialize( + _param = self._delete_resource_custom_access_level_serialize( resource_id=resource_id, - user_id=user_id, access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1657,6 +1670,8 @@ def delete_resource_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': None, + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -1670,11 +1685,10 @@ def delete_resource_user_with_http_info( @validate_call - def delete_resource_user_without_preload_content( + def delete_resource_custom_access_level_without_preload_content( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - user_id: Annotated[UUID, Field(description="The ID of a user to remove from this resource.")], - access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, + access_level_remote_id: Annotated[StrictStr, Field(description="The remote ID of the access level.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1688,15 +1702,13 @@ def delete_resource_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_resource_user + """delete_resource_custom_access_level - Removes a user's direct access from this resource. + Deletes a custom access level identified by its remote ID. If the resource is a parent type, the deletion fans out to all child resources. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param user_id: The ID of a user to remove from this resource. (required) - :type user_id: UUID - :param access_level_remote_id: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + :param access_level_remote_id: The remote ID of the access level. (required) :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1720,9 +1732,8 @@ def delete_resource_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_resource_user_serialize( + _param = self._delete_resource_custom_access_level_serialize( resource_id=resource_id, - user_id=user_id, access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1732,6 +1743,8 @@ def delete_resource_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': None, + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -1740,10 +1753,9 @@ def delete_resource_user_without_preload_content( return response_data.response - def _delete_resource_user_serialize( + def _delete_resource_custom_access_level_serialize( self, resource_id, - user_id, access_level_remote_id, _request_auth, _content_type, @@ -1768,13 +1780,9 @@ def _delete_resource_user_serialize( # process the path parameters if resource_id is not None: _path_params['resource_id'] = resource_id - if user_id is not None: - _path_params['user_id'] = user_id - # process the query parameters if access_level_remote_id is not None: - - _query_params.append(('access_level_remote_id', access_level_remote_id)) - + _path_params['access_level_remote_id'] = access_level_remote_id + # process the query parameters # process the header parameters # process the form parameters # process the body parameter @@ -1789,7 +1797,7 @@ def _delete_resource_user_serialize( return self.api_client.param_serialize( method='DELETE', - resource_path='/resources/{resource_id}/users/{user_id}', + resource_path='/resources/{resource_id}/custom-access-levels/{access_level_remote_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1806,9 +1814,11 @@ def _delete_resource_user_serialize( @validate_call - def get_resource( + def delete_resource_nhi( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + non_human_identity_id: Annotated[UUID, Field(description="The resource ID of the non-human identity to remove from this resource.")], + access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1821,13 +1831,17 @@ def get_resource( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Resource: - """Get resource by ID + ) -> None: + """delete_resource_nhi - Retrieves a resource. + Removes a non-human identity's direct access from this resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID + :param non_human_identity_id: The resource ID of the non-human identity to remove from this resource. (required) + :type non_human_identity_id: UUID + :param access_level_remote_id: The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1850,8 +1864,10 @@ def get_resource( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_serialize( + _param = self._delete_resource_nhi_serialize( resource_id=resource_id, + non_human_identity_id=non_human_identity_id, + access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1859,7 +1875,7 @@ def get_resource( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Resource", + '200': None, } response_data = self.api_client.call_api( *_param, @@ -1873,9 +1889,11 @@ def get_resource( @validate_call - def get_resource_with_http_info( + def delete_resource_nhi_with_http_info( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + non_human_identity_id: Annotated[UUID, Field(description="The resource ID of the non-human identity to remove from this resource.")], + access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1888,13 +1906,17 @@ def get_resource_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Resource]: - """Get resource by ID + ) -> ApiResponse[None]: + """delete_resource_nhi - Retrieves a resource. + Removes a non-human identity's direct access from this resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID + :param non_human_identity_id: The resource ID of the non-human identity to remove from this resource. (required) + :type non_human_identity_id: UUID + :param access_level_remote_id: The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1917,8 +1939,10 @@ def get_resource_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_serialize( + _param = self._delete_resource_nhi_serialize( resource_id=resource_id, + non_human_identity_id=non_human_identity_id, + access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1926,7 +1950,7 @@ def get_resource_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Resource", + '200': None, } response_data = self.api_client.call_api( *_param, @@ -1940,9 +1964,11 @@ def get_resource_with_http_info( @validate_call - def get_resource_without_preload_content( + def delete_resource_nhi_without_preload_content( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + non_human_identity_id: Annotated[UUID, Field(description="The resource ID of the non-human identity to remove from this resource.")], + access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1956,12 +1982,16 @@ def get_resource_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get resource by ID + """delete_resource_nhi - Retrieves a resource. + Removes a non-human identity's direct access from this resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID + :param non_human_identity_id: The resource ID of the non-human identity to remove from this resource. (required) + :type non_human_identity_id: UUID + :param access_level_remote_id: The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1984,8 +2014,10 @@ def get_resource_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_serialize( + _param = self._delete_resource_nhi_serialize( resource_id=resource_id, + non_human_identity_id=non_human_identity_id, + access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1993,7 +2025,7 @@ def get_resource_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Resource", + '200': None, } response_data = self.api_client.call_api( *_param, @@ -2002,9 +2034,11 @@ def get_resource_without_preload_content( return response_data.response - def _get_resource_serialize( + def _delete_resource_nhi_serialize( self, resource_id, + non_human_identity_id, + access_level_remote_id, _request_auth, _content_type, _headers, @@ -2028,19 +2062,18 @@ def _get_resource_serialize( # process the path parameters if resource_id is not None: _path_params['resource_id'] = resource_id + if non_human_identity_id is not None: + _path_params['non_human_identity_id'] = non_human_identity_id # process the query parameters + if access_level_remote_id is not None: + + _query_params.append(('access_level_remote_id', access_level_remote_id)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) # authentication setting @@ -2049,8 +2082,8 @@ def _get_resource_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/resources/{resource_id}', + method='DELETE', + resource_path='/resources/{resource_id}/non-human-identities/{non_human_identity_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2067,9 +2100,11 @@ def _get_resource_serialize( @validate_call - def get_resource_groups( + def delete_resource_user( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource that the groups grant access to.")], + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + user_id: Annotated[UUID, Field(description="The ID of a user to remove from this resource.")], + access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2082,13 +2117,17 @@ def get_resource_groups( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GroupResourceList: - """get_resource_groups + ) -> None: + """delete_resource_user - Returns a list of groups that grant access to the resource + Removes a user's direct access from this resource. - :param resource_id: The ID of the resource that the groups grant access to. (required) + :param resource_id: The ID of the resource. (required) :type resource_id: UUID + :param user_id: The ID of a user to remove from this resource. (required) + :type user_id: UUID + :param access_level_remote_id: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2111,8 +2150,10 @@ def get_resource_groups( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_groups_serialize( + _param = self._delete_resource_user_serialize( resource_id=resource_id, + user_id=user_id, + access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2120,7 +2161,7 @@ def get_resource_groups( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GroupResourceList", + '200': None, } response_data = self.api_client.call_api( *_param, @@ -2134,9 +2175,11 @@ def get_resource_groups( @validate_call - def get_resource_groups_with_http_info( + def delete_resource_user_with_http_info( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource that the groups grant access to.")], + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + user_id: Annotated[UUID, Field(description="The ID of a user to remove from this resource.")], + access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2149,13 +2192,17 @@ def get_resource_groups_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GroupResourceList]: - """get_resource_groups + ) -> ApiResponse[None]: + """delete_resource_user - Returns a list of groups that grant access to the resource + Removes a user's direct access from this resource. - :param resource_id: The ID of the resource that the groups grant access to. (required) + :param resource_id: The ID of the resource. (required) :type resource_id: UUID + :param user_id: The ID of a user to remove from this resource. (required) + :type user_id: UUID + :param access_level_remote_id: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2178,8 +2225,10 @@ def get_resource_groups_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_groups_serialize( + _param = self._delete_resource_user_serialize( resource_id=resource_id, + user_id=user_id, + access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2187,7 +2236,7 @@ def get_resource_groups_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GroupResourceList", + '200': None, } response_data = self.api_client.call_api( *_param, @@ -2201,9 +2250,11 @@ def get_resource_groups_with_http_info( @validate_call - def get_resource_groups_without_preload_content( + def delete_resource_user_without_preload_content( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource that the groups grant access to.")], + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + user_id: Annotated[UUID, Field(description="The ID of a user to remove from this resource.")], + access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2217,12 +2268,16 @@ def get_resource_groups_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_resource_groups + """delete_resource_user - Returns a list of groups that grant access to the resource + Removes a user's direct access from this resource. - :param resource_id: The ID of the resource that the groups grant access to. (required) + :param resource_id: The ID of the resource. (required) :type resource_id: UUID + :param user_id: The ID of a user to remove from this resource. (required) + :type user_id: UUID + :param access_level_remote_id: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2245,8 +2300,10 @@ def get_resource_groups_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_groups_serialize( + _param = self._delete_resource_user_serialize( resource_id=resource_id, + user_id=user_id, + access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2254,7 +2311,7 @@ def get_resource_groups_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GroupResourceList", + '200': None, } response_data = self.api_client.call_api( *_param, @@ -2263,9 +2320,11 @@ def get_resource_groups_without_preload_content( return response_data.response - def _get_resource_groups_serialize( + def _delete_resource_user_serialize( self, resource_id, + user_id, + access_level_remote_id, _request_auth, _content_type, _headers, @@ -2289,19 +2348,18 @@ def _get_resource_groups_serialize( # process the path parameters if resource_id is not None: _path_params['resource_id'] = resource_id + if user_id is not None: + _path_params['user_id'] = user_id # process the query parameters + if access_level_remote_id is not None: + + _query_params.append(('access_level_remote_id', access_level_remote_id)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) # authentication setting @@ -2310,8 +2368,8 @@ def _get_resource_groups_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/resources/{resource_id}/groups', + method='DELETE', + resource_path='/resources/{resource_id}/users/{user_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2328,7 +2386,7 @@ def _get_resource_groups_serialize( @validate_call - def get_resource_message_channels( + def get_resource( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], _request_timeout: Union[ @@ -2343,10 +2401,10 @@ def get_resource_message_channels( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MessageChannelList: - """get_resource_message_channels + ) -> Resource: + """Get resource by ID - Gets the list of audit message channels attached to a resource. + Retrieves a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID @@ -2372,7 +2430,7 @@ def get_resource_message_channels( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_message_channels_serialize( + _param = self._get_resource_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2381,7 +2439,7 @@ def get_resource_message_channels( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MessageChannelList", + '200': "Resource", } response_data = self.api_client.call_api( *_param, @@ -2395,7 +2453,7 @@ def get_resource_message_channels( @validate_call - def get_resource_message_channels_with_http_info( + def get_resource_with_http_info( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], _request_timeout: Union[ @@ -2410,10 +2468,10 @@ def get_resource_message_channels_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MessageChannelList]: - """get_resource_message_channels + ) -> ApiResponse[Resource]: + """Get resource by ID - Gets the list of audit message channels attached to a resource. + Retrieves a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID @@ -2439,7 +2497,7 @@ def get_resource_message_channels_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_message_channels_serialize( + _param = self._get_resource_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2448,7 +2506,7 @@ def get_resource_message_channels_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MessageChannelList", + '200': "Resource", } response_data = self.api_client.call_api( *_param, @@ -2462,7 +2520,7 @@ def get_resource_message_channels_with_http_info( @validate_call - def get_resource_message_channels_without_preload_content( + def get_resource_without_preload_content( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], _request_timeout: Union[ @@ -2478,9 +2536,9 @@ def get_resource_message_channels_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_resource_message_channels + """Get resource by ID - Gets the list of audit message channels attached to a resource. + Retrieves a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID @@ -2506,7 +2564,7 @@ def get_resource_message_channels_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_message_channels_serialize( + _param = self._get_resource_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2515,7 +2573,7 @@ def get_resource_message_channels_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MessageChannelList", + '200': "Resource", } response_data = self.api_client.call_api( *_param, @@ -2524,7 +2582,7 @@ def get_resource_message_channels_without_preload_content( return response_data.response - def _get_resource_message_channels_serialize( + def _get_resource_serialize( self, resource_id, _request_auth, @@ -2572,7 +2630,7 @@ def _get_resource_message_channels_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/resources/{resource_id}/message-channels', + resource_path='/resources/{resource_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2589,10 +2647,9 @@ def _get_resource_message_channels_serialize( @validate_call - def get_resource_nhis( + def get_resource_access_levels( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, + resource_id: Annotated[UUID, Field(description="The ID of the resource whose access levels to return.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2605,15 +2662,13 @@ def get_resource_nhis( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AccessList: - """get_resource_nhis + ) -> ResourceAccessLevelList: + """Get resource access levels - Gets the list of non-human identities with access to this resource. + Returns the list of access levels defined for the resource. Resources that only offer default (unnamed) access return an empty list. - :param resource_id: The ID of the resource. (required) + :param resource_id: The ID of the resource whose access levels to return. (required) :type resource_id: UUID - :param limit: Limit the number of results returned. - :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2636,9 +2691,8 @@ def get_resource_nhis( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_nhis_serialize( + _param = self._get_resource_access_levels_serialize( resource_id=resource_id, - limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2646,7 +2700,8 @@ def get_resource_nhis( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccessList", + '200': "ResourceAccessLevelList", + '404': None, } response_data = self.api_client.call_api( *_param, @@ -2660,10 +2715,9 @@ def get_resource_nhis( @validate_call - def get_resource_nhis_with_http_info( + def get_resource_access_levels_with_http_info( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, + resource_id: Annotated[UUID, Field(description="The ID of the resource whose access levels to return.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2676,15 +2730,13 @@ def get_resource_nhis_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AccessList]: - """get_resource_nhis + ) -> ApiResponse[ResourceAccessLevelList]: + """Get resource access levels - Gets the list of non-human identities with access to this resource. + Returns the list of access levels defined for the resource. Resources that only offer default (unnamed) access return an empty list. - :param resource_id: The ID of the resource. (required) + :param resource_id: The ID of the resource whose access levels to return. (required) :type resource_id: UUID - :param limit: Limit the number of results returned. - :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2707,9 +2759,8 @@ def get_resource_nhis_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_nhis_serialize( + _param = self._get_resource_access_levels_serialize( resource_id=resource_id, - limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2717,7 +2768,8 @@ def get_resource_nhis_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccessList", + '200': "ResourceAccessLevelList", + '404': None, } response_data = self.api_client.call_api( *_param, @@ -2731,10 +2783,9 @@ def get_resource_nhis_with_http_info( @validate_call - def get_resource_nhis_without_preload_content( + def get_resource_access_levels_without_preload_content( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, + resource_id: Annotated[UUID, Field(description="The ID of the resource whose access levels to return.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2748,14 +2799,12 @@ def get_resource_nhis_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_resource_nhis + """Get resource access levels - Gets the list of non-human identities with access to this resource. + Returns the list of access levels defined for the resource. Resources that only offer default (unnamed) access return an empty list. - :param resource_id: The ID of the resource. (required) + :param resource_id: The ID of the resource whose access levels to return. (required) :type resource_id: UUID - :param limit: Limit the number of results returned. - :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2778,9 +2827,8 @@ def get_resource_nhis_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_nhis_serialize( + _param = self._get_resource_access_levels_serialize( resource_id=resource_id, - limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2788,7 +2836,8 @@ def get_resource_nhis_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccessList", + '200': "ResourceAccessLevelList", + '404': None, } response_data = self.api_client.call_api( *_param, @@ -2797,10 +2846,9 @@ def get_resource_nhis_without_preload_content( return response_data.response - def _get_resource_nhis_serialize( + def _get_resource_access_levels_serialize( self, resource_id, - limit, _request_auth, _content_type, _headers, @@ -2825,10 +2873,6 @@ def _get_resource_nhis_serialize( if resource_id is not None: _path_params['resource_id'] = resource_id # process the query parameters - if limit is not None: - - _query_params.append(('limit', limit)) - # process the header parameters # process the form parameters # process the body parameter @@ -2850,7 +2894,7 @@ def _get_resource_nhis_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/resources/{resource_id}/non-human-identities', + resource_path='/resources/{resource_id}/access_levels', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2867,9 +2911,9 @@ def _get_resource_nhis_serialize( @validate_call - def get_resource_reviewer_stages( + def get_resource_configuration_template( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + resource_id: Annotated[UUID, Field(description="The ID of the resource whose configuration template link is being read.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2882,12 +2926,12 @@ def get_resource_reviewer_stages( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[ReviewerStage]: - """get_resource_reviewer_stages + ) -> ResourceConfigurationTemplate: + """Get the ID of the configuration template linked to a resource - Gets the list reviewer stages for a resource. + Returns the ID of the configuration template that the resource is currently linked to. The response body is `{\"configuration_template_id\": \"\" | null}`: * `` is the ID of the configuration template the resource is linked to. * `null` means the resource is not linked to any configuration template and uses its own private configuration. This endpoint only exposes the link between a resource and a configuration template — it does not return the template's own fields (name, description, request configurations, visibility, etc.). To read those, call `GET /configuration-templates/{configuration_template_id}` with the ID returned here. - :param resource_id: The ID of the resource. (required) + :param resource_id: The ID of the resource whose configuration template link is being read. (required) :type resource_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2911,7 +2955,7 @@ def get_resource_reviewer_stages( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_reviewer_stages_serialize( + _param = self._get_resource_configuration_template_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2920,7 +2964,9 @@ def get_resource_reviewer_stages( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ReviewerStage]", + '200': "ResourceConfigurationTemplate", + '403': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -2934,9 +2980,9 @@ def get_resource_reviewer_stages( @validate_call - def get_resource_reviewer_stages_with_http_info( + def get_resource_configuration_template_with_http_info( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + resource_id: Annotated[UUID, Field(description="The ID of the resource whose configuration template link is being read.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2949,12 +2995,12 @@ def get_resource_reviewer_stages_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[ReviewerStage]]: - """get_resource_reviewer_stages + ) -> ApiResponse[ResourceConfigurationTemplate]: + """Get the ID of the configuration template linked to a resource - Gets the list reviewer stages for a resource. + Returns the ID of the configuration template that the resource is currently linked to. The response body is `{\"configuration_template_id\": \"\" | null}`: * `` is the ID of the configuration template the resource is linked to. * `null` means the resource is not linked to any configuration template and uses its own private configuration. This endpoint only exposes the link between a resource and a configuration template — it does not return the template's own fields (name, description, request configurations, visibility, etc.). To read those, call `GET /configuration-templates/{configuration_template_id}` with the ID returned here. - :param resource_id: The ID of the resource. (required) + :param resource_id: The ID of the resource whose configuration template link is being read. (required) :type resource_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2978,7 +3024,7 @@ def get_resource_reviewer_stages_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_reviewer_stages_serialize( + _param = self._get_resource_configuration_template_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2987,7 +3033,9 @@ def get_resource_reviewer_stages_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ReviewerStage]", + '200': "ResourceConfigurationTemplate", + '403': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -3001,9 +3049,9 @@ def get_resource_reviewer_stages_with_http_info( @validate_call - def get_resource_reviewer_stages_without_preload_content( + def get_resource_configuration_template_without_preload_content( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + resource_id: Annotated[UUID, Field(description="The ID of the resource whose configuration template link is being read.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3017,11 +3065,11 @@ def get_resource_reviewer_stages_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_resource_reviewer_stages + """Get the ID of the configuration template linked to a resource - Gets the list reviewer stages for a resource. + Returns the ID of the configuration template that the resource is currently linked to. The response body is `{\"configuration_template_id\": \"\" | null}`: * `` is the ID of the configuration template the resource is linked to. * `null` means the resource is not linked to any configuration template and uses its own private configuration. This endpoint only exposes the link between a resource and a configuration template — it does not return the template's own fields (name, description, request configurations, visibility, etc.). To read those, call `GET /configuration-templates/{configuration_template_id}` with the ID returned here. - :param resource_id: The ID of the resource. (required) + :param resource_id: The ID of the resource whose configuration template link is being read. (required) :type resource_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3045,7 +3093,7 @@ def get_resource_reviewer_stages_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_reviewer_stages_serialize( + _param = self._get_resource_configuration_template_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3054,7 +3102,9 @@ def get_resource_reviewer_stages_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ReviewerStage]", + '200': "ResourceConfigurationTemplate", + '403': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -3063,7 +3113,7 @@ def get_resource_reviewer_stages_without_preload_content( return response_data.response - def _get_resource_reviewer_stages_serialize( + def _get_resource_configuration_template_serialize( self, resource_id, _request_auth, @@ -3111,7 +3161,7 @@ def _get_resource_reviewer_stages_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/resources/{resource_id}/reviewer-stages', + resource_path='/resources/{resource_id}/configuration-template', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3128,7 +3178,7 @@ def _get_resource_reviewer_stages_serialize( @validate_call - def get_resource_reviewers( + def get_resource_custom_access_levels( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], _request_timeout: Union[ @@ -3143,10 +3193,10 @@ def get_resource_reviewers( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[UUID]: - """get_resource_reviewers + ) -> ResourceCustomAccessLevelList: + """get_resource_custom_access_levels - Gets the list of owner IDs of the reviewers for a resource. + Returns all custom access levels for a resource. If the resource is a parent type (e.g. GitHubOrg), returns aggregated roles across child resources. :param resource_id: The ID of the resource. (required) :type resource_id: UUID @@ -3172,7 +3222,7 @@ def get_resource_reviewers( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_reviewers_serialize( + _param = self._get_resource_custom_access_levels_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3181,7 +3231,9 @@ def get_resource_reviewers( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[UUID]", + '200': "ResourceCustomAccessLevelList", + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -3195,7 +3247,7 @@ def get_resource_reviewers( @validate_call - def get_resource_reviewers_with_http_info( + def get_resource_custom_access_levels_with_http_info( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], _request_timeout: Union[ @@ -3210,10 +3262,10 @@ def get_resource_reviewers_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[UUID]]: - """get_resource_reviewers + ) -> ApiResponse[ResourceCustomAccessLevelList]: + """get_resource_custom_access_levels - Gets the list of owner IDs of the reviewers for a resource. + Returns all custom access levels for a resource. If the resource is a parent type (e.g. GitHubOrg), returns aggregated roles across child resources. :param resource_id: The ID of the resource. (required) :type resource_id: UUID @@ -3239,7 +3291,7 @@ def get_resource_reviewers_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_reviewers_serialize( + _param = self._get_resource_custom_access_levels_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3248,7 +3300,9 @@ def get_resource_reviewers_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[UUID]", + '200': "ResourceCustomAccessLevelList", + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -3262,7 +3316,7 @@ def get_resource_reviewers_with_http_info( @validate_call - def get_resource_reviewers_without_preload_content( + def get_resource_custom_access_levels_without_preload_content( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], _request_timeout: Union[ @@ -3278,9 +3332,9 @@ def get_resource_reviewers_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_resource_reviewers + """get_resource_custom_access_levels - Gets the list of owner IDs of the reviewers for a resource. + Returns all custom access levels for a resource. If the resource is a parent type (e.g. GitHubOrg), returns aggregated roles across child resources. :param resource_id: The ID of the resource. (required) :type resource_id: UUID @@ -3306,7 +3360,7 @@ def get_resource_reviewers_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_reviewers_serialize( + _param = self._get_resource_custom_access_levels_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3315,7 +3369,9 @@ def get_resource_reviewers_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[UUID]", + '200': "ResourceCustomAccessLevelList", + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -3324,7 +3380,7 @@ def get_resource_reviewers_without_preload_content( return response_data.response - def _get_resource_reviewers_serialize( + def _get_resource_custom_access_levels_serialize( self, resource_id, _request_auth, @@ -3372,7 +3428,7 @@ def _get_resource_reviewers_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/resources/{resource_id}/reviewers', + resource_path='/resources/{resource_id}/custom-access-levels', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3389,9 +3445,9 @@ def _get_resource_reviewers_serialize( @validate_call - def get_resource_scoped_role_permissions( + def get_resource_groups( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource whose scoped role permissions belong to.")], + resource_id: Annotated[UUID, Field(description="The ID of the resource that the groups grant access to.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3404,12 +3460,12 @@ def get_resource_scoped_role_permissions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ScopedRolePermissionList: - """get_resource_scoped_role_permissions + ) -> GroupResourceList: + """get_resource_groups - Returns all the scoped role permissions that apply to the given resource. Only OPAL_SCOPED_ROLE resource type supports this field. + Returns a list of groups that grant access to the resource - :param resource_id: The ID of the resource whose scoped role permissions belong to. (required) + :param resource_id: The ID of the resource that the groups grant access to. (required) :type resource_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3433,7 +3489,7 @@ def get_resource_scoped_role_permissions( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_scoped_role_permissions_serialize( + _param = self._get_resource_groups_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3442,7 +3498,7 @@ def get_resource_scoped_role_permissions( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ScopedRolePermissionList", + '200': "GroupResourceList", } response_data = self.api_client.call_api( *_param, @@ -3456,9 +3512,9 @@ def get_resource_scoped_role_permissions( @validate_call - def get_resource_scoped_role_permissions_with_http_info( + def get_resource_groups_with_http_info( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource whose scoped role permissions belong to.")], + resource_id: Annotated[UUID, Field(description="The ID of the resource that the groups grant access to.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3471,12 +3527,12 @@ def get_resource_scoped_role_permissions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ScopedRolePermissionList]: - """get_resource_scoped_role_permissions + ) -> ApiResponse[GroupResourceList]: + """get_resource_groups - Returns all the scoped role permissions that apply to the given resource. Only OPAL_SCOPED_ROLE resource type supports this field. + Returns a list of groups that grant access to the resource - :param resource_id: The ID of the resource whose scoped role permissions belong to. (required) + :param resource_id: The ID of the resource that the groups grant access to. (required) :type resource_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3500,7 +3556,7 @@ def get_resource_scoped_role_permissions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_scoped_role_permissions_serialize( + _param = self._get_resource_groups_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3509,7 +3565,7 @@ def get_resource_scoped_role_permissions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ScopedRolePermissionList", + '200': "GroupResourceList", } response_data = self.api_client.call_api( *_param, @@ -3523,9 +3579,9 @@ def get_resource_scoped_role_permissions_with_http_info( @validate_call - def get_resource_scoped_role_permissions_without_preload_content( + def get_resource_groups_without_preload_content( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource whose scoped role permissions belong to.")], + resource_id: Annotated[UUID, Field(description="The ID of the resource that the groups grant access to.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3539,11 +3595,11 @@ def get_resource_scoped_role_permissions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_resource_scoped_role_permissions + """get_resource_groups - Returns all the scoped role permissions that apply to the given resource. Only OPAL_SCOPED_ROLE resource type supports this field. + Returns a list of groups that grant access to the resource - :param resource_id: The ID of the resource whose scoped role permissions belong to. (required) + :param resource_id: The ID of the resource that the groups grant access to. (required) :type resource_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3567,7 +3623,7 @@ def get_resource_scoped_role_permissions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_scoped_role_permissions_serialize( + _param = self._get_resource_groups_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3576,7 +3632,7 @@ def get_resource_scoped_role_permissions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ScopedRolePermissionList", + '200': "GroupResourceList", } response_data = self.api_client.call_api( *_param, @@ -3585,7 +3641,7 @@ def get_resource_scoped_role_permissions_without_preload_content( return response_data.response - def _get_resource_scoped_role_permissions_serialize( + def _get_resource_groups_serialize( self, resource_id, _request_auth, @@ -3633,7 +3689,7 @@ def _get_resource_scoped_role_permissions_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/resources/{resource_id}/scoped-role-permissions', + resource_path='/resources/{resource_id}/groups', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3650,9 +3706,9 @@ def _get_resource_scoped_role_permissions_serialize( @validate_call - def get_resource_tags( + def get_resource_message_channels( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource whose tags to return.")], + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3665,12 +3721,12 @@ def get_resource_tags( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TagsList: - """get_resource_tags + ) -> MessageChannelList: + """get_resource_message_channels - Returns all tags applied to the resource. + Gets the list of audit message channels attached to a resource. - :param resource_id: The ID of the resource whose tags to return. (required) + :param resource_id: The ID of the resource. (required) :type resource_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3694,7 +3750,7 @@ def get_resource_tags( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_tags_serialize( + _param = self._get_resource_message_channels_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3703,7 +3759,7 @@ def get_resource_tags( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TagsList", + '200': "MessageChannelList", } response_data = self.api_client.call_api( *_param, @@ -3717,9 +3773,9 @@ def get_resource_tags( @validate_call - def get_resource_tags_with_http_info( + def get_resource_message_channels_with_http_info( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource whose tags to return.")], + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3732,12 +3788,12 @@ def get_resource_tags_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TagsList]: - """get_resource_tags + ) -> ApiResponse[MessageChannelList]: + """get_resource_message_channels - Returns all tags applied to the resource. + Gets the list of audit message channels attached to a resource. - :param resource_id: The ID of the resource whose tags to return. (required) + :param resource_id: The ID of the resource. (required) :type resource_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3761,7 +3817,7 @@ def get_resource_tags_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_tags_serialize( + _param = self._get_resource_message_channels_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3770,7 +3826,7 @@ def get_resource_tags_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TagsList", + '200': "MessageChannelList", } response_data = self.api_client.call_api( *_param, @@ -3784,9 +3840,9 @@ def get_resource_tags_with_http_info( @validate_call - def get_resource_tags_without_preload_content( + def get_resource_message_channels_without_preload_content( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource whose tags to return.")], + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3800,11 +3856,11 @@ def get_resource_tags_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_resource_tags + """get_resource_message_channels - Returns all tags applied to the resource. + Gets the list of audit message channels attached to a resource. - :param resource_id: The ID of the resource whose tags to return. (required) + :param resource_id: The ID of the resource. (required) :type resource_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3828,7 +3884,7 @@ def get_resource_tags_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_tags_serialize( + _param = self._get_resource_message_channels_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3837,7 +3893,7 @@ def get_resource_tags_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TagsList", + '200': "MessageChannelList", } response_data = self.api_client.call_api( *_param, @@ -3846,7 +3902,7 @@ def get_resource_tags_without_preload_content( return response_data.response - def _get_resource_tags_serialize( + def _get_resource_message_channels_serialize( self, resource_id, _request_auth, @@ -3894,7 +3950,7 @@ def _get_resource_tags_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/resources/{resource_id}/tags', + resource_path='/resources/{resource_id}/message-channels', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3911,11 +3967,10 @@ def _get_resource_tags_serialize( @validate_call - def get_resource_user( + def get_resource_nhis( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - user_id: Annotated[UUID, Field(description="The ID of the user.")], - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3928,17 +3983,15 @@ def get_resource_user( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetResourceUser200Response: - """Get resource user + ) -> AccessList: + """get_resource_nhis - Returns information about a specific user's access to a resource. + Gets the list of non-human identities with access to this resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param user_id: The ID of the user. (required) - :type user_id: UUID - :param cursor: The pagination cursor value. - :type cursor: str + :param limit: Limit the number of results returned. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3961,10 +4014,9 @@ def get_resource_user( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_user_serialize( + _param = self._get_resource_nhis_serialize( resource_id=resource_id, - user_id=user_id, - cursor=cursor, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3972,8 +4024,7 @@ def get_resource_user( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetResourceUser200Response", - '404': None, + '200': "AccessList", } response_data = self.api_client.call_api( *_param, @@ -3987,11 +4038,10 @@ def get_resource_user( @validate_call - def get_resource_user_with_http_info( + def get_resource_nhis_with_http_info( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - user_id: Annotated[UUID, Field(description="The ID of the user.")], - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4004,17 +4054,15 @@ def get_resource_user_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetResourceUser200Response]: - """Get resource user + ) -> ApiResponse[AccessList]: + """get_resource_nhis - Returns information about a specific user's access to a resource. + Gets the list of non-human identities with access to this resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param user_id: The ID of the user. (required) - :type user_id: UUID - :param cursor: The pagination cursor value. - :type cursor: str + :param limit: Limit the number of results returned. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4037,10 +4085,9 @@ def get_resource_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_user_serialize( + _param = self._get_resource_nhis_serialize( resource_id=resource_id, - user_id=user_id, - cursor=cursor, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4048,8 +4095,7 @@ def get_resource_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetResourceUser200Response", - '404': None, + '200': "AccessList", } response_data = self.api_client.call_api( *_param, @@ -4063,11 +4109,10 @@ def get_resource_user_with_http_info( @validate_call - def get_resource_user_without_preload_content( + def get_resource_nhis_without_preload_content( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - user_id: Annotated[UUID, Field(description="The ID of the user.")], - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4081,16 +4126,14 @@ def get_resource_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get resource user + """get_resource_nhis - Returns information about a specific user's access to a resource. + Gets the list of non-human identities with access to this resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param user_id: The ID of the user. (required) - :type user_id: UUID - :param cursor: The pagination cursor value. - :type cursor: str + :param limit: Limit the number of results returned. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4113,10 +4156,9 @@ def get_resource_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_user_serialize( + _param = self._get_resource_nhis_serialize( resource_id=resource_id, - user_id=user_id, - cursor=cursor, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4124,8 +4166,7 @@ def get_resource_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetResourceUser200Response", - '404': None, + '200': "AccessList", } response_data = self.api_client.call_api( *_param, @@ -4134,11 +4175,10 @@ def get_resource_user_without_preload_content( return response_data.response - def _get_resource_user_serialize( + def _get_resource_nhis_serialize( self, resource_id, - user_id, - cursor, + limit, _request_auth, _content_type, _headers, @@ -4162,12 +4202,10 @@ def _get_resource_user_serialize( # process the path parameters if resource_id is not None: _path_params['resource_id'] = resource_id - if user_id is not None: - _path_params['user_id'] = user_id # process the query parameters - if cursor is not None: + if limit is not None: - _query_params.append(('cursor', cursor)) + _query_params.append(('limit', limit)) # process the header parameters # process the form parameters @@ -4190,7 +4228,7 @@ def _get_resource_user_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/resources/{resource_id}/users/{user_id}', + resource_path='/resources/{resource_id}/non-human-identities', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4207,10 +4245,9 @@ def _get_resource_user_serialize( @validate_call - def get_resource_users( + def get_resource_reviewer_stages( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4223,15 +4260,13 @@ def get_resource_users( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ResourceAccessUserList: - """Get resource users + ) -> List[ReviewerStage]: + """get_resource_reviewer_stages - Gets the list of users for this resource. + Gets the list reviewer stages for a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param limit: Limit the number of results returned. - :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4254,9 +4289,8 @@ def get_resource_users( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_users_serialize( + _param = self._get_resource_reviewer_stages_serialize( resource_id=resource_id, - limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4264,7 +4298,7 @@ def get_resource_users( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceAccessUserList", + '200': "List[ReviewerStage]", } response_data = self.api_client.call_api( *_param, @@ -4278,10 +4312,9 @@ def get_resource_users( @validate_call - def get_resource_users_with_http_info( + def get_resource_reviewer_stages_with_http_info( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4294,15 +4327,13 @@ def get_resource_users_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ResourceAccessUserList]: - """Get resource users + ) -> ApiResponse[List[ReviewerStage]]: + """get_resource_reviewer_stages - Gets the list of users for this resource. + Gets the list reviewer stages for a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param limit: Limit the number of results returned. - :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4325,9 +4356,8 @@ def get_resource_users_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_users_serialize( + _param = self._get_resource_reviewer_stages_serialize( resource_id=resource_id, - limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4335,7 +4365,7 @@ def get_resource_users_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceAccessUserList", + '200': "List[ReviewerStage]", } response_data = self.api_client.call_api( *_param, @@ -4349,10 +4379,9 @@ def get_resource_users_with_http_info( @validate_call - def get_resource_users_without_preload_content( + def get_resource_reviewer_stages_without_preload_content( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4366,14 +4395,12 @@ def get_resource_users_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get resource users + """get_resource_reviewer_stages - Gets the list of users for this resource. + Gets the list reviewer stages for a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param limit: Limit the number of results returned. - :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4396,9 +4423,8 @@ def get_resource_users_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_users_serialize( + _param = self._get_resource_reviewer_stages_serialize( resource_id=resource_id, - limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4406,7 +4432,7 @@ def get_resource_users_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceAccessUserList", + '200': "List[ReviewerStage]", } response_data = self.api_client.call_api( *_param, @@ -4415,10 +4441,9 @@ def get_resource_users_without_preload_content( return response_data.response - def _get_resource_users_serialize( + def _get_resource_reviewer_stages_serialize( self, resource_id, - limit, _request_auth, _content_type, _headers, @@ -4443,10 +4468,6 @@ def _get_resource_users_serialize( if resource_id is not None: _path_params['resource_id'] = resource_id # process the query parameters - if limit is not None: - - _query_params.append(('limit', limit)) - # process the header parameters # process the form parameters # process the body parameter @@ -4468,7 +4489,7 @@ def _get_resource_users_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/resources/{resource_id}/users', + resource_path='/resources/{resource_id}/reviewer-stages', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4485,7 +4506,7 @@ def _get_resource_users_serialize( @validate_call - def get_resource_visibility( + def get_resource_reviewers( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], _request_timeout: Union[ @@ -4500,10 +4521,10 @@ def get_resource_visibility( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> VisibilityInfo: - """get_resource_visibility + ) -> List[UUID]: + """get_resource_reviewers - Gets the visibility of this resource. + Gets the list of owner IDs of the reviewers for a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID @@ -4529,7 +4550,7 @@ def get_resource_visibility( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_visibility_serialize( + _param = self._get_resource_reviewers_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -4538,7 +4559,7 @@ def get_resource_visibility( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "VisibilityInfo", + '200': "List[UUID]", } response_data = self.api_client.call_api( *_param, @@ -4552,7 +4573,7 @@ def get_resource_visibility( @validate_call - def get_resource_visibility_with_http_info( + def get_resource_reviewers_with_http_info( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], _request_timeout: Union[ @@ -4567,10 +4588,10 @@ def get_resource_visibility_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[VisibilityInfo]: - """get_resource_visibility + ) -> ApiResponse[List[UUID]]: + """get_resource_reviewers - Gets the visibility of this resource. + Gets the list of owner IDs of the reviewers for a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID @@ -4596,7 +4617,7 @@ def get_resource_visibility_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_visibility_serialize( + _param = self._get_resource_reviewers_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -4605,7 +4626,7 @@ def get_resource_visibility_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "VisibilityInfo", + '200': "List[UUID]", } response_data = self.api_client.call_api( *_param, @@ -4619,7 +4640,7 @@ def get_resource_visibility_with_http_info( @validate_call - def get_resource_visibility_without_preload_content( + def get_resource_reviewers_without_preload_content( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], _request_timeout: Union[ @@ -4635,9 +4656,9 @@ def get_resource_visibility_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_resource_visibility + """get_resource_reviewers - Gets the visibility of this resource. + Gets the list of owner IDs of the reviewers for a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID @@ -4663,7 +4684,7 @@ def get_resource_visibility_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_visibility_serialize( + _param = self._get_resource_reviewers_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -4672,7 +4693,7 @@ def get_resource_visibility_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "VisibilityInfo", + '200': "List[UUID]", } response_data = self.api_client.call_api( *_param, @@ -4681,7 +4702,7 @@ def get_resource_visibility_without_preload_content( return response_data.response - def _get_resource_visibility_serialize( + def _get_resource_reviewers_serialize( self, resource_id, _request_auth, @@ -4729,7 +4750,7 @@ def _get_resource_visibility_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/resources/{resource_id}/visibility', + resource_path='/resources/{resource_id}/reviewers', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4746,17 +4767,9 @@ def _get_resource_visibility_serialize( @validate_call - def get_resources( + def get_resource_scoped_role_permissions( self, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, - resource_type_filter: Annotated[Optional[ResourceTypeEnum], Field(description="The resource type to filter by. Required when remote_id is provided.")] = None, - resource_ids: Annotated[Optional[List[UUID]], Field(description="The resource ids to filter by.")] = None, - resource_name: Annotated[Optional[StrictStr], Field(description="Resource name.")] = None, - parent_resource_id: Annotated[Optional[UUID], Field(description="The parent resource id to filter by.")] = None, - ancestor_resource_id: Annotated[Optional[UUID], Field(description="The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource.")] = None, - remote_id: Annotated[Optional[StrictStr], Field(description="Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided.")] = None, - tag_ids: Annotated[Optional[List[UUID]], Field(description="The IDs of the tags to filter by. Returns only resources that have any of these tags applied.")] = None, + resource_id: Annotated[UUID, Field(description="The ID of the resource whose scoped role permissions belong to.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4769,29 +4782,13 @@ def get_resources( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PaginatedResourcesList: - """Get resources + ) -> ScopedRolePermissionList: + """get_resource_scoped_role_permissions - Returns a list of resources for your organization. + Returns all the scoped role permissions that apply to the given resource. Only OPAL_SCOPED_ROLE resource type supports this field. - :param cursor: The pagination cursor value. - :type cursor: str - :param page_size: Number of results to return per page. Default is 200. - :type page_size: int - :param resource_type_filter: The resource type to filter by. Required when remote_id is provided. - :type resource_type_filter: ResourceTypeEnum - :param resource_ids: The resource ids to filter by. - :type resource_ids: List[UUID] - :param resource_name: Resource name. - :type resource_name: str - :param parent_resource_id: The parent resource id to filter by. - :type parent_resource_id: UUID - :param ancestor_resource_id: The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. - :type ancestor_resource_id: UUID - :param remote_id: Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided. - :type remote_id: str - :param tag_ids: The IDs of the tags to filter by. Returns only resources that have any of these tags applied. - :type tag_ids: List[UUID] + :param resource_id: The ID of the resource whose scoped role permissions belong to. (required) + :type resource_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4814,12 +4811,1606 @@ def get_resources( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resources_serialize( - cursor=cursor, - page_size=page_size, + _param = self._get_resource_scoped_role_permissions_serialize( + resource_id=resource_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScopedRolePermissionList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_resource_scoped_role_permissions_with_http_info( + self, + resource_id: Annotated[UUID, Field(description="The ID of the resource whose scoped role permissions belong to.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ScopedRolePermissionList]: + """get_resource_scoped_role_permissions + + Returns all the scoped role permissions that apply to the given resource. Only OPAL_SCOPED_ROLE resource type supports this field. + + :param resource_id: The ID of the resource whose scoped role permissions belong to. (required) + :type resource_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resource_scoped_role_permissions_serialize( + resource_id=resource_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScopedRolePermissionList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_resource_scoped_role_permissions_without_preload_content( + self, + resource_id: Annotated[UUID, Field(description="The ID of the resource whose scoped role permissions belong to.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_resource_scoped_role_permissions + + Returns all the scoped role permissions that apply to the given resource. Only OPAL_SCOPED_ROLE resource type supports this field. + + :param resource_id: The ID of the resource whose scoped role permissions belong to. (required) + :type resource_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resource_scoped_role_permissions_serialize( + resource_id=resource_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ScopedRolePermissionList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_resource_scoped_role_permissions_serialize( + self, + resource_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource_id is not None: + _path_params['resource_id'] = resource_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/resources/{resource_id}/scoped-role-permissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_resource_tags( + self, + resource_id: Annotated[UUID, Field(description="The ID of the resource whose tags to return.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TagsList: + """get_resource_tags + + Returns all tags applied to the resource. + + :param resource_id: The ID of the resource whose tags to return. (required) + :type resource_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resource_tags_serialize( + resource_id=resource_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TagsList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_resource_tags_with_http_info( + self, + resource_id: Annotated[UUID, Field(description="The ID of the resource whose tags to return.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TagsList]: + """get_resource_tags + + Returns all tags applied to the resource. + + :param resource_id: The ID of the resource whose tags to return. (required) + :type resource_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resource_tags_serialize( + resource_id=resource_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TagsList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_resource_tags_without_preload_content( + self, + resource_id: Annotated[UUID, Field(description="The ID of the resource whose tags to return.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_resource_tags + + Returns all tags applied to the resource. + + :param resource_id: The ID of the resource whose tags to return. (required) + :type resource_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resource_tags_serialize( + resource_id=resource_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TagsList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_resource_tags_serialize( + self, + resource_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource_id is not None: + _path_params['resource_id'] = resource_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/resources/{resource_id}/tags', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_resource_user( + self, + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + user_id: Annotated[UUID, Field(description="The ID of the user.")], + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetResourceUser200Response: + """Get resource user + + Returns information about a specific user's access to a resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: UUID + :param user_id: The ID of the user. (required) + :type user_id: UUID + :param cursor: The pagination cursor value. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resource_user_serialize( + resource_id=resource_id, + user_id=user_id, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetResourceUser200Response", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_resource_user_with_http_info( + self, + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + user_id: Annotated[UUID, Field(description="The ID of the user.")], + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetResourceUser200Response]: + """Get resource user + + Returns information about a specific user's access to a resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: UUID + :param user_id: The ID of the user. (required) + :type user_id: UUID + :param cursor: The pagination cursor value. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resource_user_serialize( + resource_id=resource_id, + user_id=user_id, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetResourceUser200Response", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_resource_user_without_preload_content( + self, + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + user_id: Annotated[UUID, Field(description="The ID of the user.")], + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get resource user + + Returns information about a specific user's access to a resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: UUID + :param user_id: The ID of the user. (required) + :type user_id: UUID + :param cursor: The pagination cursor value. + :type cursor: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resource_user_serialize( + resource_id=resource_id, + user_id=user_id, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetResourceUser200Response", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_resource_user_serialize( + self, + resource_id, + user_id, + cursor, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource_id is not None: + _path_params['resource_id'] = resource_id + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/resources/{resource_id}/users/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_resource_users( + self, + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ResourceAccessUserList: + """Get resource users + + Gets the list of users for this resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: UUID + :param limit: Limit the number of results returned. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resource_users_serialize( + resource_id=resource_id, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceAccessUserList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_resource_users_with_http_info( + self, + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ResourceAccessUserList]: + """Get resource users + + Gets the list of users for this resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: UUID + :param limit: Limit the number of results returned. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resource_users_serialize( + resource_id=resource_id, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceAccessUserList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_resource_users_without_preload_content( + self, + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get resource users + + Gets the list of users for this resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: UUID + :param limit: Limit the number of results returned. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resource_users_serialize( + resource_id=resource_id, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceAccessUserList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_resource_users_serialize( + self, + resource_id, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource_id is not None: + _path_params['resource_id'] = resource_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/resources/{resource_id}/users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_resource_visibility( + self, + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> VisibilityInfo: + """get_resource_visibility + + Gets the visibility of this resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resource_visibility_serialize( + resource_id=resource_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VisibilityInfo", + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_resource_visibility_with_http_info( + self, + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[VisibilityInfo]: + """get_resource_visibility + + Gets the visibility of this resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resource_visibility_serialize( + resource_id=resource_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VisibilityInfo", + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_resource_visibility_without_preload_content( + self, + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_resource_visibility + + Gets the visibility of this resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resource_visibility_serialize( + resource_id=resource_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VisibilityInfo", + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_resource_visibility_serialize( + self, + resource_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource_id is not None: + _path_params['resource_id'] = resource_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/resources/{resource_id}/visibility', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_resources( + self, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + resource_type_filter: Annotated[Optional[ResourceTypeEnum], Field(description="The resource type to filter by. Required when remote_id is provided.")] = None, + resource_ids: Annotated[Optional[List[UUID]], Field(description="The resource ids to filter by.")] = None, + resource_name: Annotated[Optional[StrictStr], Field(description="Filter resources by name. Matches against `name`, `remote_name`, parent-name combinations, and `remote_id`. Matching is case-insensitive. Use `resource_name_match` to choose the match type; when omitted, CONTAINS (substring) is used.")] = None, + resource_name_match: Annotated[Optional[NameMatchType], Field(description="How to apply `resource_name`. Requires `resource_name` to be set. Defaults to CONTAINS when `resource_name` is provided without this parameter. EQUALS, STARTS_WITH, and ENDS_WITH match only the resource's own `name` and `remote_name`, not parent-name combinations or `remote_id`.")] = None, + parent_resource_id: Annotated[Optional[UUID], Field(description="The parent resource id to filter by.")] = None, + ancestor_resource_id: Annotated[Optional[UUID], Field(description="The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource.")] = None, + remote_id: Annotated[Optional[StrictStr], Field(description="Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided.")] = None, + tag_ids: Annotated[Optional[List[UUID]], Field(description="The IDs of the tags to filter by. Returns only resources that have any of these tags applied.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginatedResourcesList: + """Get resources + + Returns a list of resources for your organization. + + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param resource_type_filter: The resource type to filter by. Required when remote_id is provided. + :type resource_type_filter: ResourceTypeEnum + :param resource_ids: The resource ids to filter by. + :type resource_ids: List[UUID] + :param resource_name: Filter resources by name. Matches against `name`, `remote_name`, parent-name combinations, and `remote_id`. Matching is case-insensitive. Use `resource_name_match` to choose the match type; when omitted, CONTAINS (substring) is used. + :type resource_name: str + :param resource_name_match: How to apply `resource_name`. Requires `resource_name` to be set. Defaults to CONTAINS when `resource_name` is provided without this parameter. EQUALS, STARTS_WITH, and ENDS_WITH match only the resource's own `name` and `remote_name`, not parent-name combinations or `remote_id`. + :type resource_name_match: NameMatchType + :param parent_resource_id: The parent resource id to filter by. + :type parent_resource_id: UUID + :param ancestor_resource_id: The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. + :type ancestor_resource_id: UUID + :param remote_id: Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided. + :type remote_id: str + :param tag_ids: The IDs of the tags to filter by. Returns only resources that have any of these tags applied. + :type tag_ids: List[UUID] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resources_serialize( + cursor=cursor, + page_size=page_size, + resource_type_filter=resource_type_filter, + resource_ids=resource_ids, + resource_name=resource_name, + resource_name_match=resource_name_match, + parent_resource_id=parent_resource_id, + ancestor_resource_id=ancestor_resource_id, + remote_id=remote_id, + tag_ids=tag_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedResourcesList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_resources_with_http_info( + self, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + resource_type_filter: Annotated[Optional[ResourceTypeEnum], Field(description="The resource type to filter by. Required when remote_id is provided.")] = None, + resource_ids: Annotated[Optional[List[UUID]], Field(description="The resource ids to filter by.")] = None, + resource_name: Annotated[Optional[StrictStr], Field(description="Filter resources by name. Matches against `name`, `remote_name`, parent-name combinations, and `remote_id`. Matching is case-insensitive. Use `resource_name_match` to choose the match type; when omitted, CONTAINS (substring) is used.")] = None, + resource_name_match: Annotated[Optional[NameMatchType], Field(description="How to apply `resource_name`. Requires `resource_name` to be set. Defaults to CONTAINS when `resource_name` is provided without this parameter. EQUALS, STARTS_WITH, and ENDS_WITH match only the resource's own `name` and `remote_name`, not parent-name combinations or `remote_id`.")] = None, + parent_resource_id: Annotated[Optional[UUID], Field(description="The parent resource id to filter by.")] = None, + ancestor_resource_id: Annotated[Optional[UUID], Field(description="The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource.")] = None, + remote_id: Annotated[Optional[StrictStr], Field(description="Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided.")] = None, + tag_ids: Annotated[Optional[List[UUID]], Field(description="The IDs of the tags to filter by. Returns only resources that have any of these tags applied.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PaginatedResourcesList]: + """Get resources + + Returns a list of resources for your organization. + + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param resource_type_filter: The resource type to filter by. Required when remote_id is provided. + :type resource_type_filter: ResourceTypeEnum + :param resource_ids: The resource ids to filter by. + :type resource_ids: List[UUID] + :param resource_name: Filter resources by name. Matches against `name`, `remote_name`, parent-name combinations, and `remote_id`. Matching is case-insensitive. Use `resource_name_match` to choose the match type; when omitted, CONTAINS (substring) is used. + :type resource_name: str + :param resource_name_match: How to apply `resource_name`. Requires `resource_name` to be set. Defaults to CONTAINS when `resource_name` is provided without this parameter. EQUALS, STARTS_WITH, and ENDS_WITH match only the resource's own `name` and `remote_name`, not parent-name combinations or `remote_id`. + :type resource_name_match: NameMatchType + :param parent_resource_id: The parent resource id to filter by. + :type parent_resource_id: UUID + :param ancestor_resource_id: The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. + :type ancestor_resource_id: UUID + :param remote_id: Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided. + :type remote_id: str + :param tag_ids: The IDs of the tags to filter by. Returns only resources that have any of these tags applied. + :type tag_ids: List[UUID] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resources_serialize( + cursor=cursor, + page_size=page_size, + resource_type_filter=resource_type_filter, + resource_ids=resource_ids, + resource_name=resource_name, + resource_name_match=resource_name_match, + parent_resource_id=parent_resource_id, + ancestor_resource_id=ancestor_resource_id, + remote_id=remote_id, + tag_ids=tag_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedResourcesList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_resources_without_preload_content( + self, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + resource_type_filter: Annotated[Optional[ResourceTypeEnum], Field(description="The resource type to filter by. Required when remote_id is provided.")] = None, + resource_ids: Annotated[Optional[List[UUID]], Field(description="The resource ids to filter by.")] = None, + resource_name: Annotated[Optional[StrictStr], Field(description="Filter resources by name. Matches against `name`, `remote_name`, parent-name combinations, and `remote_id`. Matching is case-insensitive. Use `resource_name_match` to choose the match type; when omitted, CONTAINS (substring) is used.")] = None, + resource_name_match: Annotated[Optional[NameMatchType], Field(description="How to apply `resource_name`. Requires `resource_name` to be set. Defaults to CONTAINS when `resource_name` is provided without this parameter. EQUALS, STARTS_WITH, and ENDS_WITH match only the resource's own `name` and `remote_name`, not parent-name combinations or `remote_id`.")] = None, + parent_resource_id: Annotated[Optional[UUID], Field(description="The parent resource id to filter by.")] = None, + ancestor_resource_id: Annotated[Optional[UUID], Field(description="The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource.")] = None, + remote_id: Annotated[Optional[StrictStr], Field(description="Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided.")] = None, + tag_ids: Annotated[Optional[List[UUID]], Field(description="The IDs of the tags to filter by. Returns only resources that have any of these tags applied.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get resources + + Returns a list of resources for your organization. + + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param resource_type_filter: The resource type to filter by. Required when remote_id is provided. + :type resource_type_filter: ResourceTypeEnum + :param resource_ids: The resource ids to filter by. + :type resource_ids: List[UUID] + :param resource_name: Filter resources by name. Matches against `name`, `remote_name`, parent-name combinations, and `remote_id`. Matching is case-insensitive. Use `resource_name_match` to choose the match type; when omitted, CONTAINS (substring) is used. + :type resource_name: str + :param resource_name_match: How to apply `resource_name`. Requires `resource_name` to be set. Defaults to CONTAINS when `resource_name` is provided without this parameter. EQUALS, STARTS_WITH, and ENDS_WITH match only the resource's own `name` and `remote_name`, not parent-name combinations or `remote_id`. + :type resource_name_match: NameMatchType + :param parent_resource_id: The parent resource id to filter by. + :type parent_resource_id: UUID + :param ancestor_resource_id: The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. + :type ancestor_resource_id: UUID + :param remote_id: Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided. + :type remote_id: str + :param tag_ids: The IDs of the tags to filter by. Returns only resources that have any of these tags applied. + :type tag_ids: List[UUID] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_resources_serialize( + cursor=cursor, + page_size=page_size, resource_type_filter=resource_type_filter, resource_ids=resource_ids, resource_name=resource_name, + resource_name_match=resource_name_match, parent_resource_id=parent_resource_id, ancestor_resource_id=ancestor_resource_id, remote_id=remote_id, @@ -4831,7 +6422,512 @@ def get_resources( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaginatedResourcesList", + '200': "PaginatedResourcesList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_resources_serialize( + self, + cursor, + page_size, + resource_type_filter, + resource_ids, + resource_name, + resource_name_match, + parent_resource_id, + ancestor_resource_id, + remote_id, + tag_ids, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'resource_ids': 'csv', + 'tag_ids': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if resource_type_filter is not None: + + _query_params.append(('resource_type_filter', resource_type_filter.value)) + + if resource_ids is not None: + + _query_params.append(('resource_ids', resource_ids)) + + if resource_name is not None: + + _query_params.append(('resource_name', resource_name)) + + if resource_name_match is not None: + + _query_params.append(('resource_name_match', resource_name_match.value)) + + if parent_resource_id is not None: + + _query_params.append(('parent_resource_id', parent_resource_id)) + + if ancestor_resource_id is not None: + + _query_params.append(('ancestor_resource_id', ancestor_resource_id)) + + if remote_id is not None: + + _query_params.append(('remote_id', remote_id)) + + if tag_ids is not None: + + _query_params.append(('tag_ids', tag_ids)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/resources', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_user_resources( + self, + user_id: Annotated[UUID, Field(description="The ID of the user.")], + limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + include_unmanaged: Annotated[Optional[StrictBool], Field(description="Include user's access to unmanaged resources.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ResourceAccessUserList: + """get_user_resources + + Gets the list of resources for this user. + + :param user_id: The ID of the user. (required) + :type user_id: UUID + :param limit: Limit the number of results returned. + :type limit: int + :param cursor: The pagination cursor value. + :type cursor: str + :param include_unmanaged: Include user's access to unmanaged resources. + :type include_unmanaged: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_resources_serialize( + user_id=user_id, + limit=limit, + cursor=cursor, + include_unmanaged=include_unmanaged, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceAccessUserList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_user_resources_with_http_info( + self, + user_id: Annotated[UUID, Field(description="The ID of the user.")], + limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + include_unmanaged: Annotated[Optional[StrictBool], Field(description="Include user's access to unmanaged resources.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ResourceAccessUserList]: + """get_user_resources + + Gets the list of resources for this user. + + :param user_id: The ID of the user. (required) + :type user_id: UUID + :param limit: Limit the number of results returned. + :type limit: int + :param cursor: The pagination cursor value. + :type cursor: str + :param include_unmanaged: Include user's access to unmanaged resources. + :type include_unmanaged: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_resources_serialize( + user_id=user_id, + limit=limit, + cursor=cursor, + include_unmanaged=include_unmanaged, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceAccessUserList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_user_resources_without_preload_content( + self, + user_id: Annotated[UUID, Field(description="The ID of the user.")], + limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + include_unmanaged: Annotated[Optional[StrictBool], Field(description="Include user's access to unmanaged resources.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_user_resources + + Gets the list of resources for this user. + + :param user_id: The ID of the user. (required) + :type user_id: UUID + :param limit: Limit the number of results returned. + :type limit: int + :param cursor: The pagination cursor value. + :type cursor: str + :param include_unmanaged: Include user's access to unmanaged resources. + :type include_unmanaged: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_resources_serialize( + user_id=user_id, + limit=limit, + cursor=cursor, + include_unmanaged=include_unmanaged, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceAccessUserList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_resources_serialize( + self, + user_id, + limit, + cursor, + include_unmanaged, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if include_unmanaged is not None: + + _query_params.append(('include_unmanaged', include_unmanaged)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/resources/users/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def resource_user_access_status_retrieve( + self, + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + user_id: Annotated[UUID, Field(description="The ID of the user.")], + access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ResourceUserAccessStatus: + """(Deprecated) resource_user_access_status_retrieve + + Get user's access status to a resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: UUID + :param user_id: The ID of the user. (required) + :type user_id: UUID + :param access_level_remote_id: The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. + :type access_level_remote_id: str + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + warnings.warn("GET /resource-user-access-status/{resource_id}/{user_id} is deprecated.", DeprecationWarning) + + _param = self._resource_user_access_status_retrieve_serialize( + resource_id=resource_id, + user_id=user_id, + access_level_remote_id=access_level_remote_id, + cursor=cursor, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceUserAccessStatus", } response_data = self.api_client.call_api( *_param, @@ -4845,17 +6941,13 @@ def get_resources( @validate_call - def get_resources_with_http_info( + def resource_user_access_status_retrieve_with_http_info( self, + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + user_id: Annotated[UUID, Field(description="The ID of the user.")], + access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, - resource_type_filter: Annotated[Optional[ResourceTypeEnum], Field(description="The resource type to filter by. Required when remote_id is provided.")] = None, - resource_ids: Annotated[Optional[List[UUID]], Field(description="The resource ids to filter by.")] = None, - resource_name: Annotated[Optional[StrictStr], Field(description="Resource name.")] = None, - parent_resource_id: Annotated[Optional[UUID], Field(description="The parent resource id to filter by.")] = None, - ancestor_resource_id: Annotated[Optional[UUID], Field(description="The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource.")] = None, - remote_id: Annotated[Optional[StrictStr], Field(description="Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided.")] = None, - tag_ids: Annotated[Optional[List[UUID]], Field(description="The IDs of the tags to filter by. Returns only resources that have any of these tags applied.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4868,29 +6960,21 @@ def get_resources_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PaginatedResourcesList]: - """Get resources + ) -> ApiResponse[ResourceUserAccessStatus]: + """(Deprecated) resource_user_access_status_retrieve - Returns a list of resources for your organization. + Get user's access status to a resource. + :param resource_id: The ID of the resource. (required) + :type resource_id: UUID + :param user_id: The ID of the user. (required) + :type user_id: UUID + :param access_level_remote_id: The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. + :type access_level_remote_id: str :param cursor: The pagination cursor value. :type cursor: str :param page_size: Number of results to return per page. Default is 200. :type page_size: int - :param resource_type_filter: The resource type to filter by. Required when remote_id is provided. - :type resource_type_filter: ResourceTypeEnum - :param resource_ids: The resource ids to filter by. - :type resource_ids: List[UUID] - :param resource_name: Resource name. - :type resource_name: str - :param parent_resource_id: The parent resource id to filter by. - :type parent_resource_id: UUID - :param ancestor_resource_id: The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. - :type ancestor_resource_id: UUID - :param remote_id: Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided. - :type remote_id: str - :param tag_ids: The IDs of the tags to filter by. Returns only resources that have any of these tags applied. - :type tag_ids: List[UUID] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4912,17 +6996,14 @@ def get_resources_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /resource-user-access-status/{resource_id}/{user_id} is deprecated.", DeprecationWarning) - _param = self._get_resources_serialize( + _param = self._resource_user_access_status_retrieve_serialize( + resource_id=resource_id, + user_id=user_id, + access_level_remote_id=access_level_remote_id, cursor=cursor, page_size=page_size, - resource_type_filter=resource_type_filter, - resource_ids=resource_ids, - resource_name=resource_name, - parent_resource_id=parent_resource_id, - ancestor_resource_id=ancestor_resource_id, - remote_id=remote_id, - tag_ids=tag_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4930,7 +7011,7 @@ def get_resources_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaginatedResourcesList", + '200': "ResourceUserAccessStatus", } response_data = self.api_client.call_api( *_param, @@ -4944,17 +7025,13 @@ def get_resources_with_http_info( @validate_call - def get_resources_without_preload_content( + def resource_user_access_status_retrieve_without_preload_content( self, + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + user_id: Annotated[UUID, Field(description="The ID of the user.")], + access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, - resource_type_filter: Annotated[Optional[ResourceTypeEnum], Field(description="The resource type to filter by. Required when remote_id is provided.")] = None, - resource_ids: Annotated[Optional[List[UUID]], Field(description="The resource ids to filter by.")] = None, - resource_name: Annotated[Optional[StrictStr], Field(description="Resource name.")] = None, - parent_resource_id: Annotated[Optional[UUID], Field(description="The parent resource id to filter by.")] = None, - ancestor_resource_id: Annotated[Optional[UUID], Field(description="The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource.")] = None, - remote_id: Annotated[Optional[StrictStr], Field(description="Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided.")] = None, - tag_ids: Annotated[Optional[List[UUID]], Field(description="The IDs of the tags to filter by. Returns only resources that have any of these tags applied.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4968,28 +7045,20 @@ def get_resources_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get resources + """(Deprecated) resource_user_access_status_retrieve - Returns a list of resources for your organization. + Get user's access status to a resource. + :param resource_id: The ID of the resource. (required) + :type resource_id: UUID + :param user_id: The ID of the user. (required) + :type user_id: UUID + :param access_level_remote_id: The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. + :type access_level_remote_id: str :param cursor: The pagination cursor value. :type cursor: str :param page_size: Number of results to return per page. Default is 200. :type page_size: int - :param resource_type_filter: The resource type to filter by. Required when remote_id is provided. - :type resource_type_filter: ResourceTypeEnum - :param resource_ids: The resource ids to filter by. - :type resource_ids: List[UUID] - :param resource_name: Resource name. - :type resource_name: str - :param parent_resource_id: The parent resource id to filter by. - :type parent_resource_id: UUID - :param ancestor_resource_id: The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. - :type ancestor_resource_id: UUID - :param remote_id: Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided. - :type remote_id: str - :param tag_ids: The IDs of the tags to filter by. Returns only resources that have any of these tags applied. - :type tag_ids: List[UUID] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5011,17 +7080,14 @@ def get_resources_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /resource-user-access-status/{resource_id}/{user_id} is deprecated.", DeprecationWarning) - _param = self._get_resources_serialize( + _param = self._resource_user_access_status_retrieve_serialize( + resource_id=resource_id, + user_id=user_id, + access_level_remote_id=access_level_remote_id, cursor=cursor, page_size=page_size, - resource_type_filter=resource_type_filter, - resource_ids=resource_ids, - resource_name=resource_name, - parent_resource_id=parent_resource_id, - ancestor_resource_id=ancestor_resource_id, - remote_id=remote_id, - tag_ids=tag_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5029,7 +7095,7 @@ def get_resources_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaginatedResourcesList", + '200': "ResourceUserAccessStatus", } response_data = self.api_client.call_api( *_param, @@ -5038,17 +7104,13 @@ def get_resources_without_preload_content( return response_data.response - def _get_resources_serialize( + def _resource_user_access_status_retrieve_serialize( self, + resource_id, + user_id, + access_level_remote_id, cursor, page_size, - resource_type_filter, - resource_ids, - resource_name, - parent_resource_id, - ancestor_resource_id, - remote_id, - tag_ids, _request_auth, _content_type, _headers, @@ -5058,8 +7120,6 @@ def _get_resources_serialize( _host = None _collection_formats: Dict[str, str] = { - 'resource_ids': 'csv', - 'tag_ids': 'multi', } _path_params: Dict[str, str] = {} @@ -5072,7 +7132,15 @@ def _get_resources_serialize( _body_params: Optional[bytes] = None # process the path parameters + if resource_id is not None: + _path_params['resource_id'] = resource_id + if user_id is not None: + _path_params['user_id'] = user_id # process the query parameters + if access_level_remote_id is not None: + + _query_params.append(('access_level_remote_id', access_level_remote_id)) + if cursor is not None: _query_params.append(('cursor', cursor)) @@ -5081,34 +7149,6 @@ def _get_resources_serialize( _query_params.append(('page_size', page_size)) - if resource_type_filter is not None: - - _query_params.append(('resource_type_filter', resource_type_filter.value)) - - if resource_ids is not None: - - _query_params.append(('resource_ids', resource_ids)) - - if resource_name is not None: - - _query_params.append(('resource_name', resource_name)) - - if parent_resource_id is not None: - - _query_params.append(('parent_resource_id', parent_resource_id)) - - if ancestor_resource_id is not None: - - _query_params.append(('ancestor_resource_id', ancestor_resource_id)) - - if remote_id is not None: - - _query_params.append(('remote_id', remote_id)) - - if tag_ids is not None: - - _query_params.append(('tag_ids', tag_ids)) - # process the header parameters # process the form parameters # process the body parameter @@ -5130,7 +7170,7 @@ def _get_resources_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/resources', + resource_path='/resource-user-access-status/{resource_id}/{user_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5147,12 +7187,10 @@ def _get_resources_serialize( @validate_call - def get_user_resources( + def set_resource_message_channels( self, - user_id: Annotated[UUID, Field(description="The ID of the user.")], - limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - include_unmanaged: Annotated[Optional[StrictBool], Field(description="Include user's access to unmanaged resources.")] = None, + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + message_channel_id_list: MessageChannelIDList, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5165,19 +7203,15 @@ def get_user_resources( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ResourceAccessUserList: - """get_user_resources + ) -> List[UUID]: + """set_resource_message_channels - Gets the list of resources for this user. + Sets the list of audit message channels attached to a resource. - :param user_id: The ID of the user. (required) - :type user_id: UUID - :param limit: Limit the number of results returned. - :type limit: int - :param cursor: The pagination cursor value. - :type cursor: str - :param include_unmanaged: Include user's access to unmanaged resources. - :type include_unmanaged: bool + :param resource_id: The ID of the resource. (required) + :type resource_id: UUID + :param message_channel_id_list: (required) + :type message_channel_id_list: MessageChannelIDList :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5200,11 +7234,9 @@ def get_user_resources( :return: Returns the result object. """ # noqa: E501 - _param = self._get_user_resources_serialize( - user_id=user_id, - limit=limit, - cursor=cursor, - include_unmanaged=include_unmanaged, + _param = self._set_resource_message_channels_serialize( + resource_id=resource_id, + message_channel_id_list=message_channel_id_list, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5212,7 +7244,7 @@ def get_user_resources( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceAccessUserList", + '200': "List[UUID]", } response_data = self.api_client.call_api( *_param, @@ -5226,12 +7258,10 @@ def get_user_resources( @validate_call - def get_user_resources_with_http_info( + def set_resource_message_channels_with_http_info( self, - user_id: Annotated[UUID, Field(description="The ID of the user.")], - limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - include_unmanaged: Annotated[Optional[StrictBool], Field(description="Include user's access to unmanaged resources.")] = None, + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + message_channel_id_list: MessageChannelIDList, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5244,19 +7274,15 @@ def get_user_resources_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ResourceAccessUserList]: - """get_user_resources + ) -> ApiResponse[List[UUID]]: + """set_resource_message_channels - Gets the list of resources for this user. + Sets the list of audit message channels attached to a resource. - :param user_id: The ID of the user. (required) - :type user_id: UUID - :param limit: Limit the number of results returned. - :type limit: int - :param cursor: The pagination cursor value. - :type cursor: str - :param include_unmanaged: Include user's access to unmanaged resources. - :type include_unmanaged: bool + :param resource_id: The ID of the resource. (required) + :type resource_id: UUID + :param message_channel_id_list: (required) + :type message_channel_id_list: MessageChannelIDList :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5279,11 +7305,9 @@ def get_user_resources_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_user_resources_serialize( - user_id=user_id, - limit=limit, - cursor=cursor, - include_unmanaged=include_unmanaged, + _param = self._set_resource_message_channels_serialize( + resource_id=resource_id, + message_channel_id_list=message_channel_id_list, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5291,7 +7315,7 @@ def get_user_resources_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceAccessUserList", + '200': "List[UUID]", } response_data = self.api_client.call_api( *_param, @@ -5305,12 +7329,10 @@ def get_user_resources_with_http_info( @validate_call - def get_user_resources_without_preload_content( + def set_resource_message_channels_without_preload_content( self, - user_id: Annotated[UUID, Field(description="The ID of the user.")], - limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - include_unmanaged: Annotated[Optional[StrictBool], Field(description="Include user's access to unmanaged resources.")] = None, + resource_id: Annotated[UUID, Field(description="The ID of the resource.")], + message_channel_id_list: MessageChannelIDList, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5324,18 +7346,14 @@ def get_user_resources_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_user_resources + """set_resource_message_channels - Gets the list of resources for this user. + Sets the list of audit message channels attached to a resource. - :param user_id: The ID of the user. (required) - :type user_id: UUID - :param limit: Limit the number of results returned. - :type limit: int - :param cursor: The pagination cursor value. - :type cursor: str - :param include_unmanaged: Include user's access to unmanaged resources. - :type include_unmanaged: bool + :param resource_id: The ID of the resource. (required) + :type resource_id: UUID + :param message_channel_id_list: (required) + :type message_channel_id_list: MessageChannelIDList :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5358,11 +7376,9 @@ def get_user_resources_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_user_resources_serialize( - user_id=user_id, - limit=limit, - cursor=cursor, - include_unmanaged=include_unmanaged, + _param = self._set_resource_message_channels_serialize( + resource_id=resource_id, + message_channel_id_list=message_channel_id_list, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5370,7 +7386,7 @@ def get_user_resources_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceAccessUserList", + '200': "List[UUID]", } response_data = self.api_client.call_api( *_param, @@ -5379,12 +7395,10 @@ def get_user_resources_without_preload_content( return response_data.response - def _get_user_resources_serialize( + def _set_resource_message_channels_serialize( self, - user_id, - limit, - cursor, - include_unmanaged, + resource_id, + message_channel_id_list, _request_auth, _content_type, _headers, @@ -5406,24 +7420,14 @@ def _get_user_resources_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['user_id'] = user_id + if resource_id is not None: + _path_params['resource_id'] = resource_id # process the query parameters - if limit is not None: - - _query_params.append(('limit', limit)) - - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if include_unmanaged is not None: - - _query_params.append(('include_unmanaged', include_unmanaged)) - # process the header parameters # process the form parameters # process the body parameter + if message_channel_id_list is not None: + _body_params = message_channel_id_list # set the HTTP header `Accept` @@ -5434,6 +7438,19 @@ def _get_user_resources_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -5441,8 +7458,8 @@ def _get_user_resources_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/resources/users/{user_id}', + method='PUT', + resource_path='/resources/{resource_id}/message-channels', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5459,13 +7476,10 @@ def _get_user_resources_serialize( @validate_call - def resource_user_access_status_retrieve( + def set_resource_reviewer_stages( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - user_id: Annotated[UUID, Field(description="The ID of the user.")], - access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + reviewer_stage_list: ReviewerStageList, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5478,21 +7492,15 @@ def resource_user_access_status_retrieve( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ResourceUserAccessStatus: - """(Deprecated) resource_user_access_status_retrieve + ) -> List[ReviewerStage]: + """set_resource_reviewer_stages - Get user's access status to a resource. + Sets the list of reviewer stages for a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param user_id: The ID of the user. (required) - :type user_id: UUID - :param access_level_remote_id: The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. - :type access_level_remote_id: str - :param cursor: The pagination cursor value. - :type cursor: str - :param page_size: Number of results to return per page. Default is 200. - :type page_size: int + :param reviewer_stage_list: (required) + :type reviewer_stage_list: ReviewerStageList :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5514,14 +7522,10 @@ def resource_user_access_status_retrieve( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /resource-user-access-status/{resource_id}/{user_id} is deprecated.", DeprecationWarning) - _param = self._resource_user_access_status_retrieve_serialize( + _param = self._set_resource_reviewer_stages_serialize( resource_id=resource_id, - user_id=user_id, - access_level_remote_id=access_level_remote_id, - cursor=cursor, - page_size=page_size, + reviewer_stage_list=reviewer_stage_list, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5529,7 +7533,7 @@ def resource_user_access_status_retrieve( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceUserAccessStatus", + '200': "List[ReviewerStage]", } response_data = self.api_client.call_api( *_param, @@ -5543,13 +7547,10 @@ def resource_user_access_status_retrieve( @validate_call - def resource_user_access_status_retrieve_with_http_info( + def set_resource_reviewer_stages_with_http_info( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - user_id: Annotated[UUID, Field(description="The ID of the user.")], - access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + reviewer_stage_list: ReviewerStageList, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5562,21 +7563,15 @@ def resource_user_access_status_retrieve_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ResourceUserAccessStatus]: - """(Deprecated) resource_user_access_status_retrieve + ) -> ApiResponse[List[ReviewerStage]]: + """set_resource_reviewer_stages - Get user's access status to a resource. + Sets the list of reviewer stages for a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param user_id: The ID of the user. (required) - :type user_id: UUID - :param access_level_remote_id: The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. - :type access_level_remote_id: str - :param cursor: The pagination cursor value. - :type cursor: str - :param page_size: Number of results to return per page. Default is 200. - :type page_size: int + :param reviewer_stage_list: (required) + :type reviewer_stage_list: ReviewerStageList :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5598,14 +7593,10 @@ def resource_user_access_status_retrieve_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /resource-user-access-status/{resource_id}/{user_id} is deprecated.", DeprecationWarning) - _param = self._resource_user_access_status_retrieve_serialize( + _param = self._set_resource_reviewer_stages_serialize( resource_id=resource_id, - user_id=user_id, - access_level_remote_id=access_level_remote_id, - cursor=cursor, - page_size=page_size, + reviewer_stage_list=reviewer_stage_list, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5613,7 +7604,7 @@ def resource_user_access_status_retrieve_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceUserAccessStatus", + '200': "List[ReviewerStage]", } response_data = self.api_client.call_api( *_param, @@ -5627,13 +7618,10 @@ def resource_user_access_status_retrieve_with_http_info( @validate_call - def resource_user_access_status_retrieve_without_preload_content( + def set_resource_reviewer_stages_without_preload_content( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - user_id: Annotated[UUID, Field(description="The ID of the user.")], - access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + reviewer_stage_list: ReviewerStageList, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5647,20 +7635,14 @@ def resource_user_access_status_retrieve_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) resource_user_access_status_retrieve + """set_resource_reviewer_stages - Get user's access status to a resource. + Sets the list of reviewer stages for a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param user_id: The ID of the user. (required) - :type user_id: UUID - :param access_level_remote_id: The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. - :type access_level_remote_id: str - :param cursor: The pagination cursor value. - :type cursor: str - :param page_size: Number of results to return per page. Default is 200. - :type page_size: int + :param reviewer_stage_list: (required) + :type reviewer_stage_list: ReviewerStageList :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5682,14 +7664,10 @@ def resource_user_access_status_retrieve_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /resource-user-access-status/{resource_id}/{user_id} is deprecated.", DeprecationWarning) - _param = self._resource_user_access_status_retrieve_serialize( + _param = self._set_resource_reviewer_stages_serialize( resource_id=resource_id, - user_id=user_id, - access_level_remote_id=access_level_remote_id, - cursor=cursor, - page_size=page_size, + reviewer_stage_list=reviewer_stage_list, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5697,7 +7675,7 @@ def resource_user_access_status_retrieve_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceUserAccessStatus", + '200': "List[ReviewerStage]", } response_data = self.api_client.call_api( *_param, @@ -5706,13 +7684,10 @@ def resource_user_access_status_retrieve_without_preload_content( return response_data.response - def _resource_user_access_status_retrieve_serialize( + def _set_resource_reviewer_stages_serialize( self, resource_id, - user_id, - access_level_remote_id, - cursor, - page_size, + reviewer_stage_list, _request_auth, _content_type, _headers, @@ -5736,24 +7711,12 @@ def _resource_user_access_status_retrieve_serialize( # process the path parameters if resource_id is not None: _path_params['resource_id'] = resource_id - if user_id is not None: - _path_params['user_id'] = user_id # process the query parameters - if access_level_remote_id is not None: - - _query_params.append(('access_level_remote_id', access_level_remote_id)) - - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if page_size is not None: - - _query_params.append(('page_size', page_size)) - # process the header parameters # process the form parameters # process the body parameter + if reviewer_stage_list is not None: + _body_params = reviewer_stage_list # set the HTTP header `Accept` @@ -5764,6 +7727,19 @@ def _resource_user_access_status_retrieve_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -5771,8 +7747,8 @@ def _resource_user_access_status_retrieve_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/resource-user-access-status/{resource_id}/{user_id}', + method='PUT', + resource_path='/resources/{resource_id}/reviewer-stages', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5789,10 +7765,10 @@ def _resource_user_access_status_retrieve_serialize( @validate_call - def set_resource_message_channels( + def set_resource_reviewers( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - message_channel_id_list: MessageChannelIDList, + reviewer_id_list: ReviewerIDList, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5806,14 +7782,14 @@ def set_resource_message_channels( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> List[UUID]: - """set_resource_message_channels + """set_resource_reviewers - Sets the list of audit message channels attached to a resource. + Sets the list of reviewers for a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param message_channel_id_list: (required) - :type message_channel_id_list: MessageChannelIDList + :param reviewer_id_list: (required) + :type reviewer_id_list: ReviewerIDList :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5836,9 +7812,9 @@ def set_resource_message_channels( :return: Returns the result object. """ # noqa: E501 - _param = self._set_resource_message_channels_serialize( + _param = self._set_resource_reviewers_serialize( resource_id=resource_id, - message_channel_id_list=message_channel_id_list, + reviewer_id_list=reviewer_id_list, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5860,10 +7836,10 @@ def set_resource_message_channels( @validate_call - def set_resource_message_channels_with_http_info( + def set_resource_reviewers_with_http_info( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - message_channel_id_list: MessageChannelIDList, + reviewer_id_list: ReviewerIDList, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5877,14 +7853,14 @@ def set_resource_message_channels_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[List[UUID]]: - """set_resource_message_channels + """set_resource_reviewers - Sets the list of audit message channels attached to a resource. + Sets the list of reviewers for a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param message_channel_id_list: (required) - :type message_channel_id_list: MessageChannelIDList + :param reviewer_id_list: (required) + :type reviewer_id_list: ReviewerIDList :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5907,9 +7883,9 @@ def set_resource_message_channels_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._set_resource_message_channels_serialize( + _param = self._set_resource_reviewers_serialize( resource_id=resource_id, - message_channel_id_list=message_channel_id_list, + reviewer_id_list=reviewer_id_list, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5931,10 +7907,10 @@ def set_resource_message_channels_with_http_info( @validate_call - def set_resource_message_channels_without_preload_content( + def set_resource_reviewers_without_preload_content( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - message_channel_id_list: MessageChannelIDList, + reviewer_id_list: ReviewerIDList, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5948,14 +7924,14 @@ def set_resource_message_channels_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """set_resource_message_channels + """set_resource_reviewers - Sets the list of audit message channels attached to a resource. + Sets the list of reviewers for a resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param message_channel_id_list: (required) - :type message_channel_id_list: MessageChannelIDList + :param reviewer_id_list: (required) + :type reviewer_id_list: ReviewerIDList :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5978,9 +7954,9 @@ def set_resource_message_channels_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._set_resource_message_channels_serialize( + _param = self._set_resource_reviewers_serialize( resource_id=resource_id, - message_channel_id_list=message_channel_id_list, + reviewer_id_list=reviewer_id_list, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5997,10 +7973,10 @@ def set_resource_message_channels_without_preload_content( return response_data.response - def _set_resource_message_channels_serialize( + def _set_resource_reviewers_serialize( self, resource_id, - message_channel_id_list, + reviewer_id_list, _request_auth, _content_type, _headers, @@ -6028,8 +8004,8 @@ def _set_resource_message_channels_serialize( # process the header parameters # process the form parameters # process the body parameter - if message_channel_id_list is not None: - _body_params = message_channel_id_list + if reviewer_id_list is not None: + _body_params = reviewer_id_list # set the HTTP header `Accept` @@ -6061,7 +8037,7 @@ def _set_resource_message_channels_serialize( return self.api_client.param_serialize( method='PUT', - resource_path='/resources/{resource_id}/message-channels', + resource_path='/resources/{resource_id}/reviewers', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6078,10 +8054,10 @@ def _set_resource_message_channels_serialize( @validate_call - def set_resource_reviewer_stages( + def set_resource_scoped_role_permissions( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - reviewer_stage_list: ReviewerStageList, + resource_id: Annotated[UUID, Field(description="The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type.")], + scoped_role_permission_list: ScopedRolePermissionList, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6094,15 +8070,15 @@ def set_resource_reviewer_stages( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[ReviewerStage]: - """set_resource_reviewer_stages + ) -> ScopedRolePermissionList: + """set_resource_scoped_role_permissions - Sets the list of reviewer stages for a resource. + Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. - :param resource_id: The ID of the resource. (required) + :param resource_id: The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type. (required) :type resource_id: UUID - :param reviewer_stage_list: (required) - :type reviewer_stage_list: ReviewerStageList + :param scoped_role_permission_list: (required) + :type scoped_role_permission_list: ScopedRolePermissionList :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6125,9 +8101,9 @@ def set_resource_reviewer_stages( :return: Returns the result object. """ # noqa: E501 - _param = self._set_resource_reviewer_stages_serialize( + _param = self._set_resource_scoped_role_permissions_serialize( resource_id=resource_id, - reviewer_stage_list=reviewer_stage_list, + scoped_role_permission_list=scoped_role_permission_list, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6135,7 +8111,7 @@ def set_resource_reviewer_stages( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ReviewerStage]", + '200': "ScopedRolePermissionList", } response_data = self.api_client.call_api( *_param, @@ -6149,10 +8125,10 @@ def set_resource_reviewer_stages( @validate_call - def set_resource_reviewer_stages_with_http_info( + def set_resource_scoped_role_permissions_with_http_info( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - reviewer_stage_list: ReviewerStageList, + resource_id: Annotated[UUID, Field(description="The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type.")], + scoped_role_permission_list: ScopedRolePermissionList, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6165,15 +8141,15 @@ def set_resource_reviewer_stages_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[ReviewerStage]]: - """set_resource_reviewer_stages + ) -> ApiResponse[ScopedRolePermissionList]: + """set_resource_scoped_role_permissions - Sets the list of reviewer stages for a resource. + Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. - :param resource_id: The ID of the resource. (required) + :param resource_id: The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type. (required) :type resource_id: UUID - :param reviewer_stage_list: (required) - :type reviewer_stage_list: ReviewerStageList + :param scoped_role_permission_list: (required) + :type scoped_role_permission_list: ScopedRolePermissionList :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6196,9 +8172,9 @@ def set_resource_reviewer_stages_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._set_resource_reviewer_stages_serialize( + _param = self._set_resource_scoped_role_permissions_serialize( resource_id=resource_id, - reviewer_stage_list=reviewer_stage_list, + scoped_role_permission_list=scoped_role_permission_list, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6206,7 +8182,7 @@ def set_resource_reviewer_stages_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ReviewerStage]", + '200': "ScopedRolePermissionList", } response_data = self.api_client.call_api( *_param, @@ -6220,10 +8196,10 @@ def set_resource_reviewer_stages_with_http_info( @validate_call - def set_resource_reviewer_stages_without_preload_content( + def set_resource_scoped_role_permissions_without_preload_content( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - reviewer_stage_list: ReviewerStageList, + resource_id: Annotated[UUID, Field(description="The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type.")], + scoped_role_permission_list: ScopedRolePermissionList, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6237,14 +8213,14 @@ def set_resource_reviewer_stages_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """set_resource_reviewer_stages + """set_resource_scoped_role_permissions - Sets the list of reviewer stages for a resource. + Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. - :param resource_id: The ID of the resource. (required) + :param resource_id: The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type. (required) :type resource_id: UUID - :param reviewer_stage_list: (required) - :type reviewer_stage_list: ReviewerStageList + :param scoped_role_permission_list: (required) + :type scoped_role_permission_list: ScopedRolePermissionList :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6267,9 +8243,9 @@ def set_resource_reviewer_stages_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._set_resource_reviewer_stages_serialize( + _param = self._set_resource_scoped_role_permissions_serialize( resource_id=resource_id, - reviewer_stage_list=reviewer_stage_list, + scoped_role_permission_list=scoped_role_permission_list, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6277,7 +8253,7 @@ def set_resource_reviewer_stages_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ReviewerStage]", + '200': "ScopedRolePermissionList", } response_data = self.api_client.call_api( *_param, @@ -6286,10 +8262,10 @@ def set_resource_reviewer_stages_without_preload_content( return response_data.response - def _set_resource_reviewer_stages_serialize( + def _set_resource_scoped_role_permissions_serialize( self, resource_id, - reviewer_stage_list, + scoped_role_permission_list, _request_auth, _content_type, _headers, @@ -6317,8 +8293,8 @@ def _set_resource_reviewer_stages_serialize( # process the header parameters # process the form parameters # process the body parameter - if reviewer_stage_list is not None: - _body_params = reviewer_stage_list + if scoped_role_permission_list is not None: + _body_params = scoped_role_permission_list # set the HTTP header `Accept` @@ -6350,7 +8326,7 @@ def _set_resource_reviewer_stages_serialize( return self.api_client.param_serialize( method='PUT', - resource_path='/resources/{resource_id}/reviewer-stages', + resource_path='/resources/{resource_id}/scoped-role-permissions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6367,10 +8343,10 @@ def _set_resource_reviewer_stages_serialize( @validate_call - def set_resource_reviewers( + def set_resource_visibility( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - reviewer_id_list: ReviewerIDList, + visibility_info: VisibilityInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6383,15 +8359,15 @@ def set_resource_reviewers( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[UUID]: - """set_resource_reviewers + ) -> VisibilityInfo: + """set_resource_visibility - Sets the list of reviewers for a resource. + Sets the visibility of this resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param reviewer_id_list: (required) - :type reviewer_id_list: ReviewerIDList + :param visibility_info: (required) + :type visibility_info: VisibilityInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6414,9 +8390,9 @@ def set_resource_reviewers( :return: Returns the result object. """ # noqa: E501 - _param = self._set_resource_reviewers_serialize( + _param = self._set_resource_visibility_serialize( resource_id=resource_id, - reviewer_id_list=reviewer_id_list, + visibility_info=visibility_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6424,7 +8400,7 @@ def set_resource_reviewers( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[UUID]", + '200': "VisibilityInfo", } response_data = self.api_client.call_api( *_param, @@ -6438,10 +8414,10 @@ def set_resource_reviewers( @validate_call - def set_resource_reviewers_with_http_info( + def set_resource_visibility_with_http_info( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - reviewer_id_list: ReviewerIDList, + visibility_info: VisibilityInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6454,15 +8430,15 @@ def set_resource_reviewers_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[UUID]]: - """set_resource_reviewers + ) -> ApiResponse[VisibilityInfo]: + """set_resource_visibility - Sets the list of reviewers for a resource. + Sets the visibility of this resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param reviewer_id_list: (required) - :type reviewer_id_list: ReviewerIDList + :param visibility_info: (required) + :type visibility_info: VisibilityInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6485,9 +8461,9 @@ def set_resource_reviewers_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._set_resource_reviewers_serialize( + _param = self._set_resource_visibility_serialize( resource_id=resource_id, - reviewer_id_list=reviewer_id_list, + visibility_info=visibility_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6495,7 +8471,7 @@ def set_resource_reviewers_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[UUID]", + '200': "VisibilityInfo", } response_data = self.api_client.call_api( *_param, @@ -6509,10 +8485,10 @@ def set_resource_reviewers_with_http_info( @validate_call - def set_resource_reviewers_without_preload_content( + def set_resource_visibility_without_preload_content( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - reviewer_id_list: ReviewerIDList, + visibility_info: VisibilityInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6526,14 +8502,14 @@ def set_resource_reviewers_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """set_resource_reviewers + """set_resource_visibility - Sets the list of reviewers for a resource. + Sets the visibility of this resource. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param reviewer_id_list: (required) - :type reviewer_id_list: ReviewerIDList + :param visibility_info: (required) + :type visibility_info: VisibilityInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6556,9 +8532,9 @@ def set_resource_reviewers_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._set_resource_reviewers_serialize( + _param = self._set_resource_visibility_serialize( resource_id=resource_id, - reviewer_id_list=reviewer_id_list, + visibility_info=visibility_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6566,7 +8542,7 @@ def set_resource_reviewers_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[UUID]", + '200': "VisibilityInfo", } response_data = self.api_client.call_api( *_param, @@ -6575,10 +8551,10 @@ def set_resource_reviewers_without_preload_content( return response_data.response - def _set_resource_reviewers_serialize( + def _set_resource_visibility_serialize( self, resource_id, - reviewer_id_list, + visibility_info, _request_auth, _content_type, _headers, @@ -6606,8 +8582,8 @@ def _set_resource_reviewers_serialize( # process the header parameters # process the form parameters # process the body parameter - if reviewer_id_list is not None: - _body_params = reviewer_id_list + if visibility_info is not None: + _body_params = visibility_info # set the HTTP header `Accept` @@ -6639,7 +8615,7 @@ def _set_resource_reviewers_serialize( return self.api_client.param_serialize( method='PUT', - resource_path='/resources/{resource_id}/reviewers', + resource_path='/resources/{resource_id}/visibility', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6656,10 +8632,10 @@ def _set_resource_reviewers_serialize( @validate_call - def set_resource_scoped_role_permissions( + def update_resource_configuration_template( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type.")], - scoped_role_permission_list: ScopedRolePermissionList, + resource_id: Annotated[UUID, Field(description="The ID of the resource whose configuration template link is being set.")], + resource_configuration_template: ResourceConfigurationTemplate, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6672,15 +8648,15 @@ def set_resource_scoped_role_permissions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ScopedRolePermissionList: - """set_resource_scoped_role_permissions + ) -> ResourceConfigurationTemplate: + """Set the ID of the configuration template linked to a resource - Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. + Attaches, repoints, or detaches the configuration template linked to a resource. This endpoint only manages the link (by ID) between a resource and an existing configuration template — it does not create, modify, or delete the template itself. To manage a template's own fields (name, description, request configurations, visibility, etc.), use the `/configuration-templates` endpoints. The request body is `{\"configuration_template_id\": \"\" | null}`: * A `` value links the resource to the configuration template with that ID. If the resource was previously linked to a different template, the resource is repointed in place. * `null` detaches the resource from its current configuration template. The template is deep-copied into a new private configuration with the same settings so the resource's current behaviour is preserved, and the resource is repointed at the fork. The `configuration_template_id` field is required. Sending `{}` or any body in which the field is omitted is rejected with `400`. The call is idempotent: if the request body matches the resource's current link, no changes are made and no audit events are emitted. This endpoint is the preferred, Terraform-friendly surface for linking and unlinking configuration templates on resources. The equivalent `configuration_template_id` field on `PUT /resources` remains available but is deprecated for this purpose. - :param resource_id: The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type. (required) + :param resource_id: The ID of the resource whose configuration template link is being set. (required) :type resource_id: UUID - :param scoped_role_permission_list: (required) - :type scoped_role_permission_list: ScopedRolePermissionList + :param resource_configuration_template: (required) + :type resource_configuration_template: ResourceConfigurationTemplate :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6703,9 +8679,9 @@ def set_resource_scoped_role_permissions( :return: Returns the result object. """ # noqa: E501 - _param = self._set_resource_scoped_role_permissions_serialize( + _param = self._update_resource_configuration_template_serialize( resource_id=resource_id, - scoped_role_permission_list=scoped_role_permission_list, + resource_configuration_template=resource_configuration_template, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6713,7 +8689,10 @@ def set_resource_scoped_role_permissions( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ScopedRolePermissionList", + '200': "ResourceConfigurationTemplate", + '400': None, + '403': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -6727,10 +8706,10 @@ def set_resource_scoped_role_permissions( @validate_call - def set_resource_scoped_role_permissions_with_http_info( + def update_resource_configuration_template_with_http_info( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type.")], - scoped_role_permission_list: ScopedRolePermissionList, + resource_id: Annotated[UUID, Field(description="The ID of the resource whose configuration template link is being set.")], + resource_configuration_template: ResourceConfigurationTemplate, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6743,15 +8722,15 @@ def set_resource_scoped_role_permissions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ScopedRolePermissionList]: - """set_resource_scoped_role_permissions + ) -> ApiResponse[ResourceConfigurationTemplate]: + """Set the ID of the configuration template linked to a resource - Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. + Attaches, repoints, or detaches the configuration template linked to a resource. This endpoint only manages the link (by ID) between a resource and an existing configuration template — it does not create, modify, or delete the template itself. To manage a template's own fields (name, description, request configurations, visibility, etc.), use the `/configuration-templates` endpoints. The request body is `{\"configuration_template_id\": \"\" | null}`: * A `` value links the resource to the configuration template with that ID. If the resource was previously linked to a different template, the resource is repointed in place. * `null` detaches the resource from its current configuration template. The template is deep-copied into a new private configuration with the same settings so the resource's current behaviour is preserved, and the resource is repointed at the fork. The `configuration_template_id` field is required. Sending `{}` or any body in which the field is omitted is rejected with `400`. The call is idempotent: if the request body matches the resource's current link, no changes are made and no audit events are emitted. This endpoint is the preferred, Terraform-friendly surface for linking and unlinking configuration templates on resources. The equivalent `configuration_template_id` field on `PUT /resources` remains available but is deprecated for this purpose. - :param resource_id: The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type. (required) + :param resource_id: The ID of the resource whose configuration template link is being set. (required) :type resource_id: UUID - :param scoped_role_permission_list: (required) - :type scoped_role_permission_list: ScopedRolePermissionList + :param resource_configuration_template: (required) + :type resource_configuration_template: ResourceConfigurationTemplate :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6774,9 +8753,9 @@ def set_resource_scoped_role_permissions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._set_resource_scoped_role_permissions_serialize( + _param = self._update_resource_configuration_template_serialize( resource_id=resource_id, - scoped_role_permission_list=scoped_role_permission_list, + resource_configuration_template=resource_configuration_template, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6784,7 +8763,10 @@ def set_resource_scoped_role_permissions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ScopedRolePermissionList", + '200': "ResourceConfigurationTemplate", + '400': None, + '403': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -6798,10 +8780,10 @@ def set_resource_scoped_role_permissions_with_http_info( @validate_call - def set_resource_scoped_role_permissions_without_preload_content( + def update_resource_configuration_template_without_preload_content( self, - resource_id: Annotated[UUID, Field(description="The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type.")], - scoped_role_permission_list: ScopedRolePermissionList, + resource_id: Annotated[UUID, Field(description="The ID of the resource whose configuration template link is being set.")], + resource_configuration_template: ResourceConfigurationTemplate, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6815,14 +8797,14 @@ def set_resource_scoped_role_permissions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """set_resource_scoped_role_permissions + """Set the ID of the configuration template linked to a resource - Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. + Attaches, repoints, or detaches the configuration template linked to a resource. This endpoint only manages the link (by ID) between a resource and an existing configuration template — it does not create, modify, or delete the template itself. To manage a template's own fields (name, description, request configurations, visibility, etc.), use the `/configuration-templates` endpoints. The request body is `{\"configuration_template_id\": \"\" | null}`: * A `` value links the resource to the configuration template with that ID. If the resource was previously linked to a different template, the resource is repointed in place. * `null` detaches the resource from its current configuration template. The template is deep-copied into a new private configuration with the same settings so the resource's current behaviour is preserved, and the resource is repointed at the fork. The `configuration_template_id` field is required. Sending `{}` or any body in which the field is omitted is rejected with `400`. The call is idempotent: if the request body matches the resource's current link, no changes are made and no audit events are emitted. This endpoint is the preferred, Terraform-friendly surface for linking and unlinking configuration templates on resources. The equivalent `configuration_template_id` field on `PUT /resources` remains available but is deprecated for this purpose. - :param resource_id: The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type. (required) + :param resource_id: The ID of the resource whose configuration template link is being set. (required) :type resource_id: UUID - :param scoped_role_permission_list: (required) - :type scoped_role_permission_list: ScopedRolePermissionList + :param resource_configuration_template: (required) + :type resource_configuration_template: ResourceConfigurationTemplate :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6845,9 +8827,9 @@ def set_resource_scoped_role_permissions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._set_resource_scoped_role_permissions_serialize( + _param = self._update_resource_configuration_template_serialize( resource_id=resource_id, - scoped_role_permission_list=scoped_role_permission_list, + resource_configuration_template=resource_configuration_template, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6855,7 +8837,10 @@ def set_resource_scoped_role_permissions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ScopedRolePermissionList", + '200': "ResourceConfigurationTemplate", + '400': None, + '403': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -6864,10 +8849,10 @@ def set_resource_scoped_role_permissions_without_preload_content( return response_data.response - def _set_resource_scoped_role_permissions_serialize( + def _update_resource_configuration_template_serialize( self, resource_id, - scoped_role_permission_list, + resource_configuration_template, _request_auth, _content_type, _headers, @@ -6895,8 +8880,8 @@ def _set_resource_scoped_role_permissions_serialize( # process the header parameters # process the form parameters # process the body parameter - if scoped_role_permission_list is not None: - _body_params = scoped_role_permission_list + if resource_configuration_template is not None: + _body_params = resource_configuration_template # set the HTTP header `Accept` @@ -6928,7 +8913,7 @@ def _set_resource_scoped_role_permissions_serialize( return self.api_client.param_serialize( method='PUT', - resource_path='/resources/{resource_id}/scoped-role-permissions', + resource_path='/resources/{resource_id}/configuration-template', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6945,10 +8930,11 @@ def _set_resource_scoped_role_permissions_serialize( @validate_call - def set_resource_visibility( + def update_resource_custom_access_level( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - visibility_info: VisibilityInfo, + access_level_remote_id: Annotated[StrictStr, Field(description="The remote ID of the access level.")], + update_resource_custom_access_level_info: UpdateResourceCustomAccessLevelInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6961,15 +8947,17 @@ def set_resource_visibility( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> VisibilityInfo: - """set_resource_visibility + ) -> ResourceCustomAccessLevelResponse: + """update_resource_custom_access_level - Sets the visibility of this resource. + Updates a custom access level identified by its remote ID. If the resource is a parent type, the update fans out to all child resources. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param visibility_info: (required) - :type visibility_info: VisibilityInfo + :param access_level_remote_id: The remote ID of the access level. (required) + :type access_level_remote_id: str + :param update_resource_custom_access_level_info: (required) + :type update_resource_custom_access_level_info: UpdateResourceCustomAccessLevelInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6992,9 +8980,10 @@ def set_resource_visibility( :return: Returns the result object. """ # noqa: E501 - _param = self._set_resource_visibility_serialize( + _param = self._update_resource_custom_access_level_serialize( resource_id=resource_id, - visibility_info=visibility_info, + access_level_remote_id=access_level_remote_id, + update_resource_custom_access_level_info=update_resource_custom_access_level_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7002,7 +8991,9 @@ def set_resource_visibility( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "VisibilityInfo", + '200': "ResourceCustomAccessLevelResponse", + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -7016,10 +9007,11 @@ def set_resource_visibility( @validate_call - def set_resource_visibility_with_http_info( + def update_resource_custom_access_level_with_http_info( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - visibility_info: VisibilityInfo, + access_level_remote_id: Annotated[StrictStr, Field(description="The remote ID of the access level.")], + update_resource_custom_access_level_info: UpdateResourceCustomAccessLevelInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7032,15 +9024,17 @@ def set_resource_visibility_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[VisibilityInfo]: - """set_resource_visibility + ) -> ApiResponse[ResourceCustomAccessLevelResponse]: + """update_resource_custom_access_level - Sets the visibility of this resource. + Updates a custom access level identified by its remote ID. If the resource is a parent type, the update fans out to all child resources. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param visibility_info: (required) - :type visibility_info: VisibilityInfo + :param access_level_remote_id: The remote ID of the access level. (required) + :type access_level_remote_id: str + :param update_resource_custom_access_level_info: (required) + :type update_resource_custom_access_level_info: UpdateResourceCustomAccessLevelInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7063,9 +9057,10 @@ def set_resource_visibility_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._set_resource_visibility_serialize( + _param = self._update_resource_custom_access_level_serialize( resource_id=resource_id, - visibility_info=visibility_info, + access_level_remote_id=access_level_remote_id, + update_resource_custom_access_level_info=update_resource_custom_access_level_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7073,7 +9068,9 @@ def set_resource_visibility_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "VisibilityInfo", + '200': "ResourceCustomAccessLevelResponse", + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -7087,10 +9084,11 @@ def set_resource_visibility_with_http_info( @validate_call - def set_resource_visibility_without_preload_content( + def update_resource_custom_access_level_without_preload_content( self, resource_id: Annotated[UUID, Field(description="The ID of the resource.")], - visibility_info: VisibilityInfo, + access_level_remote_id: Annotated[StrictStr, Field(description="The remote ID of the access level.")], + update_resource_custom_access_level_info: UpdateResourceCustomAccessLevelInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7104,14 +9102,16 @@ def set_resource_visibility_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """set_resource_visibility + """update_resource_custom_access_level - Sets the visibility of this resource. + Updates a custom access level identified by its remote ID. If the resource is a parent type, the update fans out to all child resources. :param resource_id: The ID of the resource. (required) :type resource_id: UUID - :param visibility_info: (required) - :type visibility_info: VisibilityInfo + :param access_level_remote_id: The remote ID of the access level. (required) + :type access_level_remote_id: str + :param update_resource_custom_access_level_info: (required) + :type update_resource_custom_access_level_info: UpdateResourceCustomAccessLevelInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7134,9 +9134,10 @@ def set_resource_visibility_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._set_resource_visibility_serialize( + _param = self._update_resource_custom_access_level_serialize( resource_id=resource_id, - visibility_info=visibility_info, + access_level_remote_id=access_level_remote_id, + update_resource_custom_access_level_info=update_resource_custom_access_level_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7144,7 +9145,9 @@ def set_resource_visibility_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "VisibilityInfo", + '200': "ResourceCustomAccessLevelResponse", + '400': None, + '404': None, } response_data = self.api_client.call_api( *_param, @@ -7153,10 +9156,11 @@ def set_resource_visibility_without_preload_content( return response_data.response - def _set_resource_visibility_serialize( + def _update_resource_custom_access_level_serialize( self, resource_id, - visibility_info, + access_level_remote_id, + update_resource_custom_access_level_info, _request_auth, _content_type, _headers, @@ -7180,12 +9184,14 @@ def _set_resource_visibility_serialize( # process the path parameters if resource_id is not None: _path_params['resource_id'] = resource_id + if access_level_remote_id is not None: + _path_params['access_level_remote_id'] = access_level_remote_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if visibility_info is not None: - _body_params = visibility_info + if update_resource_custom_access_level_info is not None: + _body_params = update_resource_custom_access_level_info # set the HTTP header `Accept` @@ -7216,8 +9222,8 @@ def _set_resource_visibility_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/resources/{resource_id}/visibility', + method='PATCH', + resource_path='/resources/{resource_id}/custom-access-levels/{access_level_remote_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/opal_security/api/role_assignments_api.py b/opal_security/api/role_assignments_api.py new file mode 100644 index 0000000..b172d26 --- /dev/null +++ b/opal_security/api/role_assignments_api.py @@ -0,0 +1,975 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from uuid import UUID +from opal_security.models.add_role_assignments_request import AddRoleAssignmentsRequest +from opal_security.models.add_role_assignments_response import AddRoleAssignmentsResponse +from opal_security.models.entity_type_enum import EntityTypeEnum +from opal_security.models.paginated_role_assignments_list import PaginatedRoleAssignmentsList +from opal_security.models.remove_role_assignments_request import RemoveRoleAssignmentsRequest +from opal_security.models.remove_role_assignments_response import RemoveRoleAssignmentsResponse +from opal_security.models.role_assignment_entity_type_enum import RoleAssignmentEntityTypeEnum + +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType + + +class RoleAssignmentsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def add_role_assignments( + self, + add_role_assignments_request: AddRoleAssignmentsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AddRoleAssignmentsResponse: + """Add role assignments + + Grants one or more principals (user, group, or resource) access to one or more entities (resource or group). The request body is batched to match the GraphQL `addRoleAssignments` mutation, which this endpoint thin-wraps. The caller must hold the `EDIT_ASSIGNMENTS` role permission on every entity in the batch. Omit `access_level_remote_id` for entities that have a single default access level. Omit `duration_minutes` (or send `0`) for an indefinite grant. **Atomicity:** the batch is applied as a single transaction. If any entry fails input validation, authorization, lookup, or creation, **no entries are created** and the response identifies the first failing entry's `entity_id` and `principal_id` (and the request-array index for input validation errors). Clients should retry with the offending entry removed; partial-success is intentionally not supported, matching the semantics of the GraphQL `addRoleAssignments` mutation that this endpoint wraps. Prefer this endpoint for batch or programmatic use (e.g. Terraform). For a single grant on a specific entity/principal pair, the per-pair endpoints — `/resources/{id}/users/{id}`, `/groups/{id}/users/{id}`, `/groups/{id}/resources/{id}`, `/groups/{id}/containing-groups`, `/resources/{id}/non-human-identities/{id}` — are often simpler. + + :param add_role_assignments_request: (required) + :type add_role_assignments_request: AddRoleAssignmentsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_role_assignments_serialize( + add_role_assignments_request=add_role_assignments_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddRoleAssignmentsResponse", + '400': None, + '403': None, + '404': None, + '409': None, + '422': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def add_role_assignments_with_http_info( + self, + add_role_assignments_request: AddRoleAssignmentsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AddRoleAssignmentsResponse]: + """Add role assignments + + Grants one or more principals (user, group, or resource) access to one or more entities (resource or group). The request body is batched to match the GraphQL `addRoleAssignments` mutation, which this endpoint thin-wraps. The caller must hold the `EDIT_ASSIGNMENTS` role permission on every entity in the batch. Omit `access_level_remote_id` for entities that have a single default access level. Omit `duration_minutes` (or send `0`) for an indefinite grant. **Atomicity:** the batch is applied as a single transaction. If any entry fails input validation, authorization, lookup, or creation, **no entries are created** and the response identifies the first failing entry's `entity_id` and `principal_id` (and the request-array index for input validation errors). Clients should retry with the offending entry removed; partial-success is intentionally not supported, matching the semantics of the GraphQL `addRoleAssignments` mutation that this endpoint wraps. Prefer this endpoint for batch or programmatic use (e.g. Terraform). For a single grant on a specific entity/principal pair, the per-pair endpoints — `/resources/{id}/users/{id}`, `/groups/{id}/users/{id}`, `/groups/{id}/resources/{id}`, `/groups/{id}/containing-groups`, `/resources/{id}/non-human-identities/{id}` — are often simpler. + + :param add_role_assignments_request: (required) + :type add_role_assignments_request: AddRoleAssignmentsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_role_assignments_serialize( + add_role_assignments_request=add_role_assignments_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddRoleAssignmentsResponse", + '400': None, + '403': None, + '404': None, + '409': None, + '422': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def add_role_assignments_without_preload_content( + self, + add_role_assignments_request: AddRoleAssignmentsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add role assignments + + Grants one or more principals (user, group, or resource) access to one or more entities (resource or group). The request body is batched to match the GraphQL `addRoleAssignments` mutation, which this endpoint thin-wraps. The caller must hold the `EDIT_ASSIGNMENTS` role permission on every entity in the batch. Omit `access_level_remote_id` for entities that have a single default access level. Omit `duration_minutes` (or send `0`) for an indefinite grant. **Atomicity:** the batch is applied as a single transaction. If any entry fails input validation, authorization, lookup, or creation, **no entries are created** and the response identifies the first failing entry's `entity_id` and `principal_id` (and the request-array index for input validation errors). Clients should retry with the offending entry removed; partial-success is intentionally not supported, matching the semantics of the GraphQL `addRoleAssignments` mutation that this endpoint wraps. Prefer this endpoint for batch or programmatic use (e.g. Terraform). For a single grant on a specific entity/principal pair, the per-pair endpoints — `/resources/{id}/users/{id}`, `/groups/{id}/users/{id}`, `/groups/{id}/resources/{id}`, `/groups/{id}/containing-groups`, `/resources/{id}/non-human-identities/{id}` — are often simpler. + + :param add_role_assignments_request: (required) + :type add_role_assignments_request: AddRoleAssignmentsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_role_assignments_serialize( + add_role_assignments_request=add_role_assignments_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddRoleAssignmentsResponse", + '400': None, + '403': None, + '404': None, + '409': None, + '422': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_role_assignments_serialize( + self, + add_role_assignments_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if add_role_assignments_request is not None: + _body_params = add_role_assignments_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/role-assignments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_role_assignments( + self, + entity_ids: Annotated[Optional[List[UUID]], Field(description="Filter to grants on these entity (resource or group) IDs. Any-match.")] = None, + principal_ids: Annotated[Optional[List[UUID]], Field(description="Filter to grants with these principal (user, group, or resource) IDs. Any-match.")] = None, + entity_type: Annotated[Optional[RoleAssignmentEntityTypeEnum], Field(description="Filter by entity type. Omit to include both RESOURCE and GROUP entities.")] = None, + principal_type: Annotated[Optional[EntityTypeEnum], Field(description="Filter by principal type. Omit to include USER, GROUP, and RESOURCE principals.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginatedRoleAssignmentsList: + """List role assignments + + Returns a paginated list of role assignments. This endpoint is **admin-only**: the caller's bearer token must belong to a user with the admin or read-only admin role. Non-admin callers receive 403. Mirrors the GraphQL `directRoleAssignments` query and shares the same underlying code path, so pagination order, sort default (`first_granted_at` DESC), and the set of grants returned are identical across the two surfaces. The REST filter surface is intentionally narrower on first ship — sort, risk-factor filters, text search, access-scope filters, the agents/humans toggle, and access-level filtering are deferred to a future revision. For a single entity/principal pair, the per-pair endpoints — `/resources/{resource_id}/users`, `/resources/{resource_id}/groups`, `/resources/{resource_id}/non-human-identities`, `/groups/{group_id}/users`, `/groups/{group_id}/containing-groups` — are often simpler. + + :param entity_ids: Filter to grants on these entity (resource or group) IDs. Any-match. + :type entity_ids: List[UUID] + :param principal_ids: Filter to grants with these principal (user, group, or resource) IDs. Any-match. + :type principal_ids: List[UUID] + :param entity_type: Filter by entity type. Omit to include both RESOURCE and GROUP entities. + :type entity_type: RoleAssignmentEntityTypeEnum + :param principal_type: Filter by principal type. Omit to include USER, GROUP, and RESOURCE principals. + :type principal_type: EntityTypeEnum + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_role_assignments_serialize( + entity_ids=entity_ids, + principal_ids=principal_ids, + entity_type=entity_type, + principal_type=principal_type, + cursor=cursor, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedRoleAssignmentsList", + '400': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_role_assignments_with_http_info( + self, + entity_ids: Annotated[Optional[List[UUID]], Field(description="Filter to grants on these entity (resource or group) IDs. Any-match.")] = None, + principal_ids: Annotated[Optional[List[UUID]], Field(description="Filter to grants with these principal (user, group, or resource) IDs. Any-match.")] = None, + entity_type: Annotated[Optional[RoleAssignmentEntityTypeEnum], Field(description="Filter by entity type. Omit to include both RESOURCE and GROUP entities.")] = None, + principal_type: Annotated[Optional[EntityTypeEnum], Field(description="Filter by principal type. Omit to include USER, GROUP, and RESOURCE principals.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PaginatedRoleAssignmentsList]: + """List role assignments + + Returns a paginated list of role assignments. This endpoint is **admin-only**: the caller's bearer token must belong to a user with the admin or read-only admin role. Non-admin callers receive 403. Mirrors the GraphQL `directRoleAssignments` query and shares the same underlying code path, so pagination order, sort default (`first_granted_at` DESC), and the set of grants returned are identical across the two surfaces. The REST filter surface is intentionally narrower on first ship — sort, risk-factor filters, text search, access-scope filters, the agents/humans toggle, and access-level filtering are deferred to a future revision. For a single entity/principal pair, the per-pair endpoints — `/resources/{resource_id}/users`, `/resources/{resource_id}/groups`, `/resources/{resource_id}/non-human-identities`, `/groups/{group_id}/users`, `/groups/{group_id}/containing-groups` — are often simpler. + + :param entity_ids: Filter to grants on these entity (resource or group) IDs. Any-match. + :type entity_ids: List[UUID] + :param principal_ids: Filter to grants with these principal (user, group, or resource) IDs. Any-match. + :type principal_ids: List[UUID] + :param entity_type: Filter by entity type. Omit to include both RESOURCE and GROUP entities. + :type entity_type: RoleAssignmentEntityTypeEnum + :param principal_type: Filter by principal type. Omit to include USER, GROUP, and RESOURCE principals. + :type principal_type: EntityTypeEnum + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_role_assignments_serialize( + entity_ids=entity_ids, + principal_ids=principal_ids, + entity_type=entity_type, + principal_type=principal_type, + cursor=cursor, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedRoleAssignmentsList", + '400': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_role_assignments_without_preload_content( + self, + entity_ids: Annotated[Optional[List[UUID]], Field(description="Filter to grants on these entity (resource or group) IDs. Any-match.")] = None, + principal_ids: Annotated[Optional[List[UUID]], Field(description="Filter to grants with these principal (user, group, or resource) IDs. Any-match.")] = None, + entity_type: Annotated[Optional[RoleAssignmentEntityTypeEnum], Field(description="Filter by entity type. Omit to include both RESOURCE and GROUP entities.")] = None, + principal_type: Annotated[Optional[EntityTypeEnum], Field(description="Filter by principal type. Omit to include USER, GROUP, and RESOURCE principals.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List role assignments + + Returns a paginated list of role assignments. This endpoint is **admin-only**: the caller's bearer token must belong to a user with the admin or read-only admin role. Non-admin callers receive 403. Mirrors the GraphQL `directRoleAssignments` query and shares the same underlying code path, so pagination order, sort default (`first_granted_at` DESC), and the set of grants returned are identical across the two surfaces. The REST filter surface is intentionally narrower on first ship — sort, risk-factor filters, text search, access-scope filters, the agents/humans toggle, and access-level filtering are deferred to a future revision. For a single entity/principal pair, the per-pair endpoints — `/resources/{resource_id}/users`, `/resources/{resource_id}/groups`, `/resources/{resource_id}/non-human-identities`, `/groups/{group_id}/users`, `/groups/{group_id}/containing-groups` — are often simpler. + + :param entity_ids: Filter to grants on these entity (resource or group) IDs. Any-match. + :type entity_ids: List[UUID] + :param principal_ids: Filter to grants with these principal (user, group, or resource) IDs. Any-match. + :type principal_ids: List[UUID] + :param entity_type: Filter by entity type. Omit to include both RESOURCE and GROUP entities. + :type entity_type: RoleAssignmentEntityTypeEnum + :param principal_type: Filter by principal type. Omit to include USER, GROUP, and RESOURCE principals. + :type principal_type: EntityTypeEnum + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_role_assignments_serialize( + entity_ids=entity_ids, + principal_ids=principal_ids, + entity_type=entity_type, + principal_type=principal_type, + cursor=cursor, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedRoleAssignmentsList", + '400': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_role_assignments_serialize( + self, + entity_ids, + principal_ids, + entity_type, + principal_type, + cursor, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'entity_ids': 'multi', + 'principal_ids': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if entity_ids is not None: + + _query_params.append(('entity_ids', entity_ids)) + + if principal_ids is not None: + + _query_params.append(('principal_ids', principal_ids)) + + if entity_type is not None: + + _query_params.append(('entity_type', entity_type.value)) + + if principal_type is not None: + + _query_params.append(('principal_type', principal_type.value)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/role-assignments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_role_assignments( + self, + remove_role_assignments_request: RemoveRoleAssignmentsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RemoveRoleAssignmentsResponse: + """Remove role assignments + + Revoke one or more role assignments. Each entry identifies a specific stored grant by the 5-tuple `(entity_id, entity_type, principal_id, principal_type, access_level_remote_id)` — see the field description on `access_level_remote_id` for when it must be supplied and when it must be omitted. The call is idempotent: an entry that does not match any stored grant is silently skipped and absent from `entries` in the response. Caller must have `EDIT_ASSIGNMENTS` on each entity. + + :param remove_role_assignments_request: (required) + :type remove_role_assignments_request: RemoveRoleAssignmentsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_role_assignments_serialize( + remove_role_assignments_request=remove_role_assignments_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemoveRoleAssignmentsResponse", + '400': None, + '403': None, + '422': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def remove_role_assignments_with_http_info( + self, + remove_role_assignments_request: RemoveRoleAssignmentsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RemoveRoleAssignmentsResponse]: + """Remove role assignments + + Revoke one or more role assignments. Each entry identifies a specific stored grant by the 5-tuple `(entity_id, entity_type, principal_id, principal_type, access_level_remote_id)` — see the field description on `access_level_remote_id` for when it must be supplied and when it must be omitted. The call is idempotent: an entry that does not match any stored grant is silently skipped and absent from `entries` in the response. Caller must have `EDIT_ASSIGNMENTS` on each entity. + + :param remove_role_assignments_request: (required) + :type remove_role_assignments_request: RemoveRoleAssignmentsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_role_assignments_serialize( + remove_role_assignments_request=remove_role_assignments_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemoveRoleAssignmentsResponse", + '400': None, + '403': None, + '422': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def remove_role_assignments_without_preload_content( + self, + remove_role_assignments_request: RemoveRoleAssignmentsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove role assignments + + Revoke one or more role assignments. Each entry identifies a specific stored grant by the 5-tuple `(entity_id, entity_type, principal_id, principal_type, access_level_remote_id)` — see the field description on `access_level_remote_id` for when it must be supplied and when it must be omitted. The call is idempotent: an entry that does not match any stored grant is silently skipped and absent from `entries` in the response. Caller must have `EDIT_ASSIGNMENTS` on each entity. + + :param remove_role_assignments_request: (required) + :type remove_role_assignments_request: RemoveRoleAssignmentsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_role_assignments_serialize( + remove_role_assignments_request=remove_role_assignments_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RemoveRoleAssignmentsResponse", + '400': None, + '403': None, + '422': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_role_assignments_serialize( + self, + remove_role_assignments_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if remove_role_assignments_request is not None: + _body_params = remove_role_assignments_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/role-assignments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/opal_security/api/service_users_api.py b/opal_security/api/service_users_api.py new file mode 100644 index 0000000..32c302e --- /dev/null +++ b/opal_security/api/service_users_api.py @@ -0,0 +1,321 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from opal_security.models.create_service_user_request import CreateServiceUserRequest +from opal_security.models.user import User + +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType + + +class ServiceUsersApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_service_user( + self, + create_service_user_request: CreateServiceUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> User: + """Create service user + + Creates a new service user (a non-human identity owned by a team). Mirrors the GraphQL `createServiceUser` mutation; admin-only. The returned `User` object is the newly created service user and is a regular `User` row — read it later via `GET /users/{user_id}`, delete it with `DELETE /users/{user_id}`, and manage its tags via the usual `/users/{user_id}/tags` endpoints. **Role grants are a separate concern.** To grant a service user access to resources or groups, use `POST /role-assignments` (or the per-pair endpoints such as `/resources/{id}/users/{id}`). Keeping role assignments out of this request body means each grant stays independently addressable — the shape Terraform and other declarative clients prefer, with no field here that would silently drift when a grant is added or revoked through a different code path. **Automations are not configurable here either.** The GraphQL mutation accepts a wide typed-union of automation configuration; that surface is intentionally omitted from this REST endpoint for the same reason. Service users created through this endpoint start with no automations. + + :param create_service_user_request: (required) + :type create_service_user_request: CreateServiceUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_service_user_serialize( + create_service_user_request=create_service_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + '400': None, + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_service_user_with_http_info( + self, + create_service_user_request: CreateServiceUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[User]: + """Create service user + + Creates a new service user (a non-human identity owned by a team). Mirrors the GraphQL `createServiceUser` mutation; admin-only. The returned `User` object is the newly created service user and is a regular `User` row — read it later via `GET /users/{user_id}`, delete it with `DELETE /users/{user_id}`, and manage its tags via the usual `/users/{user_id}/tags` endpoints. **Role grants are a separate concern.** To grant a service user access to resources or groups, use `POST /role-assignments` (or the per-pair endpoints such as `/resources/{id}/users/{id}`). Keeping role assignments out of this request body means each grant stays independently addressable — the shape Terraform and other declarative clients prefer, with no field here that would silently drift when a grant is added or revoked through a different code path. **Automations are not configurable here either.** The GraphQL mutation accepts a wide typed-union of automation configuration; that surface is intentionally omitted from this REST endpoint for the same reason. Service users created through this endpoint start with no automations. + + :param create_service_user_request: (required) + :type create_service_user_request: CreateServiceUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_service_user_serialize( + create_service_user_request=create_service_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + '400': None, + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_service_user_without_preload_content( + self, + create_service_user_request: CreateServiceUserRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create service user + + Creates a new service user (a non-human identity owned by a team). Mirrors the GraphQL `createServiceUser` mutation; admin-only. The returned `User` object is the newly created service user and is a regular `User` row — read it later via `GET /users/{user_id}`, delete it with `DELETE /users/{user_id}`, and manage its tags via the usual `/users/{user_id}/tags` endpoints. **Role grants are a separate concern.** To grant a service user access to resources or groups, use `POST /role-assignments` (or the per-pair endpoints such as `/resources/{id}/users/{id}`). Keeping role assignments out of this request body means each grant stays independently addressable — the shape Terraform and other declarative clients prefer, with no field here that would silently drift when a grant is added or revoked through a different code path. **Automations are not configurable here either.** The GraphQL mutation accepts a wide typed-union of automation configuration; that surface is intentionally omitted from this REST endpoint for the same reason. Service users created through this endpoint start with no automations. + + :param create_service_user_request: (required) + :type create_service_user_request: CreateServiceUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_service_user_serialize( + create_service_user_request=create_service_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + '400': None, + '403': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_service_user_serialize( + self, + create_service_user_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_service_user_request is not None: + _body_params = create_service_user_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/service-users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/opal_security/api/tokens_api.py b/opal_security/api/tokens_api.py index 7f9af89..d21ca5f 100644 --- a/opal_security/api/tokens_api.py +++ b/opal_security/api/tokens_api.py @@ -21,6 +21,8 @@ from typing import List, Optional from typing_extensions import Annotated from uuid import UUID +from opal_security.models.create_token_info import CreateTokenInfo +from opal_security.models.create_token_response import CreateTokenResponse from opal_security.models.paginated_tokens_list import PaginatedTokensList from opal_security.api_client import ApiClient, RequestSerialized @@ -41,6 +43,289 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def create_token( + self, + create_token_info: CreateTokenInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateTokenResponse: + """Create token + + Creates a first-party API token. Omit `user_id` (or set it to the caller's ID) to create a token for yourself. Set `user_id` to a service user's ID to mint a token that authenticates as that service user. Creating a token for another human user is not allowed. The `signed_token` value in the response is the secret credential and is only returned once at creation time. + + :param create_token_info: (required) + :type create_token_info: CreateTokenInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_token_serialize( + create_token_info=create_token_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateTokenResponse", + '400': None, + '403': None, + '409': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_token_with_http_info( + self, + create_token_info: CreateTokenInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateTokenResponse]: + """Create token + + Creates a first-party API token. Omit `user_id` (or set it to the caller's ID) to create a token for yourself. Set `user_id` to a service user's ID to mint a token that authenticates as that service user. Creating a token for another human user is not allowed. The `signed_token` value in the response is the secret credential and is only returned once at creation time. + + :param create_token_info: (required) + :type create_token_info: CreateTokenInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_token_serialize( + create_token_info=create_token_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateTokenResponse", + '400': None, + '403': None, + '409': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_token_without_preload_content( + self, + create_token_info: CreateTokenInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create token + + Creates a first-party API token. Omit `user_id` (or set it to the caller's ID) to create a token for yourself. Set `user_id` to a service user's ID to mint a token that authenticates as that service user. Creating a token for another human user is not allowed. The `signed_token` value in the response is the secret credential and is only returned once at creation time. + + :param create_token_info: (required) + :type create_token_info: CreateTokenInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_token_serialize( + create_token_info=create_token_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateTokenResponse", + '400': None, + '403': None, + '409': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_token_serialize( + self, + create_token_info, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_token_info is not None: + _body_params = create_token_info + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/tokens', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def delete_token( self, diff --git a/opal_security/api/uars_api.py b/opal_security/api/uars_api.py index f3f0df1..7f804ed 100644 --- a/opal_security/api/uars_api.py +++ b/opal_security/api/uars_api.py @@ -60,9 +60,9 @@ def create_uar( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UAR: - """create_uar + """(Deprecated) create_uar - Starts a User Access Review. + Starts a User Access Review. Deprecated in favor of `POST /campaigns`. :param create_uar_info: The settings of the UAR. (required) :type create_uar_info: CreateUARInfo @@ -87,6 +87,7 @@ def create_uar( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /uar is deprecated.", DeprecationWarning) _param = self._create_uar_serialize( create_uar_info=create_uar_info, @@ -127,9 +128,9 @@ def create_uar_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UAR]: - """create_uar + """(Deprecated) create_uar - Starts a User Access Review. + Starts a User Access Review. Deprecated in favor of `POST /campaigns`. :param create_uar_info: The settings of the UAR. (required) :type create_uar_info: CreateUARInfo @@ -154,6 +155,7 @@ def create_uar_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /uar is deprecated.", DeprecationWarning) _param = self._create_uar_serialize( create_uar_info=create_uar_info, @@ -194,9 +196,9 @@ def create_uar_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """create_uar + """(Deprecated) create_uar - Starts a User Access Review. + Starts a User Access Review. Deprecated in favor of `POST /campaigns`. :param create_uar_info: The settings of the UAR. (required) :type create_uar_info: CreateUARInfo @@ -221,6 +223,7 @@ def create_uar_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /uar is deprecated.", DeprecationWarning) _param = self._create_uar_serialize( create_uar_info=create_uar_info, @@ -334,9 +337,9 @@ def get_uar( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UAR: - """get_uar + """(Deprecated) get_uar - Retrieves a specific UAR. + Retrieves a specific UAR. Deprecated in favor of `GET /campaigns/{campaign_id}`. :param uar_id: The ID of the UAR. (required) :type uar_id: UUID @@ -361,6 +364,7 @@ def get_uar( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /uar/{uar_id} is deprecated.", DeprecationWarning) _param = self._get_uar_serialize( uar_id=uar_id, @@ -401,9 +405,9 @@ def get_uar_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UAR]: - """get_uar + """(Deprecated) get_uar - Retrieves a specific UAR. + Retrieves a specific UAR. Deprecated in favor of `GET /campaigns/{campaign_id}`. :param uar_id: The ID of the UAR. (required) :type uar_id: UUID @@ -428,6 +432,7 @@ def get_uar_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /uar/{uar_id} is deprecated.", DeprecationWarning) _param = self._get_uar_serialize( uar_id=uar_id, @@ -468,9 +473,9 @@ def get_uar_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_uar + """(Deprecated) get_uar - Retrieves a specific UAR. + Retrieves a specific UAR. Deprecated in favor of `GET /campaigns/{campaign_id}`. :param uar_id: The ID of the UAR. (required) :type uar_id: UUID @@ -495,6 +500,7 @@ def get_uar_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /uar/{uar_id} is deprecated.", DeprecationWarning) _param = self._get_uar_serialize( uar_id=uar_id, @@ -596,9 +602,9 @@ def get_uars( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PaginatedUARsList: - """get_uars + """(Deprecated) get_uars - Returns a list of `UAR` objects. + Returns a list of `UAR` objects. Deprecated in favor of `GET /campaigns`. :param cursor: The pagination cursor value. :type cursor: str @@ -625,6 +631,7 @@ def get_uars( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /uars is deprecated.", DeprecationWarning) _param = self._get_uars_serialize( cursor=cursor, @@ -667,9 +674,9 @@ def get_uars_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PaginatedUARsList]: - """get_uars + """(Deprecated) get_uars - Returns a list of `UAR` objects. + Returns a list of `UAR` objects. Deprecated in favor of `GET /campaigns`. :param cursor: The pagination cursor value. :type cursor: str @@ -696,6 +703,7 @@ def get_uars_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /uars is deprecated.", DeprecationWarning) _param = self._get_uars_serialize( cursor=cursor, @@ -738,9 +746,9 @@ def get_uars_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_uars + """(Deprecated) get_uars - Returns a list of `UAR` objects. + Returns a list of `UAR` objects. Deprecated in favor of `GET /campaigns`. :param cursor: The pagination cursor value. :type cursor: str @@ -767,6 +775,7 @@ def get_uars_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /uars is deprecated.", DeprecationWarning) _param = self._get_uars_serialize( cursor=cursor, diff --git a/opal_security/api/users_api.py b/opal_security/api/users_api.py index 9a27db4..7c268cc 100644 --- a/opal_security/api/users_api.py +++ b/opal_security/api/users_api.py @@ -17,15 +17,20 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr +from pydantic import Field, StrictBool, StrictStr from typing import List, Optional from typing_extensions import Annotated from uuid import UUID +from opal_security.models.escalate_request200_response import EscalateRequest200Response +from opal_security.models.invite_user_info import InviteUserInfo from opal_security.models.paginated_remote_users_list import PaginatedRemoteUsersList from opal_security.models.paginated_users_list import PaginatedUsersList from opal_security.models.tags_list import TagsList from opal_security.models.third_party_provider_enum import ThirdPartyProviderEnum +from opal_security.models.update_user_info import UpdateUserInfo from opal_security.models.user import User +from opal_security.models.user_access_entity_type_enum import UserAccessEntityTypeEnum +from opal_security.models.user_access_list import UserAccessList from opal_security.api_client import ApiClient, RequestSerialized from opal_security.api_response import ApiResponse @@ -45,14 +50,2301 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def delete_user( + self, + user_id: Annotated[UUID, Field(description="The ID of the user to delete.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> User: + """delete_user + + Deletes a user from your organization. + + :param user_id: The ID of the user to delete. (required) + :type user_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + '403': None, + '404': None, + '409': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_user_with_http_info( + self, + user_id: Annotated[UUID, Field(description="The ID of the user to delete.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[User]: + """delete_user + + Deletes a user from your organization. + + :param user_id: The ID of the user to delete. (required) + :type user_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + '403': None, + '404': None, + '409': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_user_without_preload_content( + self, + user_id: Annotated[UUID, Field(description="The ID of the user to delete.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_user + + Deletes a user from your organization. + + :param user_id: The ID of the user to delete. (required) + :type user_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + '403': None, + '404': None, + '409': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_user_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/users/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_remote_users( self, - third_party_provider: Annotated[Optional[List[ThirdPartyProviderEnum]], Field(description="Filter remote users by their third party provider.")] = None, - user_id: Annotated[Optional[List[UUID]], Field(description="Filter remote users by their user ID.")] = None, - remote_id: Annotated[Optional[List[StrictStr]], Field(description="Filter remote users by their remote ID.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + third_party_provider: Annotated[Optional[List[ThirdPartyProviderEnum]], Field(description="Filter remote users by their third party provider.")] = None, + user_id: Annotated[Optional[List[UUID]], Field(description="Filter remote users by their user ID.")] = None, + remote_id: Annotated[Optional[List[StrictStr]], Field(description="Filter remote users by their remote ID.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginatedRemoteUsersList: + """get_remote_users + + Returns a list of remote users for your organization. + + :param third_party_provider: Filter remote users by their third party provider. + :type third_party_provider: List[ThirdPartyProviderEnum] + :param user_id: Filter remote users by their user ID. + :type user_id: List[UUID] + :param remote_id: Filter remote users by their remote ID. + :type remote_id: List[str] + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_remote_users_serialize( + third_party_provider=third_party_provider, + user_id=user_id, + remote_id=remote_id, + cursor=cursor, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedRemoteUsersList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_remote_users_with_http_info( + self, + third_party_provider: Annotated[Optional[List[ThirdPartyProviderEnum]], Field(description="Filter remote users by their third party provider.")] = None, + user_id: Annotated[Optional[List[UUID]], Field(description="Filter remote users by their user ID.")] = None, + remote_id: Annotated[Optional[List[StrictStr]], Field(description="Filter remote users by their remote ID.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PaginatedRemoteUsersList]: + """get_remote_users + + Returns a list of remote users for your organization. + + :param third_party_provider: Filter remote users by their third party provider. + :type third_party_provider: List[ThirdPartyProviderEnum] + :param user_id: Filter remote users by their user ID. + :type user_id: List[UUID] + :param remote_id: Filter remote users by their remote ID. + :type remote_id: List[str] + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_remote_users_serialize( + third_party_provider=third_party_provider, + user_id=user_id, + remote_id=remote_id, + cursor=cursor, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedRemoteUsersList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_remote_users_without_preload_content( + self, + third_party_provider: Annotated[Optional[List[ThirdPartyProviderEnum]], Field(description="Filter remote users by their third party provider.")] = None, + user_id: Annotated[Optional[List[UUID]], Field(description="Filter remote users by their user ID.")] = None, + remote_id: Annotated[Optional[List[StrictStr]], Field(description="Filter remote users by their remote ID.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_remote_users + + Returns a list of remote users for your organization. + + :param third_party_provider: Filter remote users by their third party provider. + :type third_party_provider: List[ThirdPartyProviderEnum] + :param user_id: Filter remote users by their user ID. + :type user_id: List[UUID] + :param remote_id: Filter remote users by their remote ID. + :type remote_id: List[str] + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_remote_users_serialize( + third_party_provider=third_party_provider, + user_id=user_id, + remote_id=remote_id, + cursor=cursor, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedRemoteUsersList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_remote_users_serialize( + self, + third_party_provider, + user_id, + remote_id, + cursor, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'third_party_provider': 'multi', + 'user_id': 'multi', + 'remote_id': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if third_party_provider is not None: + + _query_params.append(('third_party_provider', third_party_provider)) + + if user_id is not None: + + _query_params.append(('user_id', user_id)) + + if remote_id is not None: + + _query_params.append(('remote_id', remote_id)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/remote_users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_user_access( + self, + user_id: Annotated[UUID, Field(description="The ID of the user whose access to return.")], + cursor: Annotated[Optional[StrictStr], Field(description="The `next` cursor from a previous response. Resumes the list at that point.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Maximum is 1000. If omitted, all results are returned in a single response and `next` is null. ")] = None, + entity_type: Annotated[Optional[UserAccessEntityTypeEnum], Field(description="Only return access to this type of entity. Omit to return both resources and groups.")] = None, + include_unmanaged: Annotated[Optional[StrictBool], Field(description="Include the user's access to unmanaged resources.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserAccessList: + """Get a user's access + + Returns all of the resources and groups the user has access to, in a single list. All results are returned unless `page_size` is set, in which case the list is paginated. Includes access the user has directly and access they have indirectly (for example, through group membership or nested groups). Use `has_direct_access` and `num_access_paths` to tell them apart. Each row is one (resource or group, access level) pair. Only assignments the caller is allowed to read are returned, so the list can be empty or partial for a caller without permission to read assignments on the user's resources and groups. Results are ordered by entity ID; the order is stable across pages but has no other meaning. + + :param user_id: The ID of the user whose access to return. (required) + :type user_id: UUID + :param cursor: The `next` cursor from a previous response. Resumes the list at that point. + :type cursor: str + :param page_size: Number of results to return per page. Maximum is 1000. If omitted, all results are returned in a single response and `next` is null. + :type page_size: int + :param entity_type: Only return access to this type of entity. Omit to return both resources and groups. + :type entity_type: UserAccessEntityTypeEnum + :param include_unmanaged: Include the user's access to unmanaged resources. + :type include_unmanaged: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_access_serialize( + user_id=user_id, + cursor=cursor, + page_size=page_size, + entity_type=entity_type, + include_unmanaged=include_unmanaged, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserAccessList", + '400': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_user_access_with_http_info( + self, + user_id: Annotated[UUID, Field(description="The ID of the user whose access to return.")], + cursor: Annotated[Optional[StrictStr], Field(description="The `next` cursor from a previous response. Resumes the list at that point.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Maximum is 1000. If omitted, all results are returned in a single response and `next` is null. ")] = None, + entity_type: Annotated[Optional[UserAccessEntityTypeEnum], Field(description="Only return access to this type of entity. Omit to return both resources and groups.")] = None, + include_unmanaged: Annotated[Optional[StrictBool], Field(description="Include the user's access to unmanaged resources.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserAccessList]: + """Get a user's access + + Returns all of the resources and groups the user has access to, in a single list. All results are returned unless `page_size` is set, in which case the list is paginated. Includes access the user has directly and access they have indirectly (for example, through group membership or nested groups). Use `has_direct_access` and `num_access_paths` to tell them apart. Each row is one (resource or group, access level) pair. Only assignments the caller is allowed to read are returned, so the list can be empty or partial for a caller without permission to read assignments on the user's resources and groups. Results are ordered by entity ID; the order is stable across pages but has no other meaning. + + :param user_id: The ID of the user whose access to return. (required) + :type user_id: UUID + :param cursor: The `next` cursor from a previous response. Resumes the list at that point. + :type cursor: str + :param page_size: Number of results to return per page. Maximum is 1000. If omitted, all results are returned in a single response and `next` is null. + :type page_size: int + :param entity_type: Only return access to this type of entity. Omit to return both resources and groups. + :type entity_type: UserAccessEntityTypeEnum + :param include_unmanaged: Include the user's access to unmanaged resources. + :type include_unmanaged: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_access_serialize( + user_id=user_id, + cursor=cursor, + page_size=page_size, + entity_type=entity_type, + include_unmanaged=include_unmanaged, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserAccessList", + '400': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_user_access_without_preload_content( + self, + user_id: Annotated[UUID, Field(description="The ID of the user whose access to return.")], + cursor: Annotated[Optional[StrictStr], Field(description="The `next` cursor from a previous response. Resumes the list at that point.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Maximum is 1000. If omitted, all results are returned in a single response and `next` is null. ")] = None, + entity_type: Annotated[Optional[UserAccessEntityTypeEnum], Field(description="Only return access to this type of entity. Omit to return both resources and groups.")] = None, + include_unmanaged: Annotated[Optional[StrictBool], Field(description="Include the user's access to unmanaged resources.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a user's access + + Returns all of the resources and groups the user has access to, in a single list. All results are returned unless `page_size` is set, in which case the list is paginated. Includes access the user has directly and access they have indirectly (for example, through group membership or nested groups). Use `has_direct_access` and `num_access_paths` to tell them apart. Each row is one (resource or group, access level) pair. Only assignments the caller is allowed to read are returned, so the list can be empty or partial for a caller without permission to read assignments on the user's resources and groups. Results are ordered by entity ID; the order is stable across pages but has no other meaning. + + :param user_id: The ID of the user whose access to return. (required) + :type user_id: UUID + :param cursor: The `next` cursor from a previous response. Resumes the list at that point. + :type cursor: str + :param page_size: Number of results to return per page. Maximum is 1000. If omitted, all results are returned in a single response and `next` is null. + :type page_size: int + :param entity_type: Only return access to this type of entity. Omit to return both resources and groups. + :type entity_type: UserAccessEntityTypeEnum + :param include_unmanaged: Include the user's access to unmanaged resources. + :type include_unmanaged: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_access_serialize( + user_id=user_id, + cursor=cursor, + page_size=page_size, + entity_type=entity_type, + include_unmanaged=include_unmanaged, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserAccessList", + '400': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_access_serialize( + self, + user_id, + cursor, + page_size, + entity_type, + include_unmanaged, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if entity_type is not None: + + _query_params.append(('entity_type', entity_type.value)) + + if include_unmanaged is not None: + + _query_params.append(('include_unmanaged', include_unmanaged)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/{user_id}/access', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_user_by_id( + self, + user_id: Annotated[UUID, Field(description="The ID of the user.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> User: + """Get user by ID + + Returns a `User` object. + + :param user_id: The ID of the user. (required) + :type user_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_by_id_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_user_by_id_with_http_info( + self, + user_id: Annotated[UUID, Field(description="The ID of the user.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[User]: + """Get user by ID + + Returns a `User` object. + + :param user_id: The ID of the user. (required) + :type user_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_by_id_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_user_by_id_without_preload_content( + self, + user_id: Annotated[UUID, Field(description="The ID of the user.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get user by ID + + Returns a `User` object. + + :param user_id: The ID of the user. (required) + :type user_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_by_id_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_by_id_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/{user_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_user_tags( + self, + user_id: Annotated[UUID, Field(description="The ID of the user whose tags to return.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TagsList: + """get_user_tags + + Returns all tags applied to the user. + + :param user_id: The ID of the user whose tags to return. (required) + :type user_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_tags_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TagsList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_user_tags_with_http_info( + self, + user_id: Annotated[UUID, Field(description="The ID of the user whose tags to return.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TagsList]: + """get_user_tags + + Returns all tags applied to the user. + + :param user_id: The ID of the user whose tags to return. (required) + :type user_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_tags_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TagsList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_user_tags_without_preload_content( + self, + user_id: Annotated[UUID, Field(description="The ID of the user whose tags to return.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_user_tags + + Returns all tags applied to the user. + + :param user_id: The ID of the user whose tags to return. (required) + :type user_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_tags_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TagsList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_tags_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/{user_id}/tags', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_user_whoami( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> User: + """get_user_whoami + + Returns the user that the provided API token authenticates as. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_whoami_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_user_whoami_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[User]: + """get_user_whoami + + Returns the user that the provided API token authenticates as. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_whoami_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_user_whoami_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_user_whoami + + Returns the user that the provided API token authenticates as. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_whoami_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_whoami_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/whoami', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_users( + self, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + tag_ids: Annotated[Optional[List[UUID]], Field(description="The IDs of the tags to filter by. Returns only users that have any of these tags applied.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginatedUsersList: + """get_users + + Returns a list of users for your organization. Includes agent-labeled identities that appear on the Users page. Classic service accounts are not included. + + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param tag_ids: The IDs of the tags to filter by. Returns only users that have any of these tags applied. + :type tag_ids: List[UUID] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_users_serialize( + cursor=cursor, + page_size=page_size, + tag_ids=tag_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedUsersList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_users_with_http_info( + self, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + tag_ids: Annotated[Optional[List[UUID]], Field(description="The IDs of the tags to filter by. Returns only users that have any of these tags applied.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PaginatedUsersList]: + """get_users + + Returns a list of users for your organization. Includes agent-labeled identities that appear on the Users page. Classic service accounts are not included. + + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param tag_ids: The IDs of the tags to filter by. Returns only users that have any of these tags applied. + :type tag_ids: List[UUID] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_users_serialize( + cursor=cursor, + page_size=page_size, + tag_ids=tag_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedUsersList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_users_without_preload_content( + self, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + tag_ids: Annotated[Optional[List[UUID]], Field(description="The IDs of the tags to filter by. Returns only users that have any of these tags applied.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_users + + Returns a list of users for your organization. Includes agent-labeled identities that appear on the Users page. Classic service accounts are not included. + + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param tag_ids: The IDs of the tags to filter by. Returns only users that have any of these tags applied. + :type tag_ids: List[UUID] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_users_serialize( + cursor=cursor, + page_size=page_size, + tag_ids=tag_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedUsersList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_users_serialize( + self, + cursor, + page_size, + tag_ids, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'tag_ids': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if tag_ids is not None: + + _query_params.append(('tag_ids', tag_ids)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def invite_user( + self, + invite_user_info: InviteUserInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> User: + """invite_user + + Invites a user to your organization. + + :param invite_user_info: (required) + :type invite_user_info: InviteUserInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._invite_user_serialize( + invite_user_info=invite_user_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + '400': None, + '403': None, + '409': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def invite_user_with_http_info( + self, + invite_user_info: InviteUserInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[User]: + """invite_user + + Invites a user to your organization. + + :param invite_user_info: (required) + :type invite_user_info: InviteUserInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._invite_user_serialize( + invite_user_info=invite_user_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + '400': None, + '403': None, + '409': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def invite_user_without_preload_content( + self, + invite_user_info: InviteUserInfo, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """invite_user + + Invites a user to your organization. + + :param invite_user_info: (required) + :type invite_user_info: InviteUserInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._invite_user_serialize( + invite_user_info=invite_user_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "User", + '400': None, + '403': None, + '409': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _invite_user_serialize( + self, + invite_user_info, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if invite_user_info is not None: + _body_params = invite_user_info + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def reset_user_mfa( + self, + user_id: Annotated[UUID, Field(description="The ID of the user whose MFA should be reset.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -65,21 +2357,13 @@ def get_remote_users( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PaginatedRemoteUsersList: - """get_remote_users + ) -> EscalateRequest200Response: + """Reset a user's Opal MFA - Returns a list of remote users for your organization. + Deletes the user's Auth0 (Opal) MFA enrollments so they are prompted to re-enroll on their next sign-in. Only applies to orgs that use Opal/Auth0 for MFA (not available on-prem, and a no-op success for users who have never signed into Auth0). - :param third_party_provider: Filter remote users by their third party provider. - :type third_party_provider: List[ThirdPartyProviderEnum] - :param user_id: Filter remote users by their user ID. - :type user_id: List[UUID] - :param remote_id: Filter remote users by their remote ID. - :type remote_id: List[str] - :param cursor: The pagination cursor value. - :type cursor: str - :param page_size: Number of results to return per page. Default is 200. - :type page_size: int + :param user_id: The ID of the user whose MFA should be reset. (required) + :type user_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -102,12 +2386,8 @@ def get_remote_users( :return: Returns the result object. """ # noqa: E501 - _param = self._get_remote_users_serialize( - third_party_provider=third_party_provider, + _param = self._reset_user_mfa_serialize( user_id=user_id, - remote_id=remote_id, - cursor=cursor, - page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -115,7 +2395,11 @@ def get_remote_users( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaginatedRemoteUsersList", + '200': "EscalateRequest200Response", + '400': None, + '403': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -129,13 +2413,9 @@ def get_remote_users( @validate_call - def get_remote_users_with_http_info( + def reset_user_mfa_with_http_info( self, - third_party_provider: Annotated[Optional[List[ThirdPartyProviderEnum]], Field(description="Filter remote users by their third party provider.")] = None, - user_id: Annotated[Optional[List[UUID]], Field(description="Filter remote users by their user ID.")] = None, - remote_id: Annotated[Optional[List[StrictStr]], Field(description="Filter remote users by their remote ID.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + user_id: Annotated[UUID, Field(description="The ID of the user whose MFA should be reset.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -148,21 +2428,13 @@ def get_remote_users_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PaginatedRemoteUsersList]: - """get_remote_users + ) -> ApiResponse[EscalateRequest200Response]: + """Reset a user's Opal MFA - Returns a list of remote users for your organization. + Deletes the user's Auth0 (Opal) MFA enrollments so they are prompted to re-enroll on their next sign-in. Only applies to orgs that use Opal/Auth0 for MFA (not available on-prem, and a no-op success for users who have never signed into Auth0). - :param third_party_provider: Filter remote users by their third party provider. - :type third_party_provider: List[ThirdPartyProviderEnum] - :param user_id: Filter remote users by their user ID. - :type user_id: List[UUID] - :param remote_id: Filter remote users by their remote ID. - :type remote_id: List[str] - :param cursor: The pagination cursor value. - :type cursor: str - :param page_size: Number of results to return per page. Default is 200. - :type page_size: int + :param user_id: The ID of the user whose MFA should be reset. (required) + :type user_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -185,12 +2457,8 @@ def get_remote_users_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_remote_users_serialize( - third_party_provider=third_party_provider, + _param = self._reset_user_mfa_serialize( user_id=user_id, - remote_id=remote_id, - cursor=cursor, - page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -198,7 +2466,11 @@ def get_remote_users_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaginatedRemoteUsersList", + '200': "EscalateRequest200Response", + '400': None, + '403': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -212,13 +2484,9 @@ def get_remote_users_with_http_info( @validate_call - def get_remote_users_without_preload_content( + def reset_user_mfa_without_preload_content( self, - third_party_provider: Annotated[Optional[List[ThirdPartyProviderEnum]], Field(description="Filter remote users by their third party provider.")] = None, - user_id: Annotated[Optional[List[UUID]], Field(description="Filter remote users by their user ID.")] = None, - remote_id: Annotated[Optional[List[StrictStr]], Field(description="Filter remote users by their remote ID.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + user_id: Annotated[UUID, Field(description="The ID of the user whose MFA should be reset.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -232,20 +2500,12 @@ def get_remote_users_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_remote_users + """Reset a user's Opal MFA - Returns a list of remote users for your organization. + Deletes the user's Auth0 (Opal) MFA enrollments so they are prompted to re-enroll on their next sign-in. Only applies to orgs that use Opal/Auth0 for MFA (not available on-prem, and a no-op success for users who have never signed into Auth0). - :param third_party_provider: Filter remote users by their third party provider. - :type third_party_provider: List[ThirdPartyProviderEnum] - :param user_id: Filter remote users by their user ID. - :type user_id: List[UUID] - :param remote_id: Filter remote users by their remote ID. - :type remote_id: List[str] - :param cursor: The pagination cursor value. - :type cursor: str - :param page_size: Number of results to return per page. Default is 200. - :type page_size: int + :param user_id: The ID of the user whose MFA should be reset. (required) + :type user_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -268,12 +2528,8 @@ def get_remote_users_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_remote_users_serialize( - third_party_provider=third_party_provider, + _param = self._reset_user_mfa_serialize( user_id=user_id, - remote_id=remote_id, - cursor=cursor, - page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -281,7 +2537,11 @@ def get_remote_users_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaginatedRemoteUsersList", + '200': "EscalateRequest200Response", + '400': None, + '403': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -290,13 +2550,9 @@ def get_remote_users_without_preload_content( return response_data.response - def _get_remote_users_serialize( + def _reset_user_mfa_serialize( self, - third_party_provider, user_id, - remote_id, - cursor, - page_size, _request_auth, _content_type, _headers, @@ -306,9 +2562,6 @@ def _get_remote_users_serialize( _host = None _collection_formats: Dict[str, str] = { - 'third_party_provider': 'multi', - 'user_id': 'multi', - 'remote_id': 'multi', } _path_params: Dict[str, str] = {} @@ -321,27 +2574,9 @@ def _get_remote_users_serialize( _body_params: Optional[bytes] = None # process the path parameters - # process the query parameters - if third_party_provider is not None: - - _query_params.append(('third_party_provider', third_party_provider)) - if user_id is not None: - - _query_params.append(('user_id', user_id)) - - if remote_id is not None: - - _query_params.append(('remote_id', remote_id)) - - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if page_size is not None: - - _query_params.append(('page_size', page_size)) - + _path_params['user_id'] = user_id + # process the query parameters # process the header parameters # process the form parameters # process the body parameter @@ -362,8 +2597,8 @@ def _get_remote_users_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/users/remote_users', + method='POST', + resource_path='/users/{user_id}/mfa/reset', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -380,9 +2615,9 @@ def _get_remote_users_serialize( @validate_call - def get_user_tags( + def revoke_all_user_access( self, - user_id: Annotated[UUID, Field(description="The ID of the user whose tags to return.")], + user_id: Annotated[UUID, Field(description="The ID of the user whose access should be revoked.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -395,12 +2630,12 @@ def get_user_tags( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TagsList: - """get_user_tags + ) -> EscalateRequest200Response: + """Revoke all of a user's access - Returns all tags applied to the user. + Immediately removes all of a user's access across connected systems, regardless of the user's status in the identity provider. Intended for incident response, e.g. a security tool reacting to a compromised account. Ends the user's Opal sessions, deletes their Opal API tokens and third-party tokens, revokes their MCP OAuth grants, removes their direct group, access rule and resource access (pushing the removals to the connected systems), and cancels their pending access requests. Recorded as a USER_ACCESS_REVOKED event with the caller as the actor. This does not lock the user out, and the revocation does not last on its own. The user and their accounts in connected systems are kept, and they can sign in again through your identity provider. Access granted by Opal access rules is granted again on the next access rule sync while the user still matches the rule, and memberships that identity provider rules control return on the next identity provider sync. To keep the user's access revoked, also disable or deprovision them in your identity provider. With the organization setting that revokes access for deprovisioned users turned on, Opal then offboards them and stops granting them access through access rules. Also not removed: membership in groups computed by a connected system (e.g. dynamic groups), access to unmanaged groups and resources, and the user's owner and reviewer roles. Removal from connected systems runs asynchronously; a 200 response means the removals were started, not that every connected system has finished. A removal that failed permanently before is retried. A removal that is already in progress is left to finish and is not started again, so check its propagation status if it stays pending. - :param user_id: The ID of the user whose tags to return. (required) + :param user_id: The ID of the user whose access should be revoked. (required) :type user_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -424,7 +2659,7 @@ def get_user_tags( :return: Returns the result object. """ # noqa: E501 - _param = self._get_user_tags_serialize( + _param = self._revoke_all_user_access_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, @@ -433,7 +2668,11 @@ def get_user_tags( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TagsList", + '200': "EscalateRequest200Response", + '400': None, + '403': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -447,9 +2686,9 @@ def get_user_tags( @validate_call - def get_user_tags_with_http_info( + def revoke_all_user_access_with_http_info( self, - user_id: Annotated[UUID, Field(description="The ID of the user whose tags to return.")], + user_id: Annotated[UUID, Field(description="The ID of the user whose access should be revoked.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -462,12 +2701,12 @@ def get_user_tags_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TagsList]: - """get_user_tags + ) -> ApiResponse[EscalateRequest200Response]: + """Revoke all of a user's access - Returns all tags applied to the user. + Immediately removes all of a user's access across connected systems, regardless of the user's status in the identity provider. Intended for incident response, e.g. a security tool reacting to a compromised account. Ends the user's Opal sessions, deletes their Opal API tokens and third-party tokens, revokes their MCP OAuth grants, removes their direct group, access rule and resource access (pushing the removals to the connected systems), and cancels their pending access requests. Recorded as a USER_ACCESS_REVOKED event with the caller as the actor. This does not lock the user out, and the revocation does not last on its own. The user and their accounts in connected systems are kept, and they can sign in again through your identity provider. Access granted by Opal access rules is granted again on the next access rule sync while the user still matches the rule, and memberships that identity provider rules control return on the next identity provider sync. To keep the user's access revoked, also disable or deprovision them in your identity provider. With the organization setting that revokes access for deprovisioned users turned on, Opal then offboards them and stops granting them access through access rules. Also not removed: membership in groups computed by a connected system (e.g. dynamic groups), access to unmanaged groups and resources, and the user's owner and reviewer roles. Removal from connected systems runs asynchronously; a 200 response means the removals were started, not that every connected system has finished. A removal that failed permanently before is retried. A removal that is already in progress is left to finish and is not started again, so check its propagation status if it stays pending. - :param user_id: The ID of the user whose tags to return. (required) + :param user_id: The ID of the user whose access should be revoked. (required) :type user_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -491,7 +2730,7 @@ def get_user_tags_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_user_tags_serialize( + _param = self._revoke_all_user_access_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, @@ -500,7 +2739,11 @@ def get_user_tags_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TagsList", + '200': "EscalateRequest200Response", + '400': None, + '403': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -514,9 +2757,9 @@ def get_user_tags_with_http_info( @validate_call - def get_user_tags_without_preload_content( + def revoke_all_user_access_without_preload_content( self, - user_id: Annotated[UUID, Field(description="The ID of the user whose tags to return.")], + user_id: Annotated[UUID, Field(description="The ID of the user whose access should be revoked.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -530,11 +2773,11 @@ def get_user_tags_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_user_tags + """Revoke all of a user's access - Returns all tags applied to the user. + Immediately removes all of a user's access across connected systems, regardless of the user's status in the identity provider. Intended for incident response, e.g. a security tool reacting to a compromised account. Ends the user's Opal sessions, deletes their Opal API tokens and third-party tokens, revokes their MCP OAuth grants, removes their direct group, access rule and resource access (pushing the removals to the connected systems), and cancels their pending access requests. Recorded as a USER_ACCESS_REVOKED event with the caller as the actor. This does not lock the user out, and the revocation does not last on its own. The user and their accounts in connected systems are kept, and they can sign in again through your identity provider. Access granted by Opal access rules is granted again on the next access rule sync while the user still matches the rule, and memberships that identity provider rules control return on the next identity provider sync. To keep the user's access revoked, also disable or deprovision them in your identity provider. With the organization setting that revokes access for deprovisioned users turned on, Opal then offboards them and stops granting them access through access rules. Also not removed: membership in groups computed by a connected system (e.g. dynamic groups), access to unmanaged groups and resources, and the user's owner and reviewer roles. Removal from connected systems runs asynchronously; a 200 response means the removals were started, not that every connected system has finished. A removal that failed permanently before is retried. A removal that is already in progress is left to finish and is not started again, so check its propagation status if it stays pending. - :param user_id: The ID of the user whose tags to return. (required) + :param user_id: The ID of the user whose access should be revoked. (required) :type user_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -558,7 +2801,7 @@ def get_user_tags_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_user_tags_serialize( + _param = self._revoke_all_user_access_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, @@ -567,7 +2810,11 @@ def get_user_tags_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TagsList", + '200': "EscalateRequest200Response", + '400': None, + '403': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -576,7 +2823,7 @@ def get_user_tags_without_preload_content( return response_data.response - def _get_user_tags_serialize( + def _revoke_all_user_access_serialize( self, user_id, _request_auth, @@ -623,8 +2870,8 @@ def _get_user_tags_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/users/{user_id}/tags', + method='POST', + resource_path='/users/{user_id}/revoke-all', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -641,11 +2888,10 @@ def _get_user_tags_serialize( @validate_call - def get_users( + def update_user( self, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, - tag_ids: Annotated[Optional[List[UUID]], Field(description="The IDs of the tags to filter by. Returns only users that have any of these tags applied.")] = None, + user_id: Annotated[UUID, Field(description="The ID of the user to update.")], + update_user_info: UpdateUserInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -658,17 +2904,15 @@ def get_users( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PaginatedUsersList: - """get_users + ) -> User: + """update_user - Returns a list of users for your organization. + Updates a user's position or manager. - :param cursor: The pagination cursor value. - :type cursor: str - :param page_size: Number of results to return per page. Default is 200. - :type page_size: int - :param tag_ids: The IDs of the tags to filter by. Returns only users that have any of these tags applied. - :type tag_ids: List[UUID] + :param user_id: The ID of the user to update. (required) + :type user_id: UUID + :param update_user_info: (required) + :type update_user_info: UpdateUserInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -691,10 +2935,9 @@ def get_users( :return: Returns the result object. """ # noqa: E501 - _param = self._get_users_serialize( - cursor=cursor, - page_size=page_size, - tag_ids=tag_ids, + _param = self._update_user_serialize( + user_id=user_id, + update_user_info=update_user_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -702,7 +2945,11 @@ def get_users( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaginatedUsersList", + '200': "User", + '400': None, + '403': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -716,11 +2963,10 @@ def get_users( @validate_call - def get_users_with_http_info( + def update_user_with_http_info( self, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, - tag_ids: Annotated[Optional[List[UUID]], Field(description="The IDs of the tags to filter by. Returns only users that have any of these tags applied.")] = None, + user_id: Annotated[UUID, Field(description="The ID of the user to update.")], + update_user_info: UpdateUserInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -733,17 +2979,15 @@ def get_users_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PaginatedUsersList]: - """get_users + ) -> ApiResponse[User]: + """update_user - Returns a list of users for your organization. + Updates a user's position or manager. - :param cursor: The pagination cursor value. - :type cursor: str - :param page_size: Number of results to return per page. Default is 200. - :type page_size: int - :param tag_ids: The IDs of the tags to filter by. Returns only users that have any of these tags applied. - :type tag_ids: List[UUID] + :param user_id: The ID of the user to update. (required) + :type user_id: UUID + :param update_user_info: (required) + :type update_user_info: UpdateUserInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -766,10 +3010,9 @@ def get_users_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_users_serialize( - cursor=cursor, - page_size=page_size, - tag_ids=tag_ids, + _param = self._update_user_serialize( + user_id=user_id, + update_user_info=update_user_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -777,7 +3020,11 @@ def get_users_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaginatedUsersList", + '200': "User", + '400': None, + '403': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -791,11 +3038,10 @@ def get_users_with_http_info( @validate_call - def get_users_without_preload_content( + def update_user_without_preload_content( self, - cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, - tag_ids: Annotated[Optional[List[UUID]], Field(description="The IDs of the tags to filter by. Returns only users that have any of these tags applied.")] = None, + user_id: Annotated[UUID, Field(description="The ID of the user to update.")], + update_user_info: UpdateUserInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -809,16 +3055,14 @@ def get_users_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_users + """update_user - Returns a list of users for your organization. + Updates a user's position or manager. - :param cursor: The pagination cursor value. - :type cursor: str - :param page_size: Number of results to return per page. Default is 200. - :type page_size: int - :param tag_ids: The IDs of the tags to filter by. Returns only users that have any of these tags applied. - :type tag_ids: List[UUID] + :param user_id: The ID of the user to update. (required) + :type user_id: UUID + :param update_user_info: (required) + :type update_user_info: UpdateUserInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -841,10 +3085,9 @@ def get_users_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_users_serialize( - cursor=cursor, - page_size=page_size, - tag_ids=tag_ids, + _param = self._update_user_serialize( + user_id=user_id, + update_user_info=update_user_info, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -852,7 +3095,11 @@ def get_users_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaginatedUsersList", + '200': "User", + '400': None, + '403': None, + '404': None, + '409': None, } response_data = self.api_client.call_api( *_param, @@ -861,11 +3108,10 @@ def get_users_without_preload_content( return response_data.response - def _get_users_serialize( + def _update_user_serialize( self, - cursor, - page_size, - tag_ids, + user_id, + update_user_info, _request_auth, _content_type, _headers, @@ -875,7 +3121,6 @@ def _get_users_serialize( _host = None _collection_formats: Dict[str, str] = { - 'tag_ids': 'multi', } _path_params: Dict[str, str] = {} @@ -888,22 +3133,14 @@ def _get_users_serialize( _body_params: Optional[bytes] = None # process the path parameters + if user_id is not None: + _path_params['user_id'] = user_id # process the query parameters - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if page_size is not None: - - _query_params.append(('page_size', page_size)) - - if tag_ids is not None: - - _query_params.append(('tag_ids', tag_ids)) - # process the header parameters # process the form parameters # process the body parameter + if update_user_info is not None: + _body_params = update_user_info # set the HTTP header `Accept` @@ -914,6 +3151,19 @@ def _get_users_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -921,8 +3171,8 @@ def _get_users_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/users', + method='PATCH', + resource_path='/users/{user_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/opal_security/models/__init__.py b/opal_security/models/__init__.py index e39bbb8..56fcf64 100644 --- a/opal_security/models/__init__.py +++ b/opal_security/models/__init__.py @@ -25,12 +25,29 @@ from opal_security.models.add_group_user_request import AddGroupUserRequest from opal_security.models.add_resource_nhi_request import AddResourceNhiRequest from opal_security.models.add_resource_user_request import AddResourceUserRequest +from opal_security.models.add_role_assignment_input import AddRoleAssignmentInput +from opal_security.models.add_role_assignments_entry import AddRoleAssignmentsEntry +from opal_security.models.add_role_assignments_request import AddRoleAssignmentsRequest +from opal_security.models.add_role_assignments_response import AddRoleAssignmentsResponse +from opal_security.models.agent_activity_client_setting import AgentActivityClientSetting +from opal_security.models.agent_activity_client_settings import AgentActivityClientSettings +from opal_security.models.agent_activity_content_report import AgentActivityContentReport +from opal_security.models.agent_activity_event import AgentActivityEvent +from opal_security.models.agent_activity_images import AgentActivityImages +from opal_security.models.agent_activity_ingest_request import AgentActivityIngestRequest +from opal_security.models.agent_activity_ingest_result import AgentActivityIngestResult +from opal_security.models.agent_activity_mcp_server import AgentActivityMcpServer +from opal_security.models.agent_activity_opal_mcp_server import AgentActivityOpalMcpServer +from opal_security.models.agent_activity_opal_reported import AgentActivityOpalReported +from opal_security.models.agent_kill_switch import AgentKillSwitch +from opal_security.models.anthropic_inference_hook_verdict import AnthropicInferenceHookVerdict from opal_security.models.api_access_level_enum import ApiAccessLevelEnum from opal_security.models.app import App from opal_security.models.app_type_enum import AppTypeEnum from opal_security.models.app_validation import AppValidation from opal_security.models.app_validation_severity_enum import AppValidationSeverityEnum from opal_security.models.app_validation_status_enum import AppValidationStatusEnum +from opal_security.models.app_visibility_info import AppVisibilityInfo from opal_security.models.approve_request200_response import ApproveRequest200Response from opal_security.models.approve_request_request import ApproveRequestRequest from opal_security.models.apps_list import AppsList @@ -39,10 +56,31 @@ from opal_security.models.bundle import Bundle from opal_security.models.bundle_group import BundleGroup from opal_security.models.bundle_resource import BundleResource +from opal_security.models.campaign import Campaign +from opal_security.models.campaign_configuration import CampaignConfiguration +from opal_security.models.campaign_group_asset_visibility_policy_enum import CampaignGroupAssetVisibilityPolicyEnum +from opal_security.models.campaign_item import CampaignItem +from opal_security.models.campaign_item_admin_override import CampaignItemAdminOverride +from opal_security.models.campaign_item_review import CampaignItemReview +from opal_security.models.campaign_item_review_decision_enum import CampaignItemReviewDecisionEnum +from opal_security.models.campaign_item_review_result import CampaignItemReviewResult +from opal_security.models.campaign_item_reviewer_assignment import CampaignItemReviewerAssignment +from opal_security.models.campaign_item_reviewer_assignment_source_enum import CampaignItemReviewerAssignmentSourceEnum +from opal_security.models.campaign_item_reviewer_source_removal import CampaignItemReviewerSourceRemoval +from opal_security.models.campaign_item_status_enum import CampaignItemStatusEnum +from opal_security.models.campaign_item_target_type_enum import CampaignItemTargetTypeEnum +from opal_security.models.campaign_item_unassigned_preset_message import CampaignItemUnassignedPresetMessage +from opal_security.models.campaign_revoke_on_enum import CampaignRevokeOnEnum +from opal_security.models.campaign_status_enum import CampaignStatusEnum +from opal_security.models.cancel_request_request import CancelRequestRequest from opal_security.models.condition import Condition from opal_security.models.configuration_template import ConfigurationTemplate +from opal_security.models.create_app_info import CreateAppInfo from opal_security.models.create_bundle_info import CreateBundleInfo +from opal_security.models.create_campaign_configuration_info import CreateCampaignConfigurationInfo +from opal_security.models.create_campaign_info import CreateCampaignInfo from opal_security.models.create_configuration_template_info import CreateConfigurationTemplateInfo +from opal_security.models.create_custom_connector_info import CreateCustomConnectorInfo from opal_security.models.create_delegation_request import CreateDelegationRequest from opal_security.models.create_event_stream_info import CreateEventStreamInfo from opal_security.models.create_group_binding_info import CreateGroupBindingInfo @@ -51,7 +89,10 @@ from opal_security.models.create_idp_group_mapping_request import CreateIdpGroupMappingRequest from opal_security.models.create_message_channel_info import CreateMessageChannelInfo from opal_security.models.create_on_call_schedule_info import CreateOnCallScheduleInfo +from opal_security.models.create_opal_script_info import CreateOpalScriptInfo from opal_security.models.create_owner_info import CreateOwnerInfo +from opal_security.models.create_paladin_context_source_info import CreatePaladinContextSourceInfo +from opal_security.models.create_paladin_info import CreatePaladinInfo from opal_security.models.create_request200_response import CreateRequest200Response from opal_security.models.create_request_comment_request import CreateRequestCommentRequest from opal_security.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList @@ -60,15 +101,26 @@ from opal_security.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner from opal_security.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner from opal_security.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket +from opal_security.models.create_request_template_info import CreateRequestTemplateInfo +from opal_security.models.create_resource_custom_access_level_info import CreateResourceCustomAccessLevelInfo from opal_security.models.create_resource_info import CreateResourceInfo +from opal_security.models.create_service_user_request import CreateServiceUserRequest from opal_security.models.create_tag_info import CreateTagInfo +from opal_security.models.create_token_info import CreateTokenInfo +from opal_security.models.create_token_response import CreateTokenResponse from opal_security.models.create_uar_info import CreateUARInfo +from opal_security.models.custom_connector_app_config import CustomConnectorAppConfig +from opal_security.models.custom_connector_idp_protocol_enum import CustomConnectorIdpProtocolEnum from opal_security.models.delegation import Delegation from opal_security.models.deny_request_request import DenyRequestRequest +from opal_security.models.entity_admin_filter import EntityAdminFilter +from opal_security.models.entity_description_filter import EntityDescriptionFilter from opal_security.models.entity_item_type_enum import EntityItemTypeEnum from opal_security.models.entity_name_filter import EntityNameFilter from opal_security.models.entity_tag_filter import EntityTagFilter +from opal_security.models.entity_tag_key_filter import EntityTagKeyFilter from opal_security.models.entity_type_enum import EntityTypeEnum +from opal_security.models.escalate_request200_response import EscalateRequest200Response from opal_security.models.event import Event from opal_security.models.event_stream import EventStream from opal_security.models.event_stream_connection import EventStreamConnection @@ -77,19 +129,35 @@ from opal_security.models.get_resource_user200_response import GetResourceUser200Response from opal_security.models.group import Group from opal_security.models.group_access_level import GroupAccessLevel +from opal_security.models.group_access_level_list import GroupAccessLevelList from opal_security.models.group_binding import GroupBinding from opal_security.models.group_binding_group import GroupBindingGroup +from opal_security.models.group_configuration_template import GroupConfigurationTemplate from opal_security.models.group_containing_group import GroupContainingGroup from opal_security.models.group_containing_group_list import GroupContainingGroupList +from opal_security.models.group_member_group import GroupMemberGroup +from opal_security.models.group_member_group_list import GroupMemberGroupList from opal_security.models.group_remote_info import GroupRemoteInfo from opal_security.models.group_remote_info_active_directory_group import GroupRemoteInfoActiveDirectoryGroup +from opal_security.models.group_remote_info_activecampaign_group import GroupRemoteInfoActivecampaignGroup +from opal_security.models.group_remote_info_aha_team import GroupRemoteInfoAhaTeam +from opal_security.models.group_remote_info_asana_team import GroupRemoteInfoAsanaTeam from opal_security.models.group_remote_info_aws_sso_group import GroupRemoteInfoAwsSsoGroup +from opal_security.models.group_remote_info_axiom_group import GroupRemoteInfoAxiomGroup from opal_security.models.group_remote_info_azure_ad_microsoft365_group import GroupRemoteInfoAzureAdMicrosoft365Group from opal_security.models.group_remote_info_azure_ad_security_group import GroupRemoteInfoAzureAdSecurityGroup +from opal_security.models.group_remote_info_bitwarden_group import GroupRemoteInfoBitwardenGroup +from opal_security.models.group_remote_info_box_group import GroupRemoteInfoBoxGroup +from opal_security.models.group_remote_info_calendly_group import GroupRemoteInfoCalendlyGroup from opal_security.models.group_remote_info_clickhouse_role import GroupRemoteInfoClickhouseRole +from opal_security.models.group_remote_info_confluence_group import GroupRemoteInfoConfluenceGroup from opal_security.models.group_remote_info_connector_group import GroupRemoteInfoConnectorGroup +from opal_security.models.group_remote_info_cursor_group import GroupRemoteInfoCursorGroup from opal_security.models.group_remote_info_databricks_account_group import GroupRemoteInfoDatabricksAccountGroup +from opal_security.models.group_remote_info_datadog_on_call_schedule import GroupRemoteInfoDatadogOnCallSchedule from opal_security.models.group_remote_info_devin_group import GroupRemoteInfoDevinGroup +from opal_security.models.group_remote_info_docusign_group import GroupRemoteInfoDocusignGroup +from opal_security.models.group_remote_info_docusign_signing_group import GroupRemoteInfoDocusignSigningGroup from opal_security.models.group_remote_info_duo_group import GroupRemoteInfoDuoGroup from opal_security.models.group_remote_info_github_enterprise_team import GroupRemoteInfoGithubEnterpriseTeam from opal_security.models.group_remote_info_github_team import GroupRemoteInfoGithubTeam @@ -98,19 +166,32 @@ from opal_security.models.group_remote_info_grafana_team import GroupRemoteInfoGrafanaTeam from opal_security.models.group_remote_info_hubspot_team import GroupRemoteInfoHubspotTeam from opal_security.models.group_remote_info_incidentio_on_call_schedule import GroupRemoteInfoIncidentioOnCallSchedule +from opal_security.models.group_remote_info_jira_group import GroupRemoteInfoJiraGroup from opal_security.models.group_remote_info_ldap_group import GroupRemoteInfoLdapGroup +from opal_security.models.group_remote_info_linear_team import GroupRemoteInfoLinearTeam from opal_security.models.group_remote_info_okta_group import GroupRemoteInfoOktaGroup from opal_security.models.group_remote_info_okta_group_rule import GroupRemoteInfoOktaGroupRule +from opal_security.models.group_remote_info_onelogin_group import GroupRemoteInfoOneloginGroup +from opal_security.models.group_remote_info_onelogin_role import GroupRemoteInfoOneloginRole from opal_security.models.group_remote_info_pagerduty_on_call_schedule import GroupRemoteInfoPagerdutyOnCallSchedule +from opal_security.models.group_remote_info_ramp_department import GroupRemoteInfoRampDepartment +from opal_security.models.group_remote_info_ramp_location import GroupRemoteInfoRampLocation +from opal_security.models.group_remote_info_rippling_supergroup import GroupRemoteInfoRipplingSupergroup +from opal_security.models.group_remote_info_rippling_team import GroupRemoteInfoRipplingTeam from opal_security.models.group_remote_info_rootly_on_call_schedule import GroupRemoteInfoRootlyOnCallSchedule from opal_security.models.group_remote_info_slack_user_group import GroupRemoteInfoSlackUserGroup from opal_security.models.group_remote_info_snowflake_role import GroupRemoteInfoSnowflakeRole +from opal_security.models.group_remote_info_square_job import GroupRemoteInfoSquareJob +from opal_security.models.group_remote_info_square_location import GroupRemoteInfoSquareLocation +from opal_security.models.group_remote_info_tableau_group import GroupRemoteInfoTableauGroup from opal_security.models.group_remote_info_tailscale_group import GroupRemoteInfoTailscaleGroup from opal_security.models.group_remote_info_twingate_group import GroupRemoteInfoTwingateGroup from opal_security.models.group_remote_info_twingate_group_synced import GroupRemoteInfoTwingateGroupSynced from opal_security.models.group_remote_info_workday_user_security_group import GroupRemoteInfoWorkdayUserSecurityGroup +from opal_security.models.group_remote_info_wrike_group import GroupRemoteInfoWrikeGroup from opal_security.models.group_remote_info_zendesk_group import GroupRemoteInfoZendeskGroup from opal_security.models.group_remote_info_zendesk_organization import GroupRemoteInfoZendeskOrganization +from opal_security.models.group_remote_info_zoom_group import GroupRemoteInfoZoomGroup from opal_security.models.group_resource import GroupResource from opal_security.models.group_resource_list import GroupResourceList from opal_security.models.group_type_enum import GroupTypeEnum @@ -119,19 +200,41 @@ from opal_security.models.group_with_access_level import GroupWithAccessLevel from opal_security.models.idp_group_mapping import IdpGroupMapping from opal_security.models.idp_group_mapping_list import IdpGroupMappingList +from opal_security.models.idp_status_filter import IdpStatusFilter +from opal_security.models.invite_user_info import InviteUserInfo +from opal_security.models.mcp_config_permission import McpConfigPermission +from opal_security.models.mcp_config_plugin import McpConfigPlugin +from opal_security.models.mcp_config_report import McpConfigReport +from opal_security.models.mcp_config_report_result import McpConfigReportResult +from opal_security.models.mcp_config_reporter import McpConfigReporter +from opal_security.models.mcp_config_server import McpConfigServer +from opal_security.models.mcp_config_skill import McpConfigSkill +from opal_security.models.mcp_config_subagent import McpConfigSubagent from opal_security.models.message_channel import MessageChannel from opal_security.models.message_channel_id_list import MessageChannelIDList from opal_security.models.message_channel_list import MessageChannelList from opal_security.models.message_channel_provider_enum import MessageChannelProviderEnum +from opal_security.models.name_match_type import NameMatchType from opal_security.models.on_call_schedule import OnCallSchedule from opal_security.models.on_call_schedule_id_list import OnCallScheduleIDList from opal_security.models.on_call_schedule_list import OnCallScheduleList from opal_security.models.on_call_schedule_provider_enum import OnCallScheduleProviderEnum +from opal_security.models.opal_access_path_detail import OpalAccessPathDetail +from opal_security.models.opal_access_path_edge_filter import OpalAccessPathEdgeFilter +from opal_security.models.opal_access_path_query_body import OpalAccessPathQueryBody +from opal_security.models.opal_access_query import OpalAccessQuery +from opal_security.models.opal_access_query_results import OpalAccessQueryResults +from opal_security.models.opal_access_result_edge import OpalAccessResultEdge +from opal_security.models.opal_access_result_node import OpalAccessResultNode from opal_security.models.opal_node_query import OpalNodeQuery from opal_security.models.opal_node_query_body import OpalNodeQueryBody from opal_security.models.opal_node_query_results import OpalNodeQueryResults from opal_security.models.opal_query_result_edge import OpalQueryResultEdge from opal_security.models.opal_query_result_node import OpalQueryResultNode +from opal_security.models.opal_query_results import OpalQueryResults +from opal_security.models.opal_script import OpalScript +from opal_security.models.opal_script_list import OpalScriptList +from opal_security.models.opal_script_type_enum import OpalScriptTypeEnum from opal_security.models.owner import Owner from opal_security.models.page_info import PageInfo from opal_security.models.paginated_access_rules_list import PaginatedAccessRulesList @@ -139,6 +242,8 @@ from opal_security.models.paginated_bundle_group_list import PaginatedBundleGroupList from opal_security.models.paginated_bundle_list import PaginatedBundleList from opal_security.models.paginated_bundle_resource_list import PaginatedBundleResourceList +from opal_security.models.paginated_campaign_items_list import PaginatedCampaignItemsList +from opal_security.models.paginated_campaigns_list import PaginatedCampaignsList from opal_security.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList from opal_security.models.paginated_delegations_list import PaginatedDelegationsList from opal_security.models.paginated_event_list import PaginatedEventList @@ -146,15 +251,29 @@ from opal_security.models.paginated_groups_list import PaginatedGroupsList from opal_security.models.paginated_owners_list import PaginatedOwnersList from opal_security.models.paginated_remote_users_list import PaginatedRemoteUsersList +from opal_security.models.paginated_request_template_list import PaginatedRequestTemplateList from opal_security.models.paginated_resources_list import PaginatedResourcesList +from opal_security.models.paginated_role_assignments_list import PaginatedRoleAssignmentsList from opal_security.models.paginated_tags_list import PaginatedTagsList from opal_security.models.paginated_tokens_list import PaginatedTokensList from opal_security.models.paginated_uars_list import PaginatedUARsList from opal_security.models.paginated_users_list import PaginatedUsersList +from opal_security.models.paginated_viewer_campaign_items_list import PaginatedViewerCampaignItemsList +from opal_security.models.paladin import Paladin +from opal_security.models.paladin_connector import PaladinConnector +from opal_security.models.paladin_context_source import PaladinContextSource +from opal_security.models.paladin_context_source_kind import PaladinContextSourceKind +from opal_security.models.paladin_context_source_list import PaladinContextSourceList +from opal_security.models.paladin_context_source_provider import PaladinContextSourceProvider +from opal_security.models.paladin_list import PaladinList from opal_security.models.propagation_status import PropagationStatus from opal_security.models.propagation_status_enum import PropagationStatusEnum from opal_security.models.rds_engine_enum import RDSEngineEnum from opal_security.models.remote_user import RemoteUser +from opal_security.models.remove_role_assignment_input import RemoveRoleAssignmentInput +from opal_security.models.remove_role_assignments_entry import RemoveRoleAssignmentsEntry +from opal_security.models.remove_role_assignments_request import RemoveRoleAssignmentsRequest +from opal_security.models.remove_role_assignments_response import RemoveRoleAssignmentsResponse from opal_security.models.request import Request from opal_security.models.request_approval_enum import RequestApprovalEnum from opal_security.models.request_comment import RequestComment @@ -170,15 +289,28 @@ from opal_security.models.request_reviewer_stages import RequestReviewerStages from opal_security.models.request_stage import RequestStage from opal_security.models.request_status_enum import RequestStatusEnum +from opal_security.models.request_template import RequestTemplate +from opal_security.models.request_template_custom_field import RequestTemplateCustomField +from opal_security.models.request_template_custom_field_callout_metadata import RequestTemplateCustomFieldCalloutMetadata +from opal_security.models.request_template_custom_field_input import RequestTemplateCustomFieldInput +from opal_security.models.request_template_custom_field_metadata import RequestTemplateCustomFieldMetadata +from opal_security.models.request_template_custom_field_multi_choice_metadata import RequestTemplateCustomFieldMultiChoiceMetadata from opal_security.models.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum from opal_security.models.requested_item import RequestedItem from opal_security.models.resource import Resource from opal_security.models.resource_access_level import ResourceAccessLevel +from opal_security.models.resource_access_level_list import ResourceAccessLevelList from opal_security.models.resource_access_user import ResourceAccessUser from opal_security.models.resource_access_user_list import ResourceAccessUserList +from opal_security.models.resource_configuration_template import ResourceConfigurationTemplate +from opal_security.models.resource_custom_access_level_list import ResourceCustomAccessLevelList +from opal_security.models.resource_custom_access_level_response import ResourceCustomAccessLevelResponse from opal_security.models.resource_nhi import ResourceNHI from opal_security.models.resource_remote_info import ResourceRemoteInfo +from opal_security.models.resource_remote_info_alicloud_ecs_instance import ResourceRemoteInfoAlicloudEcsInstance +from opal_security.models.resource_remote_info_alicloud_ram_role import ResourceRemoteInfoAlicloudRamRole from opal_security.models.resource_remote_info_anthropic_workspace import ResourceRemoteInfoAnthropicWorkspace +from opal_security.models.resource_remote_info_asana_workspace import ResourceRemoteInfoAsanaWorkspace from opal_security.models.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount from opal_security.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance from opal_security.models.resource_remote_info_aws_eks_cluster import ResourceRemoteInfoAwsEksCluster @@ -187,6 +319,8 @@ from opal_security.models.resource_remote_info_aws_permission_set import ResourceRemoteInfoAwsPermissionSet from opal_security.models.resource_remote_info_aws_rds_cluster import ResourceRemoteInfoAwsRdsCluster from opal_security.models.resource_remote_info_aws_rds_instance import ResourceRemoteInfoAwsRdsInstance +from opal_security.models.resource_remote_info_axiom_custom_role import ResourceRemoteInfoAxiomCustomRole +from opal_security.models.resource_remote_info_axiom_role import ResourceRemoteInfoAxiomRole from opal_security.models.resource_remote_info_azure_enterprise_app import ResourceRemoteInfoAzureEnterpriseApp from opal_security.models.resource_remote_info_azure_entra_id_role import ResourceRemoteInfoAzureEntraIdRole from opal_security.models.resource_remote_info_azure_management_group import ResourceRemoteInfoAzureManagementGroup @@ -200,18 +334,33 @@ from opal_security.models.resource_remote_info_azure_subscription import ResourceRemoteInfoAzureSubscription from opal_security.models.resource_remote_info_azure_user_assigned_managed_identity import ResourceRemoteInfoAzureUserAssignedManagedIdentity from opal_security.models.resource_remote_info_azure_virtual_machine import ResourceRemoteInfoAzureVirtualMachine +from opal_security.models.resource_remote_info_bitwarden_organization import ResourceRemoteInfoBitwardenOrganization +from opal_security.models.resource_remote_info_box_enterprise import ResourceRemoteInfoBoxEnterprise +from opal_security.models.resource_remote_info_box_folder import ResourceRemoteInfoBoxFolder +from opal_security.models.resource_remote_info_calendly_event_type import ResourceRemoteInfoCalendlyEventType +from opal_security.models.resource_remote_info_calendly_role import ResourceRemoteInfoCalendlyRole +from opal_security.models.resource_remote_info_clickhouse_console_role import ResourceRemoteInfoClickhouseConsoleRole from opal_security.models.resource_remote_info_clickhouse_database import ResourceRemoteInfoClickhouseDatabase from opal_security.models.resource_remote_info_clickhouse_table import ResourceRemoteInfoClickhouseTable from opal_security.models.resource_remote_info_coupa_role import ResourceRemoteInfoCoupaRole from opal_security.models.resource_remote_info_cursor_organization import ResourceRemoteInfoCursorOrganization +from opal_security.models.resource_remote_info_cursor_origin_repository import ResourceRemoteInfoCursorOriginRepository from opal_security.models.resource_remote_info_custom_connector import ResourceRemoteInfoCustomConnector from opal_security.models.resource_remote_info_databricks_account_service_principal import ResourceRemoteInfoDatabricksAccountServicePrincipal +from opal_security.models.resource_remote_info_databricks_catalog import ResourceRemoteInfoDatabricksCatalog +from opal_security.models.resource_remote_info_databricks_function import ResourceRemoteInfoDatabricksFunction +from opal_security.models.resource_remote_info_databricks_model import ResourceRemoteInfoDatabricksModel +from opal_security.models.resource_remote_info_databricks_schema import ResourceRemoteInfoDatabricksSchema +from opal_security.models.resource_remote_info_databricks_service import ResourceRemoteInfoDatabricksService +from opal_security.models.resource_remote_info_databricks_volume import ResourceRemoteInfoDatabricksVolume from opal_security.models.resource_remote_info_datadog_role import ResourceRemoteInfoDatadogRole from opal_security.models.resource_remote_info_datastax_astra_role import ResourceRemoteInfoDatastaxAstraRole from opal_security.models.resource_remote_info_devin_organization import ResourceRemoteInfoDevinOrganization from opal_security.models.resource_remote_info_devin_role import ResourceRemoteInfoDevinRole +from opal_security.models.resource_remote_info_docusign_permission_profile import ResourceRemoteInfoDocusignPermissionProfile from opal_security.models.resource_remote_info_gcp_big_query_dataset import ResourceRemoteInfoGcpBigQueryDataset from opal_security.models.resource_remote_info_gcp_big_query_table import ResourceRemoteInfoGcpBigQueryTable +from opal_security.models.resource_remote_info_gcp_billing_account import ResourceRemoteInfoGcpBillingAccount from opal_security.models.resource_remote_info_gcp_bucket import ResourceRemoteInfoGcpBucket from opal_security.models.resource_remote_info_gcp_compute_instance import ResourceRemoteInfoGcpComputeInstance from opal_security.models.resource_remote_info_gcp_folder import ResourceRemoteInfoGcpFolder @@ -231,44 +380,69 @@ from opal_security.models.resource_remote_info_grafana_role import ResourceRemoteInfoGrafanaRole from opal_security.models.resource_remote_info_hubspot_role import ResourceRemoteInfoHubspotRole from opal_security.models.resource_remote_info_ilevel_advanced_role import ResourceRemoteInfoIlevelAdvancedRole +from opal_security.models.resource_remote_info_linear_organization import ResourceRemoteInfoLinearOrganization +from opal_security.models.resource_remote_info_linear_project import ResourceRemoteInfoLinearProject from opal_security.models.resource_remote_info_netsuite_role import ResourceRemoteInfoNetsuiteRole from opal_security.models.resource_remote_info_okta_app import ResourceRemoteInfoOktaApp from opal_security.models.resource_remote_info_okta_custom_role import ResourceRemoteInfoOktaCustomRole from opal_security.models.resource_remote_info_okta_standard_role import ResourceRemoteInfoOktaStandardRole +from opal_security.models.resource_remote_info_onelogin_app import ResourceRemoteInfoOneloginApp from opal_security.models.resource_remote_info_openai_platform_project import ResourceRemoteInfoOpenaiPlatformProject from opal_security.models.resource_remote_info_openai_platform_service_account import ResourceRemoteInfoOpenaiPlatformServiceAccount from opal_security.models.resource_remote_info_oracle_fusion_role import ResourceRemoteInfoOracleFusionRole from opal_security.models.resource_remote_info_pagerduty_role import ResourceRemoteInfoPagerdutyRole +from opal_security.models.resource_remote_info_ramp_fund import ResourceRemoteInfoRampFund +from opal_security.models.resource_remote_info_ramp_role import ResourceRemoteInfoRampRole +from opal_security.models.resource_remote_info_rippling_department import ResourceRemoteInfoRipplingDepartment from opal_security.models.resource_remote_info_salesforce_permission_set import ResourceRemoteInfoSalesforcePermissionSet from opal_security.models.resource_remote_info_salesforce_profile import ResourceRemoteInfoSalesforceProfile from opal_security.models.resource_remote_info_salesforce_role import ResourceRemoteInfoSalesforceRole +from opal_security.models.resource_remote_info_slack_organization import ResourceRemoteInfoSlackOrganization +from opal_security.models.resource_remote_info_slack_workspace import ResourceRemoteInfoSlackWorkspace from opal_security.models.resource_remote_info_snowflake_database import ResourceRemoteInfoSnowflakeDatabase from opal_security.models.resource_remote_info_snowflake_schema import ResourceRemoteInfoSnowflakeSchema from opal_security.models.resource_remote_info_snowflake_table import ResourceRemoteInfoSnowflakeTable from opal_security.models.resource_remote_info_tailscale_ssh import ResourceRemoteInfoTailscaleSsh from opal_security.models.resource_remote_info_teleport_role import ResourceRemoteInfoTeleportRole +from opal_security.models.resource_remote_info_tray_organization import ResourceRemoteInfoTrayOrganization +from opal_security.models.resource_remote_info_tray_workspace import ResourceRemoteInfoTrayWorkspace from opal_security.models.resource_remote_info_twingate_resource import ResourceRemoteInfoTwingateResource +from opal_security.models.resource_remote_info_vercel_project import ResourceRemoteInfoVercelProject +from opal_security.models.resource_remote_info_vercel_role import ResourceRemoteInfoVercelRole from opal_security.models.resource_remote_info_workday_role import ResourceRemoteInfoWorkdayRole +from opal_security.models.resource_remote_info_wrike_user_type import ResourceRemoteInfoWrikeUserType from opal_security.models.resource_remote_info_zendesk_role import ResourceRemoteInfoZendeskRole +from opal_security.models.resource_remote_info_zoom_license import ResourceRemoteInfoZoomLicense +from opal_security.models.resource_remote_info_zoom_role import ResourceRemoteInfoZoomRole from opal_security.models.resource_type_enum import ResourceTypeEnum from opal_security.models.resource_user import ResourceUser from opal_security.models.resource_user_access_status import ResourceUserAccessStatus from opal_security.models.resource_user_access_status_enum import ResourceUserAccessStatusEnum from opal_security.models.resource_with_access_level import ResourceWithAccessLevel +from opal_security.models.review_campaign_item_decision_info import ReviewCampaignItemDecisionInfo +from opal_security.models.review_campaign_items_info import ReviewCampaignItemsInfo +from opal_security.models.review_campaign_items_response import ReviewCampaignItemsResponse from opal_security.models.review_stage_operator import ReviewStageOperator from opal_security.models.reviewer_id_list import ReviewerIDList from opal_security.models.reviewer_stage import ReviewerStage +from opal_security.models.reviewer_stage_escalation import ReviewerStageEscalation from opal_security.models.reviewer_stage_list import ReviewerStageList from opal_security.models.risk_sensitivity_enum import RiskSensitivityEnum +from opal_security.models.role_assignment import RoleAssignment +from opal_security.models.role_assignment_entity_type_enum import RoleAssignmentEntityTypeEnum from opal_security.models.role_permission_name_enum import RolePermissionNameEnum from opal_security.models.role_permission_target_type_enum import RolePermissionTargetTypeEnum from opal_security.models.rule_clauses import RuleClauses from opal_security.models.rule_conjunction import RuleConjunction from opal_security.models.rule_disjunction import RuleDisjunction +from opal_security.models.run_opal_query_request import RunOpalQueryRequest from opal_security.models.scoped_role_permission import ScopedRolePermission from opal_security.models.scoped_role_permission_list import ScopedRolePermissionList from opal_security.models.session import Session from opal_security.models.sessions_list import SessionsList +from opal_security.models.set_agent_kill_switch_request import SetAgentKillSwitchRequest +from opal_security.models.sort_direction_enum import SortDirectionEnum +from opal_security.models.stop_campaign_request import StopCampaignRequest from opal_security.models.string_match_type import StringMatchType from opal_security.models.sub_event import SubEvent from opal_security.models.sync_error import SyncError @@ -286,7 +460,13 @@ from opal_security.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum from opal_security.models.uar_scope import UARScope from opal_security.models.update_access_rule_info import UpdateAccessRuleInfo +from opal_security.models.update_app_info import UpdateAppInfo +from opal_security.models.update_campaign_configuration_info import UpdateCampaignConfigurationInfo +from opal_security.models.update_campaign_info import UpdateCampaignInfo +from opal_security.models.update_campaign_item_reviewers_info import UpdateCampaignItemReviewersInfo +from opal_security.models.update_campaign_item_reviewers_result import UpdateCampaignItemReviewersResult from opal_security.models.update_configuration_template_info import UpdateConfigurationTemplateInfo +from opal_security.models.update_custom_connector_info import UpdateCustomConnectorInfo from opal_security.models.update_event_stream_info import UpdateEventStreamInfo from opal_security.models.update_group_binding_info import UpdateGroupBindingInfo from opal_security.models.update_group_binding_info_list import UpdateGroupBindingInfoList @@ -296,16 +476,30 @@ from opal_security.models.update_group_user_request import UpdateGroupUserRequest from opal_security.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest from opal_security.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner +from opal_security.models.update_opal_script_info import UpdateOpalScriptInfo from opal_security.models.update_owner_info import UpdateOwnerInfo from opal_security.models.update_owner_info_list import UpdateOwnerInfoList +from opal_security.models.update_paladin_info import UpdatePaladinInfo +from opal_security.models.update_request_template_info import UpdateRequestTemplateInfo +from opal_security.models.update_resource_custom_access_level_info import UpdateResourceCustomAccessLevelInfo from opal_security.models.update_resource_info import UpdateResourceInfo from opal_security.models.update_resource_info_list import UpdateResourceInfoList from opal_security.models.update_resource_user_request import UpdateResourceUserRequest +from opal_security.models.update_user_info import UpdateUserInfo from opal_security.models.user import User +from opal_security.models.user_access import UserAccess +from opal_security.models.user_access_entity_type_enum import UserAccessEntityTypeEnum +from opal_security.models.user_access_level import UserAccessLevel +from opal_security.models.user_access_list import UserAccessList from opal_security.models.user_attribute_selector import UserAttributeSelector from opal_security.models.user_hr_idp_status_enum import UserHrIdpStatusEnum from opal_security.models.user_id_list import UserIDList from opal_security.models.user_list import UserList +from opal_security.models.user_product_role_enum import UserProductRoleEnum +from opal_security.models.viewer_campaign_item import ViewerCampaignItem +from opal_security.models.viewer_campaign_item_review_decision_enum import ViewerCampaignItemReviewDecisionEnum +from opal_security.models.viewer_campaign_item_sort_field_enum import ViewerCampaignItemSortFieldEnum +from opal_security.models.viewer_campaign_item_status_enum import ViewerCampaignItemStatusEnum from opal_security.models.visibility_info import VisibilityInfo from opal_security.models.visibility_type_enum import VisibilityTypeEnum from opal_security.models.webhook_api_key_credential import WebhookApiKeyCredential diff --git a/opal_security/models/access_entity_filters.py b/opal_security/models/access_entity_filters.py index 95f78e5..f7c3569 100644 --- a/opal_security/models/access_entity_filters.py +++ b/opal_security/models/access_entity_filters.py @@ -21,9 +21,13 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from uuid import UUID +from opal_security.models.entity_admin_filter import EntityAdminFilter +from opal_security.models.entity_description_filter import EntityDescriptionFilter from opal_security.models.entity_item_type_enum import EntityItemTypeEnum from opal_security.models.entity_name_filter import EntityNameFilter from opal_security.models.entity_tag_filter import EntityTagFilter +from opal_security.models.entity_tag_key_filter import EntityTagKeyFilter +from opal_security.models.idp_status_filter import IdpStatusFilter from typing import Optional, Set from typing_extensions import Self @@ -34,7 +38,11 @@ class AccessEntityFilters(BaseModel): entity_types: Optional[List[StrictStr]] = Field(default=None, description="Filter by entity type. Only RESOURCE, GROUP, and USER are queryable via OpalQuery.", alias="entityTypes") entity_item_types: Optional[List[EntityItemTypeEnum]] = Field(default=None, description="Filter by entity item types.", alias="entityItemTypes") entity_name: Optional[EntityNameFilter] = Field(default=None, alias="entityName") + entity_description: Optional[EntityDescriptionFilter] = Field(default=None, alias="entityDescription") entity_tag: Optional[EntityTagFilter] = Field(default=None, alias="entityTag") + entity_tag_key: Optional[EntityTagKeyFilter] = Field(default=None, alias="entityTagKey") + hr_idp_status: Optional[IdpStatusFilter] = Field(default=None, alias="hrIdpStatus") + entity_admin_owner: Optional[EntityAdminFilter] = Field(default=None, alias="entityAdminOwner") entity_ids: Optional[List[UUID]] = Field(default=None, description="Filter by specific entity UUIDs.", alias="entityIDs") imported_from_app: Optional[List[UUID]] = Field(default=None, description="Filter by app IDs from which returned nodes will be imported from.", alias="importedFromApp") role_remote_ids: Optional[List[StrictStr]] = Field(default=None, description="Filter by role remote IDs. Can only be applied within a hasAccessTo clause.", alias="roleRemoteIds") @@ -43,7 +51,7 @@ class AccessEntityFilters(BaseModel): any_of: Optional[List[AccessEntityFilters]] = Field(default=None, description="A list of nested filters where at least one must match (logical OR). Each item has the same shape as this object. ", alias="anyOf") var_not: Optional[Dict[str, Any]] = Field(default=None, description="Excludes entities matching the embedded filter (logical NOT). Pass a filter object with the same shape as this one — typically a single scalar field, like `{not: {entityTypes: [\"RESOURCE\"]}}` to exclude resources. ", alias="not") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["entityTypes", "entityItemTypes", "entityName", "entityTag", "entityIDs", "importedFromApp", "roleRemoteIds", "roleNames", "allOf", "anyOf", "not"] + __properties: ClassVar[List[str]] = ["entityTypes", "entityItemTypes", "entityName", "entityDescription", "entityTag", "entityTagKey", "hrIdpStatus", "entityAdminOwner", "entityIDs", "importedFromApp", "roleRemoteIds", "roleNames", "allOf", "anyOf", "not"] @field_validator('entity_types') def entity_types_validate_enum(cls, value): @@ -100,9 +108,21 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of entity_name if self.entity_name: _dict['entityName'] = self.entity_name.to_dict() + # override the default output from pydantic by calling `to_dict()` of entity_description + if self.entity_description: + _dict['entityDescription'] = self.entity_description.to_dict() # override the default output from pydantic by calling `to_dict()` of entity_tag if self.entity_tag: _dict['entityTag'] = self.entity_tag.to_dict() + # override the default output from pydantic by calling `to_dict()` of entity_tag_key + if self.entity_tag_key: + _dict['entityTagKey'] = self.entity_tag_key.to_dict() + # override the default output from pydantic by calling `to_dict()` of hr_idp_status + if self.hr_idp_status: + _dict['hrIdpStatus'] = self.hr_idp_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of entity_admin_owner + if self.entity_admin_owner: + _dict['entityAdminOwner'] = self.entity_admin_owner.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in all_of (list) _items = [] if self.all_of: @@ -137,7 +157,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "entityTypes": obj.get("entityTypes"), "entityItemTypes": obj.get("entityItemTypes"), "entityName": EntityNameFilter.from_dict(obj["entityName"]) if obj.get("entityName") is not None else None, + "entityDescription": EntityDescriptionFilter.from_dict(obj["entityDescription"]) if obj.get("entityDescription") is not None else None, "entityTag": EntityTagFilter.from_dict(obj["entityTag"]) if obj.get("entityTag") is not None else None, + "entityTagKey": EntityTagKeyFilter.from_dict(obj["entityTagKey"]) if obj.get("entityTagKey") is not None else None, + "hrIdpStatus": IdpStatusFilter.from_dict(obj["hrIdpStatus"]) if obj.get("hrIdpStatus") is not None else None, + "entityAdminOwner": EntityAdminFilter.from_dict(obj["entityAdminOwner"]) if obj.get("entityAdminOwner") is not None else None, "entityIDs": obj.get("entityIDs"), "importedFromApp": obj.get("importedFromApp"), "roleRemoteIds": obj.get("roleRemoteIds"), diff --git a/opal_security/models/access_rule.py b/opal_security/models/access_rule.py index 6be2da2..96a4c84 100644 --- a/opal_security/models/access_rule.py +++ b/opal_security/models/access_rule.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional from uuid import UUID from opal_security.models.rule_clauses import RuleClauses from typing import Optional, Set @@ -35,8 +35,9 @@ class AccessRule(BaseModel): admin_owner_id: UUID = Field(description="The ID of the owner of the group.") status: StrictStr = Field(description="The status of the access rule.") rule_clauses: RuleClauses = Field(alias="ruleClauses") + uses_opal_query: Optional[StrictBool] = Field(default=None, description="True when the access rule uses an Opal Query, which the API can't describe yet. Its `ruleClauses` are then empty; view the rule in Opal.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["access_rule_id", "name", "description", "admin_owner_id", "status", "ruleClauses"] + __properties: ClassVar[List[str]] = ["access_rule_id", "name", "description", "admin_owner_id", "status", "ruleClauses", "uses_opal_query"] @field_validator('status') def status_validate_enum(cls, value): @@ -111,7 +112,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "description": obj.get("description"), "admin_owner_id": obj.get("admin_owner_id"), "status": obj.get("status"), - "ruleClauses": RuleClauses.from_dict(obj["ruleClauses"]) if obj.get("ruleClauses") is not None else None + "ruleClauses": RuleClauses.from_dict(obj["ruleClauses"]) if obj.get("ruleClauses") is not None else None, + "uses_opal_query": obj.get("uses_opal_query") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal_security/models/add_group_resource_request.py b/opal_security/models/add_group_resource_request.py index 77dfb0c..a5a69c2 100644 --- a/opal_security/models/add_group_resource_request.py +++ b/opal_security/models/add_group_resource_request.py @@ -29,7 +29,7 @@ class AddGroupResourceRequest(BaseModel): AddGroupResourceRequest """ # noqa: E501 access_level_remote_id: Optional[StrictStr] = Field(default=None, description="The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used.") - duration_minutes: Optional[Annotated[int, Field(le=525960, strict=True, ge=0)]] = Field(default=None, description="The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.") + duration_minutes: Optional[Annotated[int, Field(le=153722867, strict=True, ge=0)]] = Field(default=None, description="The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["access_level_remote_id", "duration_minutes"] diff --git a/opal_security/models/add_resource_nhi_request.py b/opal_security/models/add_resource_nhi_request.py index 2a1b55b..b71dede 100644 --- a/opal_security/models/add_resource_nhi_request.py +++ b/opal_security/models/add_resource_nhi_request.py @@ -28,7 +28,7 @@ class AddResourceNhiRequest(BaseModel): """ AddResourceNhiRequest """ # noqa: E501 - duration_minutes: Annotated[int, Field(le=525960, strict=True)] = Field(description="The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.") + duration_minutes: Annotated[int, Field(le=153722867, strict=True)] = Field(description="The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.") access_level_remote_id: Optional[StrictStr] = Field(default=None, description="The remote ID of the access level to grant. If omitted, the default access level remote ID value (empty string) is used.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["duration_minutes", "access_level_remote_id"] diff --git a/opal_security/models/add_resource_user_request.py b/opal_security/models/add_resource_user_request.py index 0d395c4..7004c90 100644 --- a/opal_security/models/add_resource_user_request.py +++ b/opal_security/models/add_resource_user_request.py @@ -28,7 +28,7 @@ class AddResourceUserRequest(BaseModel): """ AddResourceUserRequest """ # noqa: E501 - duration_minutes: Annotated[int, Field(le=525960, strict=True)] = Field(description="The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.") + duration_minutes: Annotated[int, Field(le=153722867, strict=True)] = Field(description="The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.") access_level_remote_id: Optional[StrictStr] = Field(default=None, description="The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["duration_minutes", "access_level_remote_id"] diff --git a/opal_security/models/add_role_assignment_input.py b/opal_security/models/add_role_assignment_input.py new file mode 100644 index 0000000..c63dd14 --- /dev/null +++ b/opal_security/models/add_role_assignment_input.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from uuid import UUID +from opal_security.models.entity_type_enum import EntityTypeEnum +from typing import Optional, Set +from typing_extensions import Self + +class AddRoleAssignmentInput(BaseModel): + """ + A single role assignment to create in a batch add request. + """ # noqa: E501 + entity_id: UUID = Field(description="The ID of the entity (resource or group) being accessed.") + entity_type: EntityTypeEnum = Field(description="The type of the entity being accessed. Must be `RESOURCE` or `GROUP`.") + principal_id: UUID = Field(description="The ID of the principal (user, group, or resource) being granted access.") + principal_type: EntityTypeEnum = Field(description="The type of the principal being granted access. Must be `RESOURCE`, `GROUP`, or `USER`.") + access_level_remote_id: Optional[StrictStr] = Field(default=None, description="Remote ID of the access level to grant. Omit for entities that only have a single default access level.") + duration_minutes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Duration of the grant in minutes. Omit or send `0` for an indefinite grant.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["entity_id", "entity_type", "principal_id", "principal_type", "access_level_remote_id", "duration_minutes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddRoleAssignmentInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddRoleAssignmentInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "entity_id": obj.get("entity_id"), + "entity_type": obj.get("entity_type"), + "principal_id": obj.get("principal_id"), + "principal_type": obj.get("principal_type"), + "access_level_remote_id": obj.get("access_level_remote_id"), + "duration_minutes": obj.get("duration_minutes") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/add_role_assignments_entry.py b/opal_security/models/add_role_assignments_entry.py new file mode 100644 index 0000000..676f271 --- /dev/null +++ b/opal_security/models/add_role_assignments_entry.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from opal_security.models.role_assignment import RoleAssignment +from typing import Optional, Set +from typing_extensions import Self + +class AddRoleAssignmentsEntry(BaseModel): + """ + A single entry in the result of `POST /role-assignments`. + """ # noqa: E501 + role_assignment: RoleAssignment + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["role_assignment"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddRoleAssignmentsEntry from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of role_assignment + if self.role_assignment: + _dict['role_assignment'] = self.role_assignment.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddRoleAssignmentsEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "role_assignment": RoleAssignment.from_dict(obj["role_assignment"]) if obj.get("role_assignment") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/add_role_assignments_request.py b/opal_security/models/add_role_assignments_request.py new file mode 100644 index 0000000..a209cb7 --- /dev/null +++ b/opal_security/models/add_role_assignments_request.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from opal_security.models.add_role_assignment_input import AddRoleAssignmentInput +from typing import Optional, Set +from typing_extensions import Self + +class AddRoleAssignmentsRequest(BaseModel): + """ + Request body for `POST /role-assignments`. + """ # noqa: E501 + role_assignments: Annotated[List[AddRoleAssignmentInput], Field(min_length=1, max_length=100)] = Field(description="The list of role assignments to add.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["role_assignments"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddRoleAssignmentsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in role_assignments (list) + _items = [] + if self.role_assignments: + for _item_role_assignments in self.role_assignments: + if _item_role_assignments: + _items.append(_item_role_assignments.to_dict()) + _dict['role_assignments'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddRoleAssignmentsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "role_assignments": [AddRoleAssignmentInput.from_dict(_item) for _item in obj["role_assignments"]] if obj.get("role_assignments") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/add_role_assignments_response.py b/opal_security/models/add_role_assignments_response.py new file mode 100644 index 0000000..7a9eb66 --- /dev/null +++ b/opal_security/models/add_role_assignments_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from opal_security.models.add_role_assignments_entry import AddRoleAssignmentsEntry +from typing import Optional, Set +from typing_extensions import Self + +class AddRoleAssignmentsResponse(BaseModel): + """ + Response body for `POST /role-assignments`. + """ # noqa: E501 + task_ids: List[StrictStr] = Field(description="Opaque IDs of push tasks enqueued to propagate the new assignments to end systems. Each ID is a base64-encoded, URL-safe string that mirrors the identifier returned by the GraphQL `addRoleAssignments` mutation.") + entries: List[AddRoleAssignmentsEntry] = Field(description="One entry per role assignment created, in request order.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["task_ids", "entries"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddRoleAssignmentsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in entries (list) + _items = [] + if self.entries: + for _item_entries in self.entries: + if _item_entries: + _items.append(_item_entries.to_dict()) + _dict['entries'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddRoleAssignmentsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "task_ids": obj.get("task_ids"), + "entries": [AddRoleAssignmentsEntry.from_dict(_item) for _item in obj["entries"]] if obj.get("entries") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/agent_activity_client_setting.py b/opal_security/models/agent_activity_client_setting.py new file mode 100644 index 0000000..abe3b18 --- /dev/null +++ b/opal_security/models/agent_activity_client_setting.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AgentActivityClientSetting(BaseModel): + """ + # AgentActivityClientSetting Object ### Description What the organization chose for one client that runs the hook. + """ # noqa: E501 + reports_tool_calls: StrictBool = Field(description="Whether the client reports tool calls. When false its hook sends nothing and lets every tool call run, and Opal stores nothing the client still sends.") + conversation_content: Optional[StrictStr] = Field(default=None, description="Who decides whether the client's conversation content (prompts, what each tool returned, the model's replies) is sent and stored. `always` sends it from every machine; `never` sends none, even from a machine installed with --content, and Opal stores none; `person_decides` leaves it to whether the machine was installed with --content. Absent for a client whose hook sends no conversation content (codex).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["reports_tool_calls", "conversation_content"] + + @field_validator('conversation_content') + def conversation_content_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['always', 'never', 'person_decides']): + raise ValueError("must be one of enum values ('always', 'never', 'person_decides')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentActivityClientSetting from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentActivityClientSetting from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reports_tool_calls": obj.get("reports_tool_calls"), + "conversation_content": obj.get("conversation_content") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/agent_activity_client_settings.py b/opal_security/models/agent_activity_client_settings.py new file mode 100644 index 0000000..f278411 --- /dev/null +++ b/opal_security/models/agent_activity_client_settings.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from opal_security.models.agent_activity_client_setting import AgentActivityClientSetting +from typing import Optional, Set +from typing_extensions import Self + +class AgentActivityClientSettings(BaseModel): + """ + # AgentActivityClientSettings Object ### Description How a client should send batched agent activity for this organization. + """ # noqa: E501 + batch_wait_seconds: Union[StrictFloat, StrictInt] = Field(description="The minimum gap between two sends from one machine. Send at once when the last send was at least this long ago; otherwise wait until this long after the last send, and send what arrived meanwhile as one request. Between 0 and 300.") + max_events_per_request: StrictInt = Field(description="The most events one request to `/agent-activity` may carry.") + max_bytes_per_request: StrictInt = Field(description="The largest body, in bytes, `/agent-activity` accepts for a request with more than one event. A request with one event may be up to 1 MiB.") + max_requests_per_second: Union[StrictFloat, StrictInt] = Field(description="The rate of batched requests one client should stay under. Can be below 1.") + burst_requests: StrictInt = Field(description="How many batched requests a client may send at once before the rate applies. At least 1.") + cache_seconds: StrictInt = Field(description="How long these settings may be kept before asking again.") + clients: Dict[str, AgentActivityClientSetting] = Field(description="What the organization chose on the Setup tab for each client that runs the hook, keyed by client (claude_code, codex, cursor). A client that is not listed keeps the defaults.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["batch_wait_seconds", "max_events_per_request", "max_bytes_per_request", "max_requests_per_second", "burst_requests", "cache_seconds", "clients"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentActivityClientSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each value in clients (dict) + _field_dict = {} + if self.clients: + for _key_clients in self.clients: + if self.clients[_key_clients]: + _field_dict[_key_clients] = self.clients[_key_clients].to_dict() + _dict['clients'] = _field_dict + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentActivityClientSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "batch_wait_seconds": obj.get("batch_wait_seconds"), + "max_events_per_request": obj.get("max_events_per_request"), + "max_bytes_per_request": obj.get("max_bytes_per_request"), + "max_requests_per_second": obj.get("max_requests_per_second"), + "burst_requests": obj.get("burst_requests"), + "cache_seconds": obj.get("cache_seconds"), + "clients": dict( + (_k, AgentActivityClientSetting.from_dict(_v)) + for _k, _v in obj["clients"].items() + ) + if obj.get("clients") is not None + else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/agent_activity_content_report.py b/opal_security/models/agent_activity_content_report.py new file mode 100644 index 0000000..bb580d6 --- /dev/null +++ b/opal_security/models/agent_activity_content_report.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.agent_activity_images import AgentActivityImages +from typing import Optional, Set +from typing_extensions import Self + +class AgentActivityContentReport(BaseModel): + """ + # AgentActivityContentReport Object ### Description What Opal's hook kit adds to an event when it collects conversation content. Its presence means the sender collects content, like the `X-Opal-Content` header. The kit has already masked secrets in the texts and cut them to its own limit. + """ # noqa: E501 + assistant_text: Optional[StrictStr] = Field(default=None, description="Every text the model wrote in the turn, read from the session's transcript (`Stop`, `SubagentStop`). Preferred over `last_assistant_message`, which holds only the final message.") + thinking: Optional[StrictStr] = Field(default=None, description="The model's thinking in the turn, when the transcript holds it as plain text.") + images: Optional[AgentActivityImages] = None + truncated: Optional[Dict[str, StrictInt]] = Field(default=None, description="The fields the kit cut (`prompt`, `tool_response`, `assistant_text`, `last_assistant_message`, `thinking`), each with its size in bytes before the cut. A prompt or a tool result keeps its start; a turn's text and thinking keep their end. Sizes are stored up to 2147483647.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["assistant_text", "thinking", "images", "truncated"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentActivityContentReport from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of images + if self.images: + _dict['images'] = self.images.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentActivityContentReport from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assistant_text": obj.get("assistant_text"), + "thinking": obj.get("thinking"), + "images": AgentActivityImages.from_dict(obj["images"]) if obj.get("images") is not None else None, + "truncated": obj.get("truncated") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/agent_activity_event.py b/opal_security/models/agent_activity_event.py new file mode 100644 index 0000000..5f5335c --- /dev/null +++ b/opal_security/models/agent_activity_event.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.agent_activity_content_report import AgentActivityContentReport +from opal_security.models.agent_activity_mcp_server import AgentActivityMcpServer +from opal_security.models.agent_activity_opal_mcp_server import AgentActivityOpalMcpServer +from opal_security.models.agent_activity_opal_reported import AgentActivityOpalReported +from typing import Optional, Set +from typing_extensions import Self + +class AgentActivityEvent(BaseModel): + """ + # AgentActivityEvent Object ### Description One activity event reported by an agent runtime: a Claude Code or Codex hook payload, or a Cursor hook payload the Opal kit rewrote into the same shape, posted either by the hook itself or by a relay that batches them. Only the fields below are read; everything else in the payload is parsed and **discarded**, never persisted. That includes `transcript_path` / `scratchpad_dir` (absolute paths on an employee's own laptop, which Opal cannot govern and should not be accumulating). `prompt`, `tool_response` and `last_assistant_message` (the conversation content) are stored only when the sender collects them (`opal_content` on the event, or the `X-Opal-Content` header) and the organization stores content. Secrets in the shapes Opal recognizes are masked and each text is cut to the organization's limit before it is written. Otherwise they are discarded too. `tool_input` IS now read and stored. It was previously discarded pending a data-handling decision; that decision has since been made, and without arguments no policy can name what a call acted on - a rule about a file path, a command family or a web domain refers to something that exists only inside `tool_input`. + """ # noqa: E501 + hook_event_name: StrictStr = Field(description="Which hook fired, e.g. `PostToolUse`, `PreToolUse`, `PermissionDenied`. Required; an event with no name cannot be interpreted and is rejected.") + tool_input: Optional[Dict[str, Any]] = Field(default=None, description="The call's arguments, as the runtime sent them. Server-defined for an MCP tool; a fixed shape per built-in (`command` for Bash, `file_path` for Edit, `url` for WebFetch). Stored as sent, and separately reduced to a normalized target the activity feed and policy can match on. The stored copy is the record of fact; the derived target is recomputed whenever the extractor improves. Capped before storage. A capped payload is no longer valid JSON, so the row records that it was capped rather than leaving each reader to discover it by failing to parse. A value that is not an object (Codex sends a string when a model's function arguments are not valid JSON) is stored as `{\"raw\": }` rather than rejected.") + session_id: Optional[StrictStr] = Field(default=None, description="The agent session this event belongs to. Opaque to Opal.") + prompt_id: Optional[StrictStr] = Field(default=None, description="Groups every tool call made under one user instruction, so a run can be read back as the instruction that caused it rather than as unrelated rows.") + turn_id: Optional[StrictStr] = Field(default=None, description="Codex's id for one user turn. Codex sends no `prompt_id`, so for a Codex event this is stored as the prompt id. Together with `model`, and with no `prompt_id`, it also marks an event as coming from Codex when `opal_reported.client` is absent.") + model: Optional[StrictStr] = Field(default=None, description="The model the runtime was using, as Codex reports it. Read only to tell Codex from Claude Code; not stored.") + cursor_version: Optional[StrictStr] = Field(default=None, description="The Cursor version, which Cursor adds to every hook input. Read only to mark an event as coming from Cursor when `opal_reported.client` is absent; not stored. A Cursor tool-call event named `preToolUse`, `postToolUse` or `postToolUseFailure` is stored under the Claude Code name for the same event.") + agent_id: Optional[StrictStr] = Field(default=None, description="Set only when the call came from an autonomous subagent rather than the session a person is typing into. Stored as `subagent_id` - Opal's own `agent_id` already means something else.") + agent_type: Optional[StrictStr] = Field(default=None, description="The subagent's type, e.g. `general-purpose`. Set alongside `agent_id`.") + permission_mode: Optional[StrictStr] = Field(default=None, description="The session's permission mode, e.g. `default`, `acceptEdits`, `bypassPermissions`. A session running `bypassPermissions` had no approval gate in front of any tool call it made.") + actor_email: Optional[StrictStr] = Field(default=None, description="The identity the sender reports for this specific event. **Unverified**, the same as `X-Opal-Actor`, and used only when neither the API key nor that header identified a developer. An `http` hook cannot populate this; a `command`-type hook or a relay can (`$USER`, a hostname, `git config user.email`), which is why it is per-event rather than per-request - a relay can batch several developers.") + opal_reported: Optional[AgentActivityOpalReported] = None + duration_ms: Optional[Any] = None + transcript_path: Optional[StrictStr] = Field(default=None, description="Read at ingest **only** to parse an operating-system username out of, as the last-resort attribution step, and then discarded. The path itself is never stored: it is an absolute path on an employee's laptop and Opal has no business accumulating those.") + tool_name: Optional[StrictStr] = Field(default=None, description="The tool invoked, for tool-scoped events. Empty for session-level events. An MCP tool is named `mcp____`. The whole string is stored as sent, and the server and the tool are also stored in their own fields (see `mcp_server`).") + mcp_server: Optional[AgentActivityMcpServer] = None + opal_mcp_server: Optional[AgentActivityOpalMcpServer] = None + tool_use_id: Optional[StrictStr] = Field(default=None, description="The tool invocation's id, used together with `hook_event_name` to deduplicate a retried delivery. Absent on events that carry none, which are stored at-least-once unless they are a prompt or the end of a turn with `session_id` and `prompt_id`, or carry `opal_event_id`.") + opal_event_id: Optional[StrictStr] = Field(default=None, description="An id Opal's hook kit gives each event it holds for sending, so that a retried delivery of an event without a `tool_use_id` (a prompt, the end of a turn) is stored once. Used only for an event that has no `tool_use_id` and is not a tool-call event, and only when it is 8 to 64 letters, digits and dashes; otherwise ignored.") + cwd: Optional[StrictStr] = Field(default=None, description="The working directory the agent was operating in.") + timestamp: Optional[datetime] = Field(default=None, description="When the client says the event occurred (RFC 3339). Clamped server-side to a window around receipt, because a client-controlled sort key is otherwise a way to pin rows to the top of every list. Defaults to receipt time when absent or unparseable.") + prompt: Optional[Any] = None + tool_response: Optional[Any] = None + last_assistant_message: Optional[Any] = None + opal_content: Optional[AgentActivityContentReport] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["hook_event_name", "tool_input", "session_id", "prompt_id", "turn_id", "model", "cursor_version", "agent_id", "agent_type", "permission_mode", "actor_email", "opal_reported", "duration_ms", "transcript_path", "tool_name", "mcp_server", "opal_mcp_server", "tool_use_id", "opal_event_id", "cwd", "timestamp", "prompt", "tool_response", "last_assistant_message", "opal_content"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentActivityEvent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of opal_reported + if self.opal_reported: + _dict['opal_reported'] = self.opal_reported.to_dict() + # override the default output from pydantic by calling `to_dict()` of mcp_server + if self.mcp_server: + _dict['mcp_server'] = self.mcp_server.to_dict() + # override the default output from pydantic by calling `to_dict()` of opal_mcp_server + if self.opal_mcp_server: + _dict['opal_mcp_server'] = self.opal_mcp_server.to_dict() + # override the default output from pydantic by calling `to_dict()` of opal_content + if self.opal_content: + _dict['opal_content'] = self.opal_content.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if duration_ms (nullable) is None + # and model_fields_set contains the field + if self.duration_ms is None and "duration_ms" in self.model_fields_set: + _dict['duration_ms'] = None + + # set to None if prompt (nullable) is None + # and model_fields_set contains the field + if self.prompt is None and "prompt" in self.model_fields_set: + _dict['prompt'] = None + + # set to None if tool_response (nullable) is None + # and model_fields_set contains the field + if self.tool_response is None and "tool_response" in self.model_fields_set: + _dict['tool_response'] = None + + # set to None if last_assistant_message (nullable) is None + # and model_fields_set contains the field + if self.last_assistant_message is None and "last_assistant_message" in self.model_fields_set: + _dict['last_assistant_message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentActivityEvent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hook_event_name": obj.get("hook_event_name"), + "tool_input": obj.get("tool_input"), + "session_id": obj.get("session_id"), + "prompt_id": obj.get("prompt_id"), + "turn_id": obj.get("turn_id"), + "model": obj.get("model"), + "cursor_version": obj.get("cursor_version"), + "agent_id": obj.get("agent_id"), + "agent_type": obj.get("agent_type"), + "permission_mode": obj.get("permission_mode"), + "actor_email": obj.get("actor_email"), + "opal_reported": AgentActivityOpalReported.from_dict(obj["opal_reported"]) if obj.get("opal_reported") is not None else None, + "duration_ms": obj.get("duration_ms"), + "transcript_path": obj.get("transcript_path"), + "tool_name": obj.get("tool_name"), + "mcp_server": AgentActivityMcpServer.from_dict(obj["mcp_server"]) if obj.get("mcp_server") is not None else None, + "opal_mcp_server": AgentActivityOpalMcpServer.from_dict(obj["opal_mcp_server"]) if obj.get("opal_mcp_server") is not None else None, + "tool_use_id": obj.get("tool_use_id"), + "opal_event_id": obj.get("opal_event_id"), + "cwd": obj.get("cwd"), + "timestamp": obj.get("timestamp"), + "prompt": obj.get("prompt"), + "tool_response": obj.get("tool_response"), + "last_assistant_message": obj.get("last_assistant_message"), + "opal_content": AgentActivityContentReport.from_dict(obj["opal_content"]) if obj.get("opal_content") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/agent_activity_images.py b/opal_security/models/agent_activity_images.py new file mode 100644 index 0000000..e6b44ce --- /dev/null +++ b/opal_security/models/agent_activity_images.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AgentActivityImages(BaseModel): + """ + # AgentActivityImages Object ### Description The images attached to a prompt or returned by a tool. Only their number and size are sent; the images themselves are not. + """ # noqa: E501 + count: Optional[StrictInt] = None + bytes: Optional[StrictInt] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["count", "bytes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentActivityImages from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentActivityImages from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "count": obj.get("count"), + "bytes": obj.get("bytes") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/agent_activity_ingest_request.py b/opal_security/models/agent_activity_ingest_request.py new file mode 100644 index 0000000..c3a2268 --- /dev/null +++ b/opal_security/models/agent_activity_ingest_request.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.agent_activity_event import AgentActivityEvent +from typing import Optional, Set +from typing_extensions import Self + +class AgentActivityIngestRequest(BaseModel): + """ + # AgentActivityIngestRequest Object ### Description A batch of agent activity events. Three body shapes are accepted: this envelope (`{\"events\": [...]}`), a bare JSON array of `AgentActivityEvent`, and a single `AgentActivityEvent` object. The last exists so a Claude Code hook can POST here directly, since a hook sends one bare payload per event and cannot wrap it. + """ # noqa: E501 + events: Optional[List[AgentActivityEvent]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["events"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentActivityIngestRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in events (list) + _items = [] + if self.events: + for _item_events in self.events: + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentActivityIngestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "events": [AgentActivityEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/agent_activity_ingest_result.py b/opal_security/models/agent_activity_ingest_result.py new file mode 100644 index 0000000..a48ffbd --- /dev/null +++ b/opal_security/models/agent_activity_ingest_result.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentActivityIngestResult(BaseModel): + """ + # AgentActivityIngestResult Object ### Description What one ingest request actually did. `received` and `stored` differ when a delivery was retried and deduplicated. `attributed` and `unattributed` sum to `received` rather than to `stored`, because attribution happens before deduplication. Unattributed events are kept, not dropped: activity Opal cannot tie to a governed agent is itself a governance finding. + """ # noqa: E501 + received: StrictInt = Field(description="Events parsed out of the request body.") + stored: StrictInt = Field(description="Rows actually written. Lower than `received` when a retried delivery was deduplicated on `tool_use_id`.") + attributed: StrictInt = Field(description="Events that resolved to an agent in this organization.") + unattributed: StrictInt = Field(description="Events that resolved to no agent, and are therefore visible only in the unattributed activity list. A persistently high value means the reporting clients are not sending an identity Opal can resolve.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["received", "stored", "attributed", "unattributed"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentActivityIngestResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentActivityIngestResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "received": obj.get("received"), + "stored": obj.get("stored"), + "attributed": obj.get("attributed"), + "unattributed": obj.get("unattributed") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/agent_activity_mcp_server.py b/opal_security/models/agent_activity_mcp_server.py new file mode 100644 index 0000000..1ba55d6 --- /dev/null +++ b/opal_security/models/agent_activity_mcp_server.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AgentActivityMcpServer(BaseModel): + """ + # AgentActivityMcpServer Object ### Description The MCP server behind a tool call, as Claude Code reports it. Claude Code v2.1.274 and later adds this object to the hook input of an MCP tool call; an older client does not send it, and it is never present for a built-in tool such as `Bash`. When `name` is present it is stored as the call's server. When this object is absent, the server is read from `tool_name` instead: the part after the `mcp__` prefix and before the next `__`. The tool is always read from `tool_name`. `name` is stored as the call's server. `source` says where the server's definition came from (`plugin`, `sdk`, or a configuration scope such as `user` or `project`) and is stored as sent, cut to 64 characters. Neither field is an identity: `name` is whatever the user called the server in their own configuration, and `source` is what the machine said. + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The server's name.") + source: Optional[StrictStr] = Field(default=None, description="Where the server's definition came from, such as `plugin`, `sdk`, `user` or `project`. Stored as sent, cut to 64 characters.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "source"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentActivityMcpServer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentActivityMcpServer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "source": obj.get("source") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/agent_activity_opal_mcp_server.py b/opal_security/models/agent_activity_opal_mcp_server.py new file mode 100644 index 0000000..e24df6a --- /dev/null +++ b/opal_security/models/agent_activity_opal_mcp_server.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AgentActivityOpalMcpServer(BaseModel): + """ + # AgentActivityOpalMcpServer Object ### Description Where the MCP server behind a tool call connects, as the Opal hook kit read it from the developer's own Claude Code configuration. Claude Code's hook payload names the server but not where it connects, so the kit adds this for an `mcp____` call when it finds the server in the configuration. Opal uses it to identify the server in the organization's MCP server registry: by its URL, or by the hash of its command. The URL is stored without its query, fragment or user name and password. + """ # noqa: E501 + url: Optional[StrictStr] = Field(default=None, description="The server's URL, for an `http` or `sse` server.") + transport: Optional[StrictStr] = Field(default=None, description="`http`, `sse` or `stdio`.") + command_hash: Optional[StrictStr] = Field(default=None, description="For a `stdio` server, a SHA-256 of its command's shape, in hex. Arguments that can hold a secret are replaced before hashing, and the command itself is never sent.") + scope: Optional[StrictStr] = Field(default=None, description="The configuration the server was found in, such as `user`, `project`, `local`, `managed` or `plugin`.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["url", "transport", "command_hash", "scope"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentActivityOpalMcpServer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentActivityOpalMcpServer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "transport": obj.get("transport"), + "command_hash": obj.get("command_hash"), + "scope": obj.get("scope") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/agent_activity_opal_reported.py b/opal_security/models/agent_activity_opal_reported.py new file mode 100644 index 0000000..c7cfa42 --- /dev/null +++ b/opal_security/models/agent_activity_opal_reported.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AgentActivityOpalReported(BaseModel): + """ + # AgentActivityOpalReported Object ### Description What the sending machine says about who and what it is, added by the Opal hook script. Every field is optional and **unverified**: whoever controls the machine controls them. They can disagree, and Opal keeps every one that is present, each cut to a fixed length (254 characters for an email, 64 for `os_user`, 255 for `hostname`) with control characters removed. The emails are also tried, in the order below and after the `X-Opal-Actor` header, to find the agent, so a person without a git email can still match through their Claude account. + """ # noqa: E501 + configured_email: Optional[StrictStr] = Field(default=None, description="An email set by an administrator, an MDM profile or the installer.") + claude_account_email: Optional[StrictStr] = Field(default=None, description="The email of the account Claude Code is signed in with.") + codex_account_email: Optional[StrictStr] = Field(default=None, description="The email of the ChatGPT account Codex is signed in with.") + codex_auth_mode: Optional[StrictStr] = Field(default=None, description="How Codex is signed in, from `auth_mode` in its `auth.json`: `chatgpt` for a ChatGPT sign-in, `apikey` for an API key. In an organization that has turned on person agents, a Codex call from a person who owns no OpenAI agent creates \"'s ChatGPT\" for a ChatGPT sign-in and \"'s OpenAI\" for an API key. Without it, no agent is created.") + chatgpt_account_email: Optional[StrictStr] = Field(default=None, description="The email of the ChatGPT account the sending runtime is signed in with.") + cursor_account_email: Optional[StrictStr] = Field(default=None, description="The email of the account Cursor is signed in with, from the `user_email` of Cursor's hook input. Tried before the other emails here.") + client: Optional[StrictStr] = Field(default=None, description="Which agent runtime sent the event: `claude_code`, `codex`, `cursor`, `openai_agents_python`, `openai_agents_js`, `chatgpt` or `chatgpt_workspace_agent`. Any other value is stored as `unknown`. When absent, an event carrying `cursor_version` is Cursor, one carrying `turn_id` and `model` and no `prompt_id` is Codex, and anything else is Claude Code.") + git_email: Optional[StrictStr] = Field(default=None, description="The machine's global `git config user.email`.") + os_user: Optional[StrictStr] = Field(default=None, description="The operating-system username. Not used to find an agent.") + hostname: Optional[StrictStr] = Field(default=None, description="The machine's name. The `X-Opal-Host` header wins when it names a different machine.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["configured_email", "claude_account_email", "codex_account_email", "codex_auth_mode", "chatgpt_account_email", "cursor_account_email", "client", "git_email", "os_user", "hostname"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentActivityOpalReported from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentActivityOpalReported from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "configured_email": obj.get("configured_email"), + "claude_account_email": obj.get("claude_account_email"), + "codex_account_email": obj.get("codex_account_email"), + "codex_auth_mode": obj.get("codex_auth_mode"), + "chatgpt_account_email": obj.get("chatgpt_account_email"), + "cursor_account_email": obj.get("cursor_account_email"), + "client": obj.get("client"), + "git_email": obj.get("git_email"), + "os_user": obj.get("os_user"), + "hostname": obj.get("hostname") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/agent_kill_switch.py b/opal_security/models/agent_kill_switch.py new file mode 100644 index 0000000..4ce04c5 --- /dev/null +++ b/opal_security/models/agent_kill_switch.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from typing import Optional, Set +from typing_extensions import Self + +class AgentKillSwitch(BaseModel): + """ + # AgentKillSwitch Object ### Description The org-level agent kill switch, and the activation that is in force or last was. `active` is what matters; the rest is the record of how it got that way. An activation is in force only while it has not been deactivated AND `expires_at` is still in the future, and that is evaluated on every read - so `active` can be `false` on a row that was never explicitly turned off. Everything below `active` describes the LATEST activation whether or not it is still in force, so an admin reading an inactive switch can still see who last turned it on and when it ended. + """ # noqa: E501 + active: StrictBool = Field(description="Whether agent tool calls are being denied right now. This is the field to read; it already accounts for expiry.") + activated_at: Optional[datetime] = Field(default=None, description="When the latest activation was turned on. Absent if it never has been.") + activated_by_user_id: Optional[UUID] = Field(default=None, description="The admin who turned it on. Absent when that user has since been hard-deleted - the activation record outlives them deliberately.") + expires_at: Optional[datetime] = Field(default=None, description="When the latest activation stops denying on its own. In the past for an activation that already ran out.") + deactivated_at: Optional[datetime] = Field(default=None, description="When the latest activation was turned off before its expiry, either by an admin or by being superseded. Absent when it ended at `expires_at`, or has not ended.") + reason: Optional[StrictStr] = Field(default=None, description="The admin's stated reason. Not an internal note - it is shown to the developer whose tool call is denied, in their own terminal.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["active", "activated_at", "activated_by_user_id", "expires_at", "deactivated_at", "reason"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentKillSwitch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentKillSwitch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "active": obj.get("active"), + "activated_at": obj.get("activated_at"), + "activated_by_user_id": obj.get("activated_by_user_id"), + "expires_at": obj.get("expires_at"), + "deactivated_at": obj.get("deactivated_at"), + "reason": obj.get("reason") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/anthropic_inference_hook_verdict.py b/opal_security/models/anthropic_inference_hook_verdict.py new file mode 100644 index 0000000..a549b1f --- /dev/null +++ b/opal_security/models/anthropic_inference_hook_verdict.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AnthropicInferenceHookVerdict(BaseModel): + """ + # AnthropicInferenceHookVerdict Object ### Description An Anthropic Inference hooks verdict. `deny_reason` is shown to the end user on a deny. + """ # noqa: E501 + action: StrictStr + deny_reason: Optional[Annotated[str, Field(strict=True, max_length=500)]] = None + reference_id: Optional[Annotated[str, Field(strict=True, max_length=50)]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["action", "deny_reason", "reference_id"] + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['allow', 'deny']): + raise ValueError("must be one of enum values ('allow', 'deny')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AnthropicInferenceHookVerdict from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnthropicInferenceHookVerdict from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "action": obj.get("action"), + "deny_reason": obj.get("deny_reason"), + "reference_id": obj.get("reference_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/api_access_level_enum.py b/opal_security/models/api_access_level_enum.py index e6609c3..4794ce3 100644 --- a/opal_security/models/api_access_level_enum.py +++ b/opal_security/models/api_access_level_enum.py @@ -21,7 +21,7 @@ class ApiAccessLevelEnum(str, Enum): """ - The access level of an API token. + The access level of an API token. AGENT_HOOKS tokens are made only by the Claude Code hook kit's browser sign-in and can only report agent activity; they cannot be created through this API. """ """ @@ -29,6 +29,7 @@ class ApiAccessLevelEnum(str, Enum): """ READ_ONLY = 'READ_ONLY' FULL_ACCESS = 'FULL_ACCESS' + AGENT_HOOKS = 'AGENT_HOOKS' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/opal_security/models/app.py b/opal_security/models/app.py index 7cfb7c9..e55ee87 100644 --- a/opal_security/models/app.py +++ b/opal_security/models/app.py @@ -23,6 +23,8 @@ from uuid import UUID from opal_security.models.app_type_enum import AppTypeEnum from opal_security.models.app_validation import AppValidation +from opal_security.models.custom_connector_app_config import CustomConnectorAppConfig +from opal_security.models.visibility_type_enum import VisibilityTypeEnum from typing import Optional, Set from typing_extensions import Self @@ -35,9 +37,13 @@ class App(BaseModel): description: StrictStr = Field(description="A description of the app.") admin_owner_id: UUID = Field(description="The ID of the owner of the app.") app_type: AppTypeEnum + visibility: Optional[VisibilityTypeEnum] = None + visibility_group_ids: Optional[List[UUID]] = Field(default=None, description="The IDs of groups that can see this app when visibility is `LIMITED`. Must be empty when visibility is `GLOBAL`.") + import_visibility: Optional[VisibilityTypeEnum] = Field(default=None, description="The visibility level of items imported from this app.") validations: Optional[List[AppValidation]] = Field(default=None, description="Validation checks of an apps' configuration and permissions.") + custom_connector: Optional[CustomConnectorAppConfig] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["app_id", "name", "description", "admin_owner_id", "app_type", "validations"] + __properties: ClassVar[List[str]] = ["app_id", "name", "description", "admin_owner_id", "app_type", "visibility", "visibility_group_ids", "import_visibility", "validations", "custom_connector"] model_config = ConfigDict( populate_by_name=True, @@ -87,6 +93,9 @@ def to_dict(self) -> Dict[str, Any]: if _item_validations: _items.append(_item_validations.to_dict()) _dict['validations'] = _items + # override the default output from pydantic by calling `to_dict()` of custom_connector + if self.custom_connector: + _dict['custom_connector'] = self.custom_connector.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -109,7 +118,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "description": obj.get("description"), "admin_owner_id": obj.get("admin_owner_id"), "app_type": obj.get("app_type"), - "validations": [AppValidation.from_dict(_item) for _item in obj["validations"]] if obj.get("validations") is not None else None + "visibility": obj.get("visibility"), + "visibility_group_ids": obj.get("visibility_group_ids"), + "import_visibility": obj.get("import_visibility"), + "validations": [AppValidation.from_dict(_item) for _item in obj["validations"]] if obj.get("validations") is not None else None, + "custom_connector": CustomConnectorAppConfig.from_dict(obj["custom_connector"]) if obj.get("custom_connector") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal_security/models/app_type_enum.py b/opal_security/models/app_type_enum.py index 7031cd2..b0cd34d 100644 --- a/opal_security/models/app_type_enum.py +++ b/opal_security/models/app_type_enum.py @@ -36,10 +36,13 @@ class AppTypeEnum(str, Enum): COUPA = 'COUPA' CURSOR = 'CURSOR' CUSTOM = 'CUSTOM' + CONFLUENCE = 'CONFLUENCE' CUSTOM_CONNECTOR = 'CUSTOM_CONNECTOR' DATABRICKS = 'DATABRICKS' DATASTAX_ASTRA = 'DATASTAX_ASTRA' + ALICLOUD = 'ALICLOUD' DEVIN = 'DEVIN' + DOCUSIGN = 'DOCUSIGN' DUO = 'DUO' GCP = 'GCP' GIT_HUB = 'GIT_HUB' @@ -50,7 +53,9 @@ class AppTypeEnum(str, Enum): HUBSPOT = 'HUBSPOT' ILEVEL = 'ILEVEL' INCIDENTIO = 'INCIDENTIO' + JIRA = 'JIRA' LDAP = 'LDAP' + LINEAR = 'LINEAR' MARIADB = 'MARIADB' MONGO = 'MONGO' MONGO_ATLAS = 'MONGO_ATLAS' @@ -68,12 +73,27 @@ class AppTypeEnum(str, Enum): SALESFORCE = 'SALESFORCE' SNOWFLAKE = 'SNOWFLAKE' SLACK = 'SLACK' + TABLEAU = 'TABLEAU' TAILSCALE = 'TAILSCALE' TELEPORT = 'TELEPORT' TWINGATE = 'TWINGATE' VAULT = 'VAULT' WORKDAY = 'WORKDAY' ZENDESK = 'ZENDESK' + ZOOM = 'ZOOM' + RAMP = 'RAMP' + WRIKE = 'WRIKE' + VERCEL = 'VERCEL' + AXIOM = 'AXIOM' + ACTIVECAMPAIGN = 'ACTIVECAMPAIGN' + AHA = 'AHA' + ASANA = 'ASANA' + BITWARDEN = 'BITWARDEN' + CALENDLY = 'CALENDLY' + ONELOGIN = 'ONELOGIN' + SQUARE = 'SQUARE' + TRAY = 'TRAY' + RIPPLING = 'RIPPLING' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/opal_security/models/app_visibility_info.py b/opal_security/models/app_visibility_info.py new file mode 100644 index 0000000..d5b63b0 --- /dev/null +++ b/opal_security/models/app_visibility_info.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.visibility_type_enum import VisibilityTypeEnum +from typing import Optional, Set +from typing_extensions import Self + +class AppVisibilityInfo(BaseModel): + """ + Visibility information for an app. Mirrors `VisibilityInfo` but adds the App-specific `import_visibility`, which governs the default visibility of items imported from the app. + """ # noqa: E501 + visibility: VisibilityTypeEnum + visibility_group_ids: Optional[List[UUID]] = Field(default=None, description="The IDs of groups that can see this app when visibility is `LIMITED`. Must be empty when visibility is `GLOBAL`.") + import_visibility: Optional[VisibilityTypeEnum] = Field(default=None, description="The visibility of items imported from this app. Defaults to `GLOBAL` when omitted on a write.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["visibility", "visibility_group_ids", "import_visibility"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AppVisibilityInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AppVisibilityInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "visibility": obj.get("visibility"), + "visibility_group_ids": obj.get("visibility_group_ids"), + "import_visibility": obj.get("import_visibility") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/approve_request_request.py b/opal_security/models/approve_request_request.py index 93cb0ef..cf8986c 100644 --- a/opal_security/models/approve_request_request.py +++ b/opal_security/models/approve_request_request.py @@ -20,6 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID from opal_security.models.request_approval_enum import RequestApprovalEnum from typing import Optional, Set from typing_extensions import Self @@ -28,10 +29,11 @@ class ApproveRequestRequest(BaseModel): """ ApproveRequestRequest """ # noqa: E501 + acting_user_id: Optional[UUID] = Field(default=None, description="Approve as this Opal user instead of the caller. Only for service users an admin has allowed to act for users, in organizations with the feature enabled. The user must be active in the identity provider and be a reviewer on the request's current stage and not the request's target; the decision counts as theirs. Requests that require MFA to approve, and ADMIN level, are rejected.") level: RequestApprovalEnum comment: Optional[StrictStr] = Field(default=None, description="Optional comment for the approval") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["level", "comment"] + __properties: ClassVar[List[str]] = ["acting_user_id", "level", "comment"] model_config = ConfigDict( populate_by_name=True, @@ -91,6 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "acting_user_id": obj.get("acting_user_id"), "level": obj.get("level"), "comment": obj.get("comment") }) diff --git a/opal_security/models/campaign.py b/opal_security/models/campaign.py new file mode 100644 index 0000000..6052422 --- /dev/null +++ b/opal_security/models/campaign.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.campaign_configuration import CampaignConfiguration +from opal_security.models.campaign_status_enum import CampaignStatusEnum +from typing import Optional, Set +from typing_extensions import Self + +class Campaign(BaseModel): + """ + An access review campaign. + """ # noqa: E501 + campaign_id: UUID = Field(description="The ID of the campaign.") + name: StrictStr = Field(description="The name of the campaign.") + status: CampaignStatusEnum + is_template: StrictBool = Field(description="Whether this campaign is a recurring schedule template. Templates spawn draft campaigns on schedule rather than being reviewed directly.") + created_at: datetime = Field(description="The creation time of the campaign.") + updated_at: datetime = Field(description="The last updated time of the campaign.") + created_by_user_id: UUID = Field(description="The ID of the user who created the campaign.") + configuration: Optional[CampaignConfiguration] = Field(default=None, description="The campaign's configuration, if set.") + started_at: Optional[datetime] = Field(default=None, description="The time the campaign was started, if started.") + started_by_user_id: Optional[UUID] = Field(default=None, description="The ID of the user who started the campaign, if started.") + stopped_at: Optional[datetime] = Field(default=None, description="The time the campaign was manually stopped, if stopped.") + stopped_by_user_id: Optional[UUID] = Field(default=None, description="The ID of the user who stopped the campaign, if stopped.") + ended_at: Optional[datetime] = Field(default=None, description="The time the campaign reached its scheduled end, if ended.") + ended_by_user_id: Optional[UUID] = Field(default=None, description="The ID of the user who ended the campaign, if ended.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["campaign_id", "name", "status", "is_template", "created_at", "updated_at", "created_by_user_id", "configuration", "started_at", "started_by_user_id", "stopped_at", "stopped_by_user_id", "ended_at", "ended_by_user_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Campaign from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of configuration + if self.configuration: + _dict['configuration'] = self.configuration.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Campaign from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "campaign_id": obj.get("campaign_id"), + "name": obj.get("name"), + "status": obj.get("status"), + "is_template": obj.get("is_template"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "created_by_user_id": obj.get("created_by_user_id"), + "configuration": CampaignConfiguration.from_dict(obj["configuration"]) if obj.get("configuration") is not None else None, + "started_at": obj.get("started_at"), + "started_by_user_id": obj.get("started_by_user_id"), + "stopped_at": obj.get("stopped_at"), + "stopped_by_user_id": obj.get("stopped_by_user_id"), + "ended_at": obj.get("ended_at"), + "ended_by_user_id": obj.get("ended_by_user_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/campaign_configuration.py b/opal_security/models/campaign_configuration.py new file mode 100644 index 0000000..73166b4 --- /dev/null +++ b/opal_security/models/campaign_configuration.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.campaign_group_asset_visibility_policy_enum import CampaignGroupAssetVisibilityPolicyEnum +from opal_security.models.campaign_revoke_on_enum import CampaignRevokeOnEnum +from opal_security.models.opal_access_path_query_body import OpalAccessPathQueryBody +from opal_security.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum +from typing import Optional, Set +from typing_extensions import Self + +class CampaignConfiguration(BaseModel): + """ + Configuration for an access review campaign. + """ # noqa: E501 + configuration_id: UUID = Field(description="The ID of the campaign configuration.") + created_at: datetime = Field(description="The creation time of the configuration.") + updated_at: datetime = Field(description="The last updated time of the configuration.") + query: Optional[OpalAccessPathQueryBody] = Field(default=None, description="Access-path query defining the scope of access to review. Uses the same principalFilter / entitlementFilter shape as ACCESS OpalQuery.") + reviewer_assignment_policy: UARReviewerAssignmentPolicyEnum + allow_self_review: StrictBool = Field(description="Whether reviewers can review their own access.") + send_reviewer_assignment_notification: StrictBool = Field(description="Whether to notify reviewers upon assignment.") + allow_reviewer_reassignment: StrictBool = Field(description="Whether reviewers may reassign their reviews to another user.") + allow_reviewers_to_reduce_expiration: StrictBool = Field(description="Whether reviewers can shorten an item's access expiration. They cannot extend it.") + start_date: Optional[datetime] = Field(default=None, description="Scheduled start date of the campaign.") + end_date: Optional[datetime] = Field(default=None, description="Scheduled end date of the campaign.") + timezone: StrictStr = Field(description="IANA timezone used to interpret campaign deadlines (e.g. America/Los_Angeles).") + revoke_on: CampaignRevokeOnEnum + reminder_schedule: Optional[List[StrictInt]] = Field(default=None, description="Days before end date to send reminder notifications.") + reminder_include_manager: StrictBool = Field(description="Whether to include the reviewer's manager in reminders.") + require_reason_on_denial: StrictBool = Field(description="Whether reviewers must provide a reason when denying (revoking) access.") + auto_stop_when_complete: StrictBool = Field(description="Whether the campaign stops automatically once every review item is complete. Stopping locks further reviews so admins can review the decisions or end the campaign to generate the report.") + hide_ai_suggestions: StrictBool = Field(description="Whether AI suggestions are hidden from reviewers.") + custom_start_message: Optional[StrictStr] = Field(default=None, description="Optional custom message included when notifying reviewers that the campaign started.") + group_asset_visibility_policy: CampaignGroupAssetVisibilityPolicyEnum + is_template: StrictBool = Field(description="Whether this configuration is a recurring schedule template.") + cron_expression: Optional[StrictStr] = Field(default=None, description="Cron expression driving the recurring schedule. Null for one-off campaigns.") + next_scheduled_run: Optional[datetime] = Field(default=None, description="Next time a draft will be generated from this template.") + last_scheduled_run: Optional[datetime] = Field(default=None, description="Most recent time a draft was generated from this template.") + recurring_duration_days: Optional[StrictInt] = Field(default=None, description="Deadline window in days applied to each draft generated from this template.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["configuration_id", "created_at", "updated_at", "query", "reviewer_assignment_policy", "allow_self_review", "send_reviewer_assignment_notification", "allow_reviewer_reassignment", "allow_reviewers_to_reduce_expiration", "start_date", "end_date", "timezone", "revoke_on", "reminder_schedule", "reminder_include_manager", "require_reason_on_denial", "auto_stop_when_complete", "hide_ai_suggestions", "custom_start_message", "group_asset_visibility_policy", "is_template", "cron_expression", "next_scheduled_run", "last_scheduled_run", "recurring_duration_days"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CampaignConfiguration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of query + if self.query: + _dict['query'] = self.query.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CampaignConfiguration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "configuration_id": obj.get("configuration_id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "query": OpalAccessPathQueryBody.from_dict(obj["query"]) if obj.get("query") is not None else None, + "reviewer_assignment_policy": obj.get("reviewer_assignment_policy"), + "allow_self_review": obj.get("allow_self_review"), + "send_reviewer_assignment_notification": obj.get("send_reviewer_assignment_notification"), + "allow_reviewer_reassignment": obj.get("allow_reviewer_reassignment"), + "allow_reviewers_to_reduce_expiration": obj.get("allow_reviewers_to_reduce_expiration"), + "start_date": obj.get("start_date"), + "end_date": obj.get("end_date"), + "timezone": obj.get("timezone"), + "revoke_on": obj.get("revoke_on"), + "reminder_schedule": obj.get("reminder_schedule"), + "reminder_include_manager": obj.get("reminder_include_manager"), + "require_reason_on_denial": obj.get("require_reason_on_denial"), + "auto_stop_when_complete": obj.get("auto_stop_when_complete"), + "hide_ai_suggestions": obj.get("hide_ai_suggestions"), + "custom_start_message": obj.get("custom_start_message"), + "group_asset_visibility_policy": obj.get("group_asset_visibility_policy"), + "is_template": obj.get("is_template"), + "cron_expression": obj.get("cron_expression"), + "next_scheduled_run": obj.get("next_scheduled_run"), + "last_scheduled_run": obj.get("last_scheduled_run"), + "recurring_duration_days": obj.get("recurring_duration_days") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/campaign_group_asset_visibility_policy_enum.py b/opal_security/models/campaign_group_asset_visibility_policy_enum.py new file mode 100644 index 0000000..68deed0 --- /dev/null +++ b/opal_security/models/campaign_group_asset_visibility_policy_enum.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CampaignGroupAssetVisibilityPolicyEnum(str, Enum): + """ + Controls what group assets reviewers can see during the campaign. + """ + + """ + allowed enum values + """ + STRICT = 'STRICT' + VIEW_VISIBLE_AND_ASSIGNED = 'VIEW_VISIBLE_AND_ASSIGNED' + VIEW_ALL = 'VIEW_ALL' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CampaignGroupAssetVisibilityPolicyEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/campaign_item.py b/opal_security/models/campaign_item.py new file mode 100644 index 0000000..1de76be --- /dev/null +++ b/opal_security/models/campaign_item.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.campaign_item_admin_override import CampaignItemAdminOverride +from opal_security.models.campaign_item_review import CampaignItemReview +from opal_security.models.campaign_item_status_enum import CampaignItemStatusEnum +from opal_security.models.campaign_item_target_type_enum import CampaignItemTargetTypeEnum +from opal_security.models.entity_type_enum import EntityTypeEnum +from opal_security.models.resource_access_level import ResourceAccessLevel +from typing import Optional, Set +from typing_extensions import Self + +class CampaignItem(BaseModel): + """ + A campaign review item — one direct access edge under review, matching a row on the admin Reviews tab. + """ # noqa: E501 + campaign_item_id: UUID = Field(description="The ID of the campaign item.") + campaign_id: UUID = Field(description="The ID of the parent campaign.") + target_type: CampaignItemTargetTypeEnum + role_assignment_id: UUID = Field(description="The role assignment ID this item reviews (`target_id` when `target_type` is ROLE_ASSIGNMENT). ") + status: CampaignItemStatusEnum + created_at: datetime = Field(description="When the item was created (snapshotted into the campaign).") + is_target_deleted: StrictBool = Field(description="True when the underlying role assignment is soft-deleted.") + principal_id: Optional[UUID] = Field(default=None, description="Principal ID from the role assignment. Null if the RA is missing.") + principal_type: Optional[EntityTypeEnum] = Field(default=None, description="Principal entity type. Null if the RA is missing.") + entity_id: Optional[UUID] = Field(default=None, description="Entitlement entity ID. Null if the RA is missing.") + entity_type: Optional[EntityTypeEnum] = Field(default=None, description="Entitlement entity type. Null if the RA is missing.") + access_level: Optional[ResourceAccessLevel] = Field(default=None, description="Access level on the role assignment, if any.") + access_level_name: Optional[StrictStr] = Field(default=None, description="Denormalized access level name stored on the campaign item.") + reviews: List[CampaignItemReview] = Field(description="Reviewer assignments and decisions for this item.") + admin_override: Optional[CampaignItemAdminOverride] = Field(default=None, description="Admin override, if any.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["campaign_item_id", "campaign_id", "target_type", "role_assignment_id", "status", "created_at", "is_target_deleted", "principal_id", "principal_type", "entity_id", "entity_type", "access_level", "access_level_name", "reviews", "admin_override"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CampaignItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of access_level + if self.access_level: + _dict['access_level'] = self.access_level.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in reviews (list) + _items = [] + if self.reviews: + for _item_reviews in self.reviews: + if _item_reviews: + _items.append(_item_reviews.to_dict()) + _dict['reviews'] = _items + # override the default output from pydantic by calling `to_dict()` of admin_override + if self.admin_override: + _dict['admin_override'] = self.admin_override.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CampaignItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "campaign_item_id": obj.get("campaign_item_id"), + "campaign_id": obj.get("campaign_id"), + "target_type": obj.get("target_type"), + "role_assignment_id": obj.get("role_assignment_id"), + "status": obj.get("status"), + "created_at": obj.get("created_at"), + "is_target_deleted": obj.get("is_target_deleted"), + "principal_id": obj.get("principal_id"), + "principal_type": obj.get("principal_type"), + "entity_id": obj.get("entity_id"), + "entity_type": obj.get("entity_type"), + "access_level": ResourceAccessLevel.from_dict(obj["access_level"]) if obj.get("access_level") is not None else None, + "access_level_name": obj.get("access_level_name"), + "reviews": [CampaignItemReview.from_dict(_item) for _item in obj["reviews"]] if obj.get("reviews") is not None else None, + "admin_override": CampaignItemAdminOverride.from_dict(obj["admin_override"]) if obj.get("admin_override") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/campaign_item_admin_override.py b/opal_security/models/campaign_item_admin_override.py new file mode 100644 index 0000000..17ca804 --- /dev/null +++ b/opal_security/models/campaign_item_admin_override.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from uuid import UUID +from opal_security.models.campaign_item_review_decision_enum import CampaignItemReviewDecisionEnum +from typing import Optional, Set +from typing_extensions import Self + +class CampaignItemAdminOverride(BaseModel): + """ + Admin override applied to a campaign item. When set, it takes precedence over reviewer decisions for status and end-campaign remediations. + """ # noqa: E501 + actor_user_id: UUID = Field(description="The admin who applied the override.") + decision: CampaignItemReviewDecisionEnum + decided_at: datetime = Field(description="When the override was applied.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["actor_user_id", "decision", "decided_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CampaignItemAdminOverride from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CampaignItemAdminOverride from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "actor_user_id": obj.get("actor_user_id"), + "decision": obj.get("decision"), + "decided_at": obj.get("decided_at") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/campaign_item_review.py b/opal_security/models/campaign_item_review.py new file mode 100644 index 0000000..1163165 --- /dev/null +++ b/opal_security/models/campaign_item_review.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.campaign_item_review_decision_enum import CampaignItemReviewDecisionEnum +from opal_security.models.campaign_item_reviewer_assignment_source_enum import CampaignItemReviewerAssignmentSourceEnum +from typing import Optional, Set +from typing_extensions import Self + +class CampaignItemReview(BaseModel): + """ + A single reviewer's assignment and decision for a campaign item. + """ # noqa: E501 + campaign_item_review_id: UUID = Field(description="The ID of the campaign item review.") + campaign_item_id: UUID = Field(description="The ID of the campaign item.") + reviewer_user_id: UUID = Field(description="The ID of the assigned reviewer.") + assignment_source: CampaignItemReviewerAssignmentSourceEnum + decision: Optional[CampaignItemReviewDecisionEnum] = Field(default=None, description="The reviewer's decision. Null when the reviewer has not yet submitted. ") + note: Optional[StrictStr] = Field(default=None, description="Optional note from the reviewer.") + updated_access_level_remote_id: Optional[StrictStr] = Field(default=None, description="Target access level remote ID when decision is CHANGE_ROLE.") + updated_duration_in_minutes: Optional[StrictInt] = Field(default=None, description="Built-in duration in minutes when decision is REDUCE_EXPIRATION.") + decided_at: Optional[datetime] = Field(default=None, description="When the decision was finalized.") + resolution_message: Optional[StrictStr] = Field(default=None, description="Preset assignment summary when a manager/owner chain was resolved or substituted. ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["campaign_item_review_id", "campaign_item_id", "reviewer_user_id", "assignment_source", "decision", "note", "updated_access_level_remote_id", "updated_duration_in_minutes", "decided_at", "resolution_message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CampaignItemReview from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CampaignItemReview from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "campaign_item_review_id": obj.get("campaign_item_review_id"), + "campaign_item_id": obj.get("campaign_item_id"), + "reviewer_user_id": obj.get("reviewer_user_id"), + "assignment_source": obj.get("assignment_source"), + "decision": obj.get("decision"), + "note": obj.get("note"), + "updated_access_level_remote_id": obj.get("updated_access_level_remote_id"), + "updated_duration_in_minutes": obj.get("updated_duration_in_minutes"), + "decided_at": obj.get("decided_at"), + "resolution_message": obj.get("resolution_message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/campaign_item_review_decision_enum.py b/opal_security/models/campaign_item_review_decision_enum.py new file mode 100644 index 0000000..79ccc66 --- /dev/null +++ b/opal_security/models/campaign_item_review_decision_enum.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CampaignItemReviewDecisionEnum(str, Enum): + """ + Decision recorded on a campaign item review row. + """ + + """ + allowed enum values + """ + APPROVED = 'APPROVED' + REVOKED = 'REVOKED' + CHANGE_ROLE = 'CHANGE_ROLE' + REDUCE_EXPIRATION = 'REDUCE_EXPIRATION' + ADMIN_REVOKED = 'ADMIN_REVOKED' + NO_ACTION = 'NO_ACTION' + REASSIGNED = 'REASSIGNED' + ADMIN_OVERRIDE_APPROVED = 'ADMIN_OVERRIDE_APPROVED' + ADMIN_OVERRIDE_REVOKED = 'ADMIN_OVERRIDE_REVOKED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CampaignItemReviewDecisionEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/campaign_item_review_result.py b/opal_security/models/campaign_item_review_result.py new file mode 100644 index 0000000..7483f70 --- /dev/null +++ b/opal_security/models/campaign_item_review_result.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.campaign_item_review_decision_enum import CampaignItemReviewDecisionEnum +from typing import Optional, Set +from typing_extensions import Self + +class CampaignItemReviewResult(BaseModel): + """ + A campaign item review after a successful submit. Flat fields only — does not expand principal/entity relationships. + """ # noqa: E501 + campaign_item_review_id: UUID = Field(description="The ID of the campaign item review.") + decision: Optional[CampaignItemReviewDecisionEnum] = None + note: Optional[StrictStr] = Field(default=None, description="Note recorded with the decision, if any.") + decided_at: Optional[datetime] = Field(default=None, description="When the decision was submitted.") + updated_access_level_remote_id: Optional[StrictStr] = Field(default=None, description="When `decision` is `CHANGE_ROLE`, the remote ID of the access level the reviewer selected. ") + reassigned_to_reviewer_ids: Optional[List[UUID]] = Field(default=None, description="When `decision` is `REASSIGNED`, the user IDs the review was reassigned to. ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["campaign_item_review_id", "decision", "note", "decided_at", "updated_access_level_remote_id", "reassigned_to_reviewer_ids"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CampaignItemReviewResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CampaignItemReviewResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "campaign_item_review_id": obj.get("campaign_item_review_id"), + "decision": obj.get("decision"), + "note": obj.get("note"), + "decided_at": obj.get("decided_at"), + "updated_access_level_remote_id": obj.get("updated_access_level_remote_id"), + "reassigned_to_reviewer_ids": obj.get("reassigned_to_reviewer_ids") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/campaign_item_reviewer_assignment.py b/opal_security/models/campaign_item_reviewer_assignment.py new file mode 100644 index 0000000..f3f0031 --- /dev/null +++ b/opal_security/models/campaign_item_reviewer_assignment.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.campaign_item_reviewer_assignment_source_enum import CampaignItemReviewerAssignmentSourceEnum +from typing import Optional, Set +from typing_extensions import Self + +class CampaignItemReviewerAssignment(BaseModel): + """ + Pair of campaign item and reviewer to assign or unassign. + """ # noqa: E501 + campaign_item_id: UUID = Field(description="The ID of the campaign item.") + reviewer_id: Optional[UUID] = Field(default=None, description="The ID of the reviewer. Required when `assignment_source` is `MANUAL` (or omitted), and required for every unassign entry. ") + assignment_source: Optional[CampaignItemReviewerAssignmentSourceEnum] = Field(default=None, description="Defaults to `MANUAL`. When `PRINCIPAL_MANAGER` or `ASSET_ADMIN_OWNER`, the backend resolves reviewer ID(s) and `reviewer_id` may be omitted. ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["campaign_item_id", "reviewer_id", "assignment_source"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CampaignItemReviewerAssignment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CampaignItemReviewerAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "campaign_item_id": obj.get("campaign_item_id"), + "reviewer_id": obj.get("reviewer_id"), + "assignment_source": obj.get("assignment_source") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/campaign_item_reviewer_assignment_source_enum.py b/opal_security/models/campaign_item_reviewer_assignment_source_enum.py new file mode 100644 index 0000000..69a21b5 --- /dev/null +++ b/opal_security/models/campaign_item_reviewer_assignment_source_enum.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CampaignItemReviewerAssignmentSourceEnum(str, Enum): + """ + How a reviewer was assigned to a campaign item. + """ + + """ + allowed enum values + """ + MANUAL = 'MANUAL' + PRINCIPAL_MANAGER = 'PRINCIPAL_MANAGER' + ASSET_ADMIN_OWNER = 'ASSET_ADMIN_OWNER' + PRINCIPAL_SELF = 'PRINCIPAL_SELF' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CampaignItemReviewerAssignmentSourceEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/campaign_item_reviewer_source_removal.py b/opal_security/models/campaign_item_reviewer_source_removal.py new file mode 100644 index 0000000..4d7be34 --- /dev/null +++ b/opal_security/models/campaign_item_reviewer_source_removal.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from uuid import UUID +from opal_security.models.campaign_item_reviewer_assignment_source_enum import CampaignItemReviewerAssignmentSourceEnum +from typing import Optional, Set +from typing_extensions import Self + +class CampaignItemReviewerSourceRemoval(BaseModel): + """ + Remove all pending reviewer rows for a given assignment source on a campaign item. Completed reviews are preserved. + """ # noqa: E501 + campaign_item_id: UUID = Field(description="The ID of the campaign item.") + assignment_source: CampaignItemReviewerAssignmentSourceEnum + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["campaign_item_id", "assignment_source"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CampaignItemReviewerSourceRemoval from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CampaignItemReviewerSourceRemoval from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "campaign_item_id": obj.get("campaign_item_id"), + "assignment_source": obj.get("assignment_source") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/campaign_item_status_enum.py b/opal_security/models/campaign_item_status_enum.py new file mode 100644 index 0000000..d1bb258 --- /dev/null +++ b/opal_security/models/campaign_item_status_enum.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CampaignItemStatusEnum(str, Enum): + """ + Derived aggregate status for a campaign item. Matches the admin Reviews tab Status column labels (undecided items on a stopped campaign are PENDING, not a separate stopped status). + """ + + """ + allowed enum values + """ + PENDING = 'PENDING' + COMPLETED = 'COMPLETED' + APPROVED = 'APPROVED' + REVOKED = 'REVOKED' + NO_ACTION = 'NO_ACTION' + CHANGED_ROLE = 'CHANGED_ROLE' + EXPIRATION_REDUCED = 'EXPIRATION_REDUCED' + ADMIN_REVOKED = 'ADMIN_REVOKED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CampaignItemStatusEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/campaign_item_target_type_enum.py b/opal_security/models/campaign_item_target_type_enum.py new file mode 100644 index 0000000..ab338ef --- /dev/null +++ b/opal_security/models/campaign_item_target_type_enum.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CampaignItemTargetTypeEnum(str, Enum): + """ + Type of access edge the campaign item reviews. + """ + + """ + allowed enum values + """ + ROLE_ASSIGNMENT = 'ROLE_ASSIGNMENT' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CampaignItemTargetTypeEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/campaign_item_unassigned_preset_message.py b/opal_security/models/campaign_item_unassigned_preset_message.py new file mode 100644 index 0000000..a4b5a61 --- /dev/null +++ b/opal_security/models/campaign_item_unassigned_preset_message.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from uuid import UUID +from opal_security.models.campaign_item_reviewer_assignment_source_enum import CampaignItemReviewerAssignmentSourceEnum +from typing import Optional, Set +from typing_extensions import Self + +class CampaignItemUnassignedPresetMessage(BaseModel): + """ + Preset assignment feedback when no review row was created. + """ # noqa: E501 + campaign_item_id: UUID = Field(description="The ID of the campaign item.") + assignment_source: CampaignItemReviewerAssignmentSourceEnum + message: StrictStr = Field(description="Human-readable explanation of why no reviewer was assigned.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["campaign_item_id", "assignment_source", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CampaignItemUnassignedPresetMessage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CampaignItemUnassignedPresetMessage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "campaign_item_id": obj.get("campaign_item_id"), + "assignment_source": obj.get("assignment_source"), + "message": obj.get("message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/campaign_revoke_on_enum.py b/opal_security/models/campaign_revoke_on_enum.py new file mode 100644 index 0000000..0c9273c --- /dev/null +++ b/opal_security/models/campaign_revoke_on_enum.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CampaignRevokeOnEnum(str, Enum): + """ + When access decisions take effect during a campaign. + """ + + """ + allowed enum values + """ + ACTION = 'ACTION' + END = 'END' + NONE = 'NONE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CampaignRevokeOnEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/campaign_status_enum.py b/opal_security/models/campaign_status_enum.py new file mode 100644 index 0000000..c3ce7a6 --- /dev/null +++ b/opal_security/models/campaign_status_enum.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CampaignStatusEnum(str, Enum): + """ + The current status of a campaign. + """ + + """ + allowed enum values + """ + DRAFT = 'DRAFT' + ONGOING = 'ONGOING' + COMPLETED = 'COMPLETED' + STOPPED = 'STOPPED' + ENDED = 'ENDED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CampaignStatusEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/cancel_request_request.py b/opal_security/models/cancel_request_request.py new file mode 100644 index 0000000..1618781 --- /dev/null +++ b/opal_security/models/cancel_request_request.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from typing import Optional, Set +from typing_extensions import Self + +class CancelRequestRequest(BaseModel): + """ + CancelRequestRequest + """ # noqa: E501 + acting_user_id: Optional[UUID] = Field(default=None, description="Cancel as this Opal user instead of the caller. Only for service users an admin has allowed to act for users, in organizations with the feature enabled. The user must be active in the identity provider and be an Opal admin or the request's requester, target or initiated_by user. Unknown body fields are ignored, so a misspelled field cancels as the caller.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["acting_user_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CancelRequestRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CancelRequestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "acting_user_id": obj.get("acting_user_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/condition.py b/opal_security/models/condition.py index c8376fd..bd123c6 100644 --- a/opal_security/models/condition.py +++ b/opal_security/models/condition.py @@ -30,8 +30,9 @@ class Condition(BaseModel): """ # noqa: E501 group_ids: Optional[List[UUID]] = Field(default=None, description="The list of group IDs to match.") role_remote_ids: Optional[List[StrictStr]] = Field(default=None, description="The list of role remote IDs to match.") + opal_script_id: Optional[UUID] = Field(default=None, description="The ID of a `REQUEST_CONFIGURATION_CONDITION` OpalScript that decides whether this request configuration applies. Cannot be combined with `group_ids` or `role_remote_ids`.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["group_ids", "role_remote_ids"] + __properties: ClassVar[List[str]] = ["group_ids", "role_remote_ids", "opal_script_id"] model_config = ConfigDict( populate_by_name=True, @@ -92,7 +93,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "group_ids": obj.get("group_ids"), - "role_remote_ids": obj.get("role_remote_ids") + "role_remote_ids": obj.get("role_remote_ids"), + "opal_script_id": obj.get("opal_script_id") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal_security/models/configuration_template.py b/opal_security/models/configuration_template.py index 3cf9970..533fcce 100644 --- a/opal_security/models/configuration_template.py +++ b/opal_security/models/configuration_template.py @@ -41,10 +41,11 @@ class ConfigurationTemplate(BaseModel): break_glass_user_ids: Optional[List[UUID]] = Field(default=None, description="The IDs of the break glass users linked to the configuration template.") require_mfa_to_approve: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template.") require_mfa_to_connect: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA to connect to resources associated with this configuration template.") + requires_forfeit_reason: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not a reason is required when forfeiting access to resources or groups using this configuration template.") ticket_propagation: Optional[TicketPropagationConfiguration] = None custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent upon request approval for this configuration template.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["configuration_template_id", "name", "admin_owner_id", "visibility", "linked_audit_message_channel_ids", "request_configuration_id", "member_oncall_schedule_ids", "break_glass_user_ids", "require_mfa_to_approve", "require_mfa_to_connect", "ticket_propagation", "custom_request_notification"] + __properties: ClassVar[List[str]] = ["configuration_template_id", "name", "admin_owner_id", "visibility", "linked_audit_message_channel_ids", "request_configuration_id", "member_oncall_schedule_ids", "break_glass_user_ids", "require_mfa_to_approve", "require_mfa_to_connect", "requires_forfeit_reason", "ticket_propagation", "custom_request_notification"] model_config = ConfigDict( populate_by_name=True, @@ -120,6 +121,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "break_glass_user_ids": obj.get("break_glass_user_ids"), "require_mfa_to_approve": obj.get("require_mfa_to_approve"), "require_mfa_to_connect": obj.get("require_mfa_to_connect"), + "requires_forfeit_reason": obj.get("requires_forfeit_reason"), "ticket_propagation": TicketPropagationConfiguration.from_dict(obj["ticket_propagation"]) if obj.get("ticket_propagation") is not None else None, "custom_request_notification": obj.get("custom_request_notification") }) diff --git a/opal_security/models/create_app_info.py b/opal_security/models/create_app_info.py new file mode 100644 index 0000000..d8085dd --- /dev/null +++ b/opal_security/models/create_app_info.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.app_type_enum import AppTypeEnum +from opal_security.models.create_custom_connector_info import CreateCustomConnectorInfo +from opal_security.models.visibility_type_enum import VisibilityTypeEnum +from typing import Optional, Set +from typing_extensions import Self + +class CreateAppInfo(BaseModel): + """ + Information needed to create an app. Currently supports only Push-only apps (`CUSTOM`) and Custom Connector apps (`CUSTOM_CONNECTOR`). + """ # noqa: E501 + name: StrictStr = Field(description="The name of the app.") + description: StrictStr = Field(description="A description of the app.") + admin_owner_id: UUID = Field(description="The ID of the owner of the app.") + app_type: AppTypeEnum = Field(description="The type of the app. Must be `CUSTOM` (Push-only App) or `CUSTOM_CONNECTOR`.") + visibility: Optional[VisibilityTypeEnum] = Field(default=None, description="The visibility of the app. Defaults to `GLOBAL` when omitted. Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`: set visibility after creation via the sub-endpoint instead of on create. Still fully functional and validated on this surface.") + visibility_group_ids: Optional[List[UUID]] = Field(default=None, description="The IDs of groups that can see this app when visibility is `LIMITED`. Must be empty when visibility is `GLOBAL`; the server returns `400` otherwise. Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`.") + import_visibility: Optional[VisibilityTypeEnum] = Field(default=None, description="The visibility of imported items. Defaults to `GLOBAL` when omitted. Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`.") + custom_connector: Optional[CreateCustomConnectorInfo] = Field(default=None, description="Required when `app_type` is `CUSTOM_CONNECTOR`. Must not be set when `app_type` is `CUSTOM`.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "description", "admin_owner_id", "app_type", "visibility", "visibility_group_ids", "import_visibility", "custom_connector"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateAppInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of custom_connector + if self.custom_connector: + _dict['custom_connector'] = self.custom_connector.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateAppInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "admin_owner_id": obj.get("admin_owner_id"), + "app_type": obj.get("app_type"), + "visibility": obj.get("visibility"), + "visibility_group_ids": obj.get("visibility_group_ids"), + "import_visibility": obj.get("import_visibility"), + "custom_connector": CreateCustomConnectorInfo.from_dict(obj["custom_connector"]) if obj.get("custom_connector") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/create_campaign_configuration_info.py b/opal_security/models/create_campaign_configuration_info.py new file mode 100644 index 0000000..8cb14d9 --- /dev/null +++ b/opal_security/models/create_campaign_configuration_info.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.campaign_group_asset_visibility_policy_enum import CampaignGroupAssetVisibilityPolicyEnum +from opal_security.models.campaign_revoke_on_enum import CampaignRevokeOnEnum +from opal_security.models.opal_access_path_query_body import OpalAccessPathQueryBody +from opal_security.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum +from typing import Optional, Set +from typing_extensions import Self + +class CreateCampaignConfigurationInfo(BaseModel): + """ + Configuration to apply when creating a campaign. `query` is required; other omitted fields use defaults. + """ # noqa: E501 + query: OpalAccessPathQueryBody = Field(description="Access-path query defining the scope of access to review. Required. Uses the same principalFilter / entitlementFilter shape as ACCESS OpalQuery. Must include at least one of principalFilter or entitlementFilter. Campaign scope only supports direct access edges: `edgeFilter.directOnly` defaults to `true`, is always stored as `true`, and passing `false` returns 400. ") + reviewer_assignment_policy: Optional[UARReviewerAssignmentPolicyEnum] = None + allow_self_review: Optional[StrictBool] = Field(default=None, description="Whether reviewers can review their own access.") + send_reviewer_assignment_notification: Optional[StrictBool] = Field(default=None, description="Whether to notify reviewers upon assignment.") + allow_reviewer_reassignment: Optional[StrictBool] = Field(default=None, description="Whether reviewers may reassign their reviews to another user.") + allow_reviewers_to_reduce_expiration: Optional[StrictBool] = Field(default=None, description="Whether reviewers can shorten an item's access expiration. They cannot extend it.") + start_date: Optional[datetime] = Field(default=None, description="Scheduled start date of the campaign.") + end_date: Optional[datetime] = Field(default=None, description="Scheduled end date of the campaign.") + timezone: Optional[StrictStr] = Field(default=None, description="IANA timezone used to interpret campaign deadlines (e.g. America/Los_Angeles).") + revoke_on: Optional[CampaignRevokeOnEnum] = None + reminder_schedule: Optional[List[StrictInt]] = Field(default=None, description="Days before end date to send reminder notifications.") + reminder_include_manager: Optional[StrictBool] = Field(default=None, description="Whether to include the reviewer's manager in reminders.") + require_reason_on_denial: Optional[StrictBool] = Field(default=None, description="Whether reviewers must provide a reason when denying (revoking) access.") + auto_stop_when_complete: Optional[StrictBool] = Field(default=None, description="Whether the campaign stops automatically once every review item is complete. Stopping locks further reviews so admins can review the decisions or end the campaign to generate the report.") + hide_ai_suggestions: Optional[StrictBool] = Field(default=None, description="Whether AI suggestions are hidden from reviewers.") + custom_start_message: Optional[StrictStr] = Field(default=None, description="Optional custom message included when notifying reviewers that the campaign started.") + group_asset_visibility_policy: Optional[CampaignGroupAssetVisibilityPolicyEnum] = None + is_template: Optional[StrictBool] = Field(default=None, description="Whether this configuration is a recurring schedule template.") + cron_expression: Optional[StrictStr] = Field(default=None, description="Cron expression driving the recurring schedule. Null for one-off campaigns.") + recurring_duration_days: Optional[StrictInt] = Field(default=None, description="Deadline window in days applied to each draft generated from this template.") + excluded_role_assignment_ids: Optional[List[UUID]] = Field(default=None, description="Role assignment IDs to exclude from the campaign scope during population.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["query", "reviewer_assignment_policy", "allow_self_review", "send_reviewer_assignment_notification", "allow_reviewer_reassignment", "allow_reviewers_to_reduce_expiration", "start_date", "end_date", "timezone", "revoke_on", "reminder_schedule", "reminder_include_manager", "require_reason_on_denial", "auto_stop_when_complete", "hide_ai_suggestions", "custom_start_message", "group_asset_visibility_policy", "is_template", "cron_expression", "recurring_duration_days", "excluded_role_assignment_ids"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateCampaignConfigurationInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of query + if self.query: + _dict['query'] = self.query.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateCampaignConfigurationInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "query": OpalAccessPathQueryBody.from_dict(obj["query"]) if obj.get("query") is not None else None, + "reviewer_assignment_policy": obj.get("reviewer_assignment_policy"), + "allow_self_review": obj.get("allow_self_review"), + "send_reviewer_assignment_notification": obj.get("send_reviewer_assignment_notification"), + "allow_reviewer_reassignment": obj.get("allow_reviewer_reassignment"), + "allow_reviewers_to_reduce_expiration": obj.get("allow_reviewers_to_reduce_expiration"), + "start_date": obj.get("start_date"), + "end_date": obj.get("end_date"), + "timezone": obj.get("timezone"), + "revoke_on": obj.get("revoke_on"), + "reminder_schedule": obj.get("reminder_schedule"), + "reminder_include_manager": obj.get("reminder_include_manager"), + "require_reason_on_denial": obj.get("require_reason_on_denial"), + "auto_stop_when_complete": obj.get("auto_stop_when_complete"), + "hide_ai_suggestions": obj.get("hide_ai_suggestions"), + "custom_start_message": obj.get("custom_start_message"), + "group_asset_visibility_policy": obj.get("group_asset_visibility_policy"), + "is_template": obj.get("is_template"), + "cron_expression": obj.get("cron_expression"), + "recurring_duration_days": obj.get("recurring_duration_days"), + "excluded_role_assignment_ids": obj.get("excluded_role_assignment_ids") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/create_campaign_info.py b/opal_security/models/create_campaign_info.py new file mode 100644 index 0000000..ac3bc43 --- /dev/null +++ b/opal_security/models/create_campaign_info.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from opal_security.models.create_campaign_configuration_info import CreateCampaignConfigurationInfo +from typing import Optional, Set +from typing_extensions import Self + +class CreateCampaignInfo(BaseModel): + """ + # CreateCampaignInfo Object ### Description The `CreateCampaignInfo` object is used to create a campaign. ### Usage Example Use in the `POST Campaigns` endpoint. + """ # noqa: E501 + name: StrictStr = Field(description="The name of the campaign.") + configuration: CreateCampaignConfigurationInfo = Field(description="Configuration for the campaign. Required; must include a query. Other omitted fields use defaults.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "configuration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateCampaignInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of configuration + if self.configuration: + _dict['configuration'] = self.configuration.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateCampaignInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "configuration": CreateCampaignConfigurationInfo.from_dict(obj["configuration"]) if obj.get("configuration") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/create_configuration_template_info.py b/opal_security/models/create_configuration_template_info.py index a72387b..7ae77d5 100644 --- a/opal_security/models/create_configuration_template_info.py +++ b/opal_security/models/create_configuration_template_info.py @@ -40,13 +40,14 @@ class CreateConfigurationTemplateInfo(BaseModel): break_glass_user_ids: Optional[List[UUID]] = Field(default=None, description="The IDs of the break glass users linked to the configuration template.") require_mfa_to_approve: StrictBool = Field(description="A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template.") require_mfa_to_connect: StrictBool = Field(description="A bool representing whether or not to require MFA to connect to resources associated with this configuration template.") + requires_forfeit_reason: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not a reason is required when forfeiting access to resources or groups using this configuration template.") name: StrictStr = Field(description="The name of the configuration template.") request_configurations: Optional[List[RequestConfiguration]] = Field(default=None, description="The request configuration list of the configuration template. If not provided, the default request configuration will be used.") request_configuration_list: Optional[CreateRequestConfigurationInfoList] = Field(default=None, description="The request configuration list of the configuration template. If not provided, the default request configuration will be used. Deprecated in favor of `request_configurations`.") ticket_propagation: Optional[TicketPropagationConfiguration] = None custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent upon request approval for this configuration template.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["admin_owner_id", "visibility", "linked_audit_message_channel_ids", "member_oncall_schedule_ids", "break_glass_user_ids", "require_mfa_to_approve", "require_mfa_to_connect", "name", "request_configurations", "request_configuration_list", "ticket_propagation", "custom_request_notification"] + __properties: ClassVar[List[str]] = ["admin_owner_id", "visibility", "linked_audit_message_channel_ids", "member_oncall_schedule_ids", "break_glass_user_ids", "require_mfa_to_approve", "require_mfa_to_connect", "requires_forfeit_reason", "name", "request_configurations", "request_configuration_list", "ticket_propagation", "custom_request_notification"] model_config = ConfigDict( populate_by_name=True, @@ -129,6 +130,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "break_glass_user_ids": obj.get("break_glass_user_ids"), "require_mfa_to_approve": obj.get("require_mfa_to_approve"), "require_mfa_to_connect": obj.get("require_mfa_to_connect"), + "requires_forfeit_reason": obj.get("requires_forfeit_reason"), "name": obj.get("name"), "request_configurations": [RequestConfiguration.from_dict(_item) for _item in obj["request_configurations"]] if obj.get("request_configurations") is not None else None, "request_configuration_list": CreateRequestConfigurationInfoList.from_dict(obj["request_configuration_list"]) if obj.get("request_configuration_list") is not None else None, diff --git a/opal_security/models/create_custom_connector_info.py b/opal_security/models/create_custom_connector_info.py new file mode 100644 index 0000000..820ae64 --- /dev/null +++ b/opal_security/models/create_custom_connector_info.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.custom_connector_idp_protocol_enum import CustomConnectorIdpProtocolEnum +from typing import Optional, Set +from typing_extensions import Self + +class CreateCustomConnectorInfo(BaseModel): + """ + Information needed to create a Custom Connector app. + """ # noqa: E501 + identifier: StrictStr = Field(description="The identifier of the Custom Connector.") + base_url: StrictStr = Field(description="The base URL of the Custom Connector.") + signing_secret: StrictStr = Field(description="The signing secret used to authenticate requests to the Custom Connector. Write-only; never returned by the API.") + tls_mode: Optional[StrictBool] = Field(default=None, description="Whether TLS verification is enabled. Defaults to `true` when omitted.") + tls_ca_cert_content: Optional[StrictStr] = Field(default=None, description="Optional PEM-encoded CA certificate content for TLS.") + supports_groups: Optional[StrictBool] = Field(default=None, description="Whether the Custom Connector supports groups. Defaults to `false`.") + supports_nested_resources: Optional[StrictBool] = Field(default=None, description="Whether the Custom Connector supports nested resources. Defaults to `false`.") + supports_nested_groups: Optional[StrictBool] = Field(default=None, description="Whether the Custom Connector supports nested groups. Defaults to `false`.") + supports_event_ingestion: Optional[StrictBool] = Field(default=None, description="Whether the Custom Connector supports event ingestion. Defaults to `false`.") + supports_idp: Optional[StrictBool] = Field(default=None, description="Whether the Custom Connector can be connected as an upstream user directory. Defaults to `false`.") + idp_protocol: Optional[CustomConnectorIdpProtocolEnum] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "base_url", "signing_secret", "tls_mode", "tls_ca_cert_content", "supports_groups", "supports_nested_resources", "supports_nested_groups", "supports_event_ingestion", "supports_idp", "idp_protocol"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateCustomConnectorInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateCustomConnectorInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "base_url": obj.get("base_url"), + "signing_secret": obj.get("signing_secret"), + "tls_mode": obj.get("tls_mode"), + "tls_ca_cert_content": obj.get("tls_ca_cert_content"), + "supports_groups": obj.get("supports_groups"), + "supports_nested_resources": obj.get("supports_nested_resources"), + "supports_nested_groups": obj.get("supports_nested_groups"), + "supports_event_ingestion": obj.get("supports_event_ingestion"), + "supports_idp": obj.get("supports_idp"), + "idp_protocol": obj.get("idp_protocol") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/create_group_info.py b/opal_security/models/create_group_info.py index cd7480a..2e1659c 100644 --- a/opal_security/models/create_group_info.py +++ b/opal_security/models/create_group_info.py @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from uuid import UUID @@ -40,9 +40,16 @@ class CreateGroupInfo(BaseModel): remote_group_id: Optional[StrictStr] = Field(default=None, description="Deprecated - use remote_info instead. The ID of the group on the remote system. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field.") metadata: Optional[StrictStr] = Field(default=None, description="Deprecated - use remote_info instead. JSON metadata about the remote group. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field. The required format is dependent on group_type and should have the following schema: ```json { \"$schema\": \"http://json-schema.org/draft-04/schema#\", \"title\": \"Group Metadata\", \"properties\": { \"ad_group\": { \"properties\": { \"object_guid\": { \"type\": \"string\" } }, \"required\": [\"object_guid\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Active Directory Group\" }, \"duo_group\": { \"properties\": { \"group_id\": { \"type\": \"string\" } }, \"required\": [\"group_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Duo Group\" }, \"git_hub_team\": { \"properties\": { \"org_name\": { \"type\": \"string\" }, \"team_slug\": { \"type\": \"string\" } }, \"required\": [\"org_name\", \"team_slug\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GitHub Team\" }, \"google_groups_group\": { \"properties\": { \"group_id\": { \"type\": \"string\" } }, \"required\": [\"group_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Google Groups Group\" }, \"ldap_group\": { \"properties\": { \"group_uid\": { \"type\": \"string\" } }, \"required\": [\"group_uid\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"LDAP Group\" }, \"okta_directory_group\": { \"properties\": { \"group_id\": { \"type\": \"string\" } }, \"required\": [\"group_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Okta Directory Group\" } }, \"additionalProperties\": false, \"minProperties\": 1, \"maxProperties\": 1, \"type\": \"object\" } ```") custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent upon request approval.") + max_direct_users_allowed: Optional[StrictInt] = Field(default=None, description="The maximum number of direct users allowed for this group at once. Set to null to remove the limit.") risk_sensitivity_override: Optional[RiskSensitivityEnum] = None + match_remote_name: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not the group's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. Defaults to false.") + match_remote_description: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not the group's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. Defaults to false.") + requires_forfeit_reason: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not a reason is required when forfeiting access to this group.") + handle: Optional[StrictStr] = Field(default=None, description="Slack user group mention name, without the @. Optional; Slack assigns one if omitted.") + team_id: Optional[StrictStr] = Field(default=None, description="Slack workspace ID. Required when the Slack connection spans multiple workspaces.") + initial_user_ids: Optional[List[UUID]] = Field(default=None, description="Opal user IDs to add as the group's initial members. Required when creating a Slack user group.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["name", "description", "group_type", "app_id", "remote_info", "remote_group_id", "metadata", "custom_request_notification", "risk_sensitivity_override"] + __properties: ClassVar[List[str]] = ["name", "description", "group_type", "app_id", "remote_info", "remote_group_id", "metadata", "custom_request_notification", "max_direct_users_allowed", "risk_sensitivity_override", "match_remote_name", "match_remote_description", "requires_forfeit_reason", "handle", "team_id", "initial_user_ids"] model_config = ConfigDict( populate_by_name=True, @@ -113,7 +120,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "remote_group_id": obj.get("remote_group_id"), "metadata": obj.get("metadata"), "custom_request_notification": obj.get("custom_request_notification"), - "risk_sensitivity_override": obj.get("risk_sensitivity_override") + "max_direct_users_allowed": obj.get("max_direct_users_allowed"), + "risk_sensitivity_override": obj.get("risk_sensitivity_override"), + "match_remote_name": obj.get("match_remote_name"), + "match_remote_description": obj.get("match_remote_description"), + "requires_forfeit_reason": obj.get("requires_forfeit_reason"), + "handle": obj.get("handle"), + "team_id": obj.get("team_id"), + "initial_user_ids": obj.get("initial_user_ids") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal_security/models/create_opal_script_info.py b/opal_security/models/create_opal_script_info.py new file mode 100644 index 0000000..8560f21 --- /dev/null +++ b/opal_security/models/create_opal_script_info.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.opal_script_type_enum import OpalScriptTypeEnum +from typing import Optional, Set +from typing_extensions import Self + +class CreateOpalScriptInfo(BaseModel): + """ + Information for creating an OpalScript. + """ # noqa: E501 + name: StrictStr = Field(description="The name of the OpalScript.") + script_type: OpalScriptTypeEnum + script: StrictStr = Field(description="The source of the OpalScript.") + owner_id: Optional[UUID] = Field(default=None, description="The owner of the service user Opal provisions for a `REQUEST_REVIEW` script. Required for that script type and ignored for the others, which have no reviewer identity.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "script_type", "script", "owner_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateOpalScriptInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateOpalScriptInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "script_type": obj.get("script_type"), + "script": obj.get("script"), + "owner_id": obj.get("owner_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/create_paladin_context_source_info.py b/opal_security/models/create_paladin_context_source_info.py new file mode 100644 index 0000000..5770ed1 --- /dev/null +++ b/opal_security/models/create_paladin_context_source_info.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.paladin_context_source_kind import PaladinContextSourceKind +from opal_security.models.paladin_context_source_provider import PaladinContextSourceProvider +from typing import Optional, Set +from typing_extensions import Self + +class CreatePaladinContextSourceInfo(BaseModel): + """ + Information for adding a context source to a Paladin. + """ # noqa: E501 + source_kind: PaladinContextSourceKind + third_party_provider: PaladinContextSourceProvider + remote_id: StrictStr = Field(description="The provider's identifier for the source. The Slack channel ID for a channel, or the Notion/Confluence page ID or numeric Freshservice article ID for a document.") + name: Optional[StrictStr] = Field(default=None, description="An optional human-readable name for the source.") + url: Optional[StrictStr] = Field(default=None, description="An optional link to the source.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["source_kind", "third_party_provider", "remote_id", "name", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreatePaladinContextSourceInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreatePaladinContextSourceInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "source_kind": obj.get("source_kind"), + "third_party_provider": obj.get("third_party_provider"), + "remote_id": obj.get("remote_id"), + "name": obj.get("name"), + "url": obj.get("url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/create_paladin_info.py b/opal_security/models/create_paladin_info.py new file mode 100644 index 0000000..3b982e6 --- /dev/null +++ b/opal_security/models/create_paladin_info.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.paladin_connector import PaladinConnector +from typing import Optional, Set +from typing_extensions import Self + +class CreatePaladinInfo(BaseModel): + """ + Information for creating a Paladin. + """ # noqa: E501 + name: StrictStr = Field(description="The name of the Paladin.") + owner_id: UUID = Field(description="The ID of the owner of the Paladin.") + monitor_mode: Optional[StrictBool] = Field(default=True, description="When true, the Paladin reasons about requests but takes no action. Defaults to true.") + admin_view_only: Optional[StrictBool] = Field(default=False, description="When true, recommendations are visible only to admins. Only meaningful when monitor_mode is true. Defaults to false.") + enabled_connectors: Optional[List[PaladinConnector]] = Field(default=None, description="The connectors the Paladin is allowed to use.") + instructions: Optional[StrictStr] = Field(default=None, description="The free-form instructions that guide the Paladin's decisions. Optional; if omitted the Paladin is created without instructions.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "owner_id", "monitor_mode", "admin_view_only", "enabled_connectors", "instructions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreatePaladinInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreatePaladinInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "owner_id": obj.get("owner_id"), + "monitor_mode": obj.get("monitor_mode") if obj.get("monitor_mode") is not None else True, + "admin_view_only": obj.get("admin_view_only") if obj.get("admin_view_only") is not None else False, + "enabled_connectors": obj.get("enabled_connectors"), + "instructions": obj.get("instructions") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/create_request_comment_request.py b/opal_security/models/create_request_comment_request.py index 8bab463..36bc51c 100644 --- a/opal_security/models/create_request_comment_request.py +++ b/opal_security/models/create_request_comment_request.py @@ -19,7 +19,8 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID from typing import Optional, Set from typing_extensions import Self @@ -27,9 +28,10 @@ class CreateRequestCommentRequest(BaseModel): """ CreateRequestCommentRequest """ # noqa: E501 + acting_user_id: Optional[UUID] = Field(default=None, description="Comment as this Opal user instead of the caller. Only for service users an admin has allowed to act for users, in organizations with the feature enabled. The user must be active in the identity provider and be the request's requester, target or initiated_by user, an admin, or a reviewer who can act on or has acted on the request.") comment: StrictStr = Field(description="comment") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["comment"] + __properties: ClassVar[List[str]] = ["acting_user_id", "comment"] model_config = ConfigDict( populate_by_name=True, @@ -89,6 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "acting_user_id": obj.get("acting_user_id"), "comment": obj.get("comment") }) # store additional fields in additional_properties diff --git a/opal_security/models/create_request_info.py b/opal_security/models/create_request_info.py index a004d06..ae60245 100644 --- a/opal_security/models/create_request_info.py +++ b/opal_security/models/create_request_info.py @@ -37,12 +37,13 @@ class CreateRequestInfo(BaseModel): groups: List[CreateRequestInfoGroupsInner] target_user_id: Optional[UUID] = Field(default=None, description="The ID of the user to be granted access. Should not be specified if target_group_id is specified.") target_group_id: Optional[UUID] = Field(default=None, description="The ID of the group the request is for. Should not be specified if target_user_id is specified.") + initiated_by_user_id: Optional[UUID] = Field(default=None, description="The ID of the user who asked for this access, for callers filing a request on someone else's behalf. Opal records this claim as given and does not verify it, so it never affects authorization, reviewer routing, or who may cancel the request; the authenticated caller remains the requester. Must be a user of your organization. Only accepted from a service user for which an Opal admin has enabled \"Let this service user record who asked for access\" under Settings on the service user's page; any other caller receives a 403 when this field is set.") reason: StrictStr support_ticket: Optional[CreateRequestInfoSupportTicket] = None duration_minutes: Annotated[int, Field(strict=True, ge=-1)] = Field(description="The duration of the request in minutes. -1 represents an indefinite duration") custom_metadata: Optional[List[CreateRequestInfoCustomMetadataInner]] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["resources", "groups", "target_user_id", "target_group_id", "reason", "support_ticket", "duration_minutes", "custom_metadata"] + __properties: ClassVar[List[str]] = ["resources", "groups", "target_user_id", "target_group_id", "initiated_by_user_id", "reason", "support_ticket", "duration_minutes", "custom_metadata"] model_config = ConfigDict( populate_by_name=True, @@ -130,6 +131,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "groups": [CreateRequestInfoGroupsInner.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None, "target_user_id": obj.get("target_user_id"), "target_group_id": obj.get("target_group_id"), + "initiated_by_user_id": obj.get("initiated_by_user_id"), "reason": obj.get("reason"), "support_ticket": CreateRequestInfoSupportTicket.from_dict(obj["support_ticket"]) if obj.get("support_ticket") is not None else None, "duration_minutes": obj.get("duration_minutes"), diff --git a/opal_security/models/create_request_template_info.py b/opal_security/models/create_request_template_info.py new file mode 100644 index 0000000..0c2bf79 --- /dev/null +++ b/opal_security/models/create_request_template_info.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.request_template_custom_field_input import RequestTemplateCustomFieldInput +from typing import Optional, Set +from typing_extensions import Self + +class CreateRequestTemplateInfo(BaseModel): + """ + Information for creating a request template. + """ # noqa: E501 + name: StrictStr = Field(description="The name of the request template.") + custom_fields: Optional[List[RequestTemplateCustomFieldInput]] = Field(default=None, description="The fields to put on the template, in the order they are shown.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "custom_fields"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateRequestTemplateInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) + _items = [] + if self.custom_fields: + for _item_custom_fields in self.custom_fields: + if _item_custom_fields: + _items.append(_item_custom_fields.to_dict()) + _dict['custom_fields'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateRequestTemplateInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "custom_fields": [RequestTemplateCustomFieldInput.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/create_resource_custom_access_level_info.py b/opal_security/models/create_resource_custom_access_level_info.py new file mode 100644 index 0000000..f27c5a0 --- /dev/null +++ b/opal_security/models/create_resource_custom_access_level_info.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.resource_access_level import ResourceAccessLevel +from typing import Optional, Set +from typing_extensions import Self + +class CreateResourceCustomAccessLevelInfo(BaseModel): + """ + Info for creating a custom access level. + """ # noqa: E501 + access_level: ResourceAccessLevel + policy: Optional[StrictStr] = Field(default=None, description="The policy document.") + requestable_by_default: Optional[StrictBool] = Field(default=None, description="Whether the role is requestable. Defaults to false.") + stackable_sensitivity_index: Optional[StrictInt] = Field(default=None, description="The sensitivity index. Null to leave unranked.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["access_level", "policy", "requestable_by_default", "stackable_sensitivity_index"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateResourceCustomAccessLevelInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of access_level + if self.access_level: + _dict['access_level'] = self.access_level.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateResourceCustomAccessLevelInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "access_level": ResourceAccessLevel.from_dict(obj["access_level"]) if obj.get("access_level") is not None else None, + "policy": obj.get("policy"), + "requestable_by_default": obj.get("requestable_by_default"), + "stackable_sensitivity_index": obj.get("stackable_sensitivity_index") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/create_resource_info.py b/opal_security/models/create_resource_info.py index 4d8c535..38e174e 100644 --- a/opal_security/models/create_resource_info.py +++ b/opal_security/models/create_resource_info.py @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from uuid import UUID @@ -40,9 +40,13 @@ class CreateResourceInfo(BaseModel): remote_resource_id: Optional[StrictStr] = Field(default=None, description="Deprecated - use remote_info instead. The ID of the resource on the remote system. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field.") metadata: Optional[StrictStr] = Field(default=None, description="Deprecated - use remote_info instead. JSON metadata about the remote resource. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field. The required format is dependent on resource_type and should have the following schema: ```json { \"$schema\": \"http://json-schema.org/draft-04/schema#\", \"title\": \"Resource Metadata\", \"properties\": { \"aws_ec2_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"region\": { \"type\": \"string\" } }, \"required\": [\"instance_id\", \"region\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS EC2 Instance\" }, \"aws_eks_cluster\": { \"properties\": { \"cluster_name\": { \"type\": \"string\" }, \"cluster_region\": { \"type\": \"string\" }, \"cluster_arn\": { \"type\": \"string\" } }, \"required\": [\"cluster_name\", \"cluster_region\", \"cluster_arn\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS EKS Cluster\" }, \"aws_rds_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"engine\": { \"type\": \"string\" }, \"region\": { \"type\": \"string\" }, \"resource_id\": { \"type\": \"string\" }, \"database_name\": { \"type\": \"string\" } }, \"required\": [ \"instance_id\", \"engine\", \"region\", \"resource_id\", \"database_name\" ], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS RDS Instance\" }, \"aws_role\": { \"properties\": { \"arn\": { \"type\": \"string\" }, \"name\": { \"type\": \"string\" } }, \"required\": [\"arn\", \"name\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS Role\" }, \"gcp_bucket\": { \"properties\": { \"bucket_id\": { \"type\": \"string\" } }, \"required\": [\"bucket_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Bucket\" }, \"gcp_compute_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"project_id\": { \"type\": \"string\" }, \"zone\": { \"type\": \"string\" } }, \"required\": [\"instance_id\", \"project_id\", \"zone\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Compute Instance\" }, \"gcp_folder\": { \"properties\": { \"folder_id\": { \"type\": \"string\" } }, \"required\": [\"folder_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Folder\" }, \"gcp_gke_cluster\": { \"properties\": { \"cluster_name\": { \"type\": \"string\" } }, \"required\": [\"cluster_name\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP GKE Cluster\" }, \"gcp_project\": { \"properties\": { \"project_id\": { \"type\": \"string\" } }, \"required\": [\"project_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Project\" }, \"gcp_sql_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"project_id\": { \"type\": \"string\" } }, \"required\": [\"instance_id\", \"project_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP SQL Instance\" }, \"git_hub_repo\": { \"properties\": { \"org_name\": { \"type\": \"string\" }, \"repo_name\": { \"type\": \"string\" } }, \"required\": [\"org_name\", \"repo_name\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GitHub Repo\" }, \"okta_directory_app\": { \"properties\": { \"app_id\": { \"type\": \"string\" }, \"logo_url\": { \"type\": \"string\" } }, \"required\": [\"app_id\", \"logo_url\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Okta Directory App\" }, \"okta_directory_role\": { \"properties\": { \"role_type\": { \"type\": \"string\" }, \"role_id\": { \"type\": \"string\" } }, \"required\": [\"role_type\", \"role_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Okta Directory Role\" }, \"salesforce_profile\": { \"properties\": { \"user_license\": { \"type\": \"string\" } }, \"required\": [\"user_license\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Salesforce Profile\" } }, \"additionalProperties\": false, \"minProperties\": 1, \"maxProperties\": 1, \"type\": \"object\" } ```") custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent upon request approval.") + max_direct_users_allowed: Optional[StrictInt] = Field(default=None, description="The maximum number of direct users allowed for this resource at once. Set to null to remove the limit.") risk_sensitivity_override: Optional[RiskSensitivityEnum] = None + match_remote_name: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not the resource's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. Defaults to false.") + match_remote_description: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not the resource's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. Defaults to false.") + requires_forfeit_reason: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not a reason is required when forfeiting access to this resource.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["name", "description", "resource_type", "app_id", "remote_info", "remote_resource_id", "metadata", "custom_request_notification", "risk_sensitivity_override"] + __properties: ClassVar[List[str]] = ["name", "description", "resource_type", "app_id", "remote_info", "remote_resource_id", "metadata", "custom_request_notification", "max_direct_users_allowed", "risk_sensitivity_override", "match_remote_name", "match_remote_description", "requires_forfeit_reason"] model_config = ConfigDict( populate_by_name=True, @@ -113,7 +117,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "remote_resource_id": obj.get("remote_resource_id"), "metadata": obj.get("metadata"), "custom_request_notification": obj.get("custom_request_notification"), - "risk_sensitivity_override": obj.get("risk_sensitivity_override") + "max_direct_users_allowed": obj.get("max_direct_users_allowed"), + "risk_sensitivity_override": obj.get("risk_sensitivity_override"), + "match_remote_name": obj.get("match_remote_name"), + "match_remote_description": obj.get("match_remote_description"), + "requires_forfeit_reason": obj.get("requires_forfeit_reason") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal_security/models/create_service_user_request.py b/opal_security/models/create_service_user_request.py new file mode 100644 index 0000000..0c6a85a --- /dev/null +++ b/opal_security/models/create_service_user_request.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from uuid import UUID +from typing import Optional, Set +from typing_extensions import Self + +class CreateServiceUserRequest(BaseModel): + """ + Request body for `POST /service-users`. Intentionally minimal: only the two fields that uniquely identify a new service user. Role grants are a separate resource managed through `/role-assignments`, which keeps each grant independently addressable and avoids silent drift when grants are added or revoked through another code path. + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The display name of the service user.") + owner_id: UUID = Field(description="The ID of the owner (team of record) that owns the service user. Must reference an existing owner in the caller's organization.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "owner_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateServiceUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateServiceUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "owner_id": obj.get("owner_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/create_token_info.py b/opal_security/models/create_token_info.py new file mode 100644 index 0000000..2434a2f --- /dev/null +++ b/opal_security/models/create_token_info.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.api_access_level_enum import ApiAccessLevelEnum +from typing import Optional, Set +from typing_extensions import Self + +class CreateTokenInfo(BaseModel): + """ + Information needed to create a first-party API token. + """ # noqa: E501 + token_label: StrictStr = Field(description="A human-readable label for the token.") + access_level: ApiAccessLevelEnum + user_id: Optional[UUID] = Field(default=None, description="The ID of the user the token should authenticate as. Omit or set to the caller's ID to create a personal token. Set to a service user's ID to mint a token for that service user. ") + expires_at: Optional[datetime] = Field(default=None, description="Optional expiration time for the token.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["token_label", "access_level", "user_id", "expires_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateTokenInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateTokenInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token_label": obj.get("token_label"), + "access_level": obj.get("access_level"), + "user_id": obj.get("user_id"), + "expires_at": obj.get("expires_at") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/create_token_response.py b/opal_security/models/create_token_response.py new file mode 100644 index 0000000..4e8d2a5 --- /dev/null +++ b/opal_security/models/create_token_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from opal_security.models.token import Token +from typing import Optional, Set +from typing_extensions import Self + +class CreateTokenResponse(BaseModel): + """ + The created API token. `signed_token` is the secret credential and is only returned once at creation time. + """ # noqa: E501 + token: Token + signed_token: StrictStr = Field(description="The secret token string. Store this securely; it is only returned once at creation time. ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["token", "signed_token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateTokenResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of token + if self.token: + _dict['token'] = self.token.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateTokenResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": Token.from_dict(obj["token"]) if obj.get("token") is not None else None, + "signed_token": obj.get("signed_token") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/custom_connector_app_config.py b/opal_security/models/custom_connector_app_config.py new file mode 100644 index 0000000..11624c6 --- /dev/null +++ b/opal_security/models/custom_connector_app_config.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.custom_connector_idp_protocol_enum import CustomConnectorIdpProtocolEnum +from typing import Optional, Set +from typing_extensions import Self + +class CustomConnectorAppConfig(BaseModel): + """ + Configuration for a Custom Connector app. Does not include the signing secret; secrets are write-only and never returned by the API. + """ # noqa: E501 + identifier: StrictStr = Field(description="The identifier of the Custom Connector.") + base_url: StrictStr = Field(description="The base URL of the Custom Connector.") + tls_mode: StrictBool = Field(description="Whether TLS verification is enabled for the Custom Connector.") + tls_ca_cert_content: Optional[StrictStr] = Field(default=None, description="Optional PEM-encoded CA certificate content for TLS.") + supports_groups: StrictBool = Field(description="Whether the Custom Connector supports groups.") + supports_nested_resources: StrictBool = Field(description="Whether the Custom Connector supports nested resources.") + supports_nested_groups: StrictBool = Field(description="Whether the Custom Connector supports nested groups.") + supports_event_ingestion: StrictBool = Field(description="Whether the Custom Connector supports event ingestion.") + supports_idp: StrictBool = Field(description="Whether the Custom Connector can be connected as an upstream user directory.") + idp_protocol: CustomConnectorIdpProtocolEnum + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "base_url", "tls_mode", "tls_ca_cert_content", "supports_groups", "supports_nested_resources", "supports_nested_groups", "supports_event_ingestion", "supports_idp", "idp_protocol"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CustomConnectorAppConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CustomConnectorAppConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "base_url": obj.get("base_url"), + "tls_mode": obj.get("tls_mode"), + "tls_ca_cert_content": obj.get("tls_ca_cert_content"), + "supports_groups": obj.get("supports_groups"), + "supports_nested_resources": obj.get("supports_nested_resources"), + "supports_nested_groups": obj.get("supports_nested_groups"), + "supports_event_ingestion": obj.get("supports_event_ingestion"), + "supports_idp": obj.get("supports_idp"), + "idp_protocol": obj.get("idp_protocol") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/custom_connector_idp_protocol_enum.py b/opal_security/models/custom_connector_idp_protocol_enum.py new file mode 100644 index 0000000..79fc264 --- /dev/null +++ b/opal_security/models/custom_connector_idp_protocol_enum.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CustomConnectorIdpProtocolEnum(str, Enum): + """ + How Opal reads users from the Custom Connector when it is an upstream directory: `OPAL` for Opal's custom connector API, or `SCIM` for a SCIM 2.0 server, authenticated with the signing secret as a bearer token. Defaults to `OPAL`. + """ + + """ + allowed enum values + """ + OPAL = 'OPAL' + SCIM = 'SCIM' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CustomConnectorIdpProtocolEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/deny_request_request.py b/opal_security/models/deny_request_request.py index 0165586..88be373 100644 --- a/opal_security/models/deny_request_request.py +++ b/opal_security/models/deny_request_request.py @@ -20,6 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID from opal_security.models.request_approval_enum import RequestApprovalEnum from typing import Optional, Set from typing_extensions import Self @@ -28,10 +29,11 @@ class DenyRequestRequest(BaseModel): """ DenyRequestRequest """ # noqa: E501 + acting_user_id: Optional[UUID] = Field(default=None, description="Deny as this Opal user instead of the caller. Only for service users an admin has allowed to act for users, in organizations with the feature enabled. The user must be active in the identity provider and be a reviewer on the request's current stage and not the request's target; the decision counts as theirs. ADMIN level is rejected.") comment: StrictStr = Field(description="Comment for the denial") level: Optional[RequestApprovalEnum] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["comment", "level"] + __properties: ClassVar[List[str]] = ["acting_user_id", "comment", "level"] model_config = ConfigDict( populate_by_name=True, @@ -91,6 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "acting_user_id": obj.get("acting_user_id"), "comment": obj.get("comment"), "level": obj.get("level") }) diff --git a/opal_security/models/entity_admin_filter.py b/opal_security/models/entity_admin_filter.py new file mode 100644 index 0000000..17d291f --- /dev/null +++ b/opal_security/models/entity_admin_filter.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from typing import Optional, Set +from typing_extensions import Self + +class EntityAdminFilter(BaseModel): + """ + Filters GROUP and RESOURCE entities by their admin owner. USER entities never match, in either polarity. `not` inverts the match within the resource/group domain (self-negating, like IdpStatusFilter): omit it (or false) to include entities owned by the given owners, set it true to exclude them. + """ # noqa: E501 + owner_ids: List[UUID] = Field(description="The owner (group) UUIDs to match entities against.", alias="ownerIDs") + var_not: Optional[StrictBool] = Field(default=None, description="Invert the match — return resources/groups NOT owned by the given owners.", alias="not") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ownerIDs", "not"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EntityAdminFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EntityAdminFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ownerIDs": obj.get("ownerIDs"), + "not": obj.get("not") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/entity_description_filter.py b/opal_security/models/entity_description_filter.py new file mode 100644 index 0000000..496e021 --- /dev/null +++ b/opal_security/models/entity_description_filter.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EntityDescriptionFilter(BaseModel): + """ + Filters GROUP and RESOURCE entities by a case-insensitive substring of their description (\"contains\"). USER entities have no description and never match, in either polarity. `not` inverts the match within the resource/group domain (\"does NOT contain\"), so it still returns only resources/groups rather than sweeping in users. + """ # noqa: E501 + string: StrictStr = Field(description="The substring to match against the entity description.") + var_not: Optional[StrictBool] = Field(default=None, description="Invert the match — return resources/groups whose description does NOT contain the substring.", alias="not") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["string", "not"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EntityDescriptionFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EntityDescriptionFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "string": obj.get("string"), + "not": obj.get("not") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/entity_item_type_enum.py b/opal_security/models/entity_item_type_enum.py index 417c0a9..03afc57 100644 --- a/opal_security/models/entity_item_type_enum.py +++ b/opal_security/models/entity_item_type_enum.py @@ -59,6 +59,9 @@ class EntityItemTypeEnum(str, Enum): AWS_RDS_MYSQL_CLUSTER = 'AWS_RDS_MYSQL_CLUSTER' AWS_ACCOUNT = 'AWS_ACCOUNT' AWS_SSO_PERMISSION_SET = 'AWS_SSO_PERMISSION_SET' + AWS_AGENTCORE_GATEWAY = 'AWS_AGENTCORE_GATEWAY' + AWS_AGENTCORE_GATEWAY_TARGET = 'AWS_AGENTCORE_GATEWAY_TARGET' + AWS_AGENTCORE_GATEWAY_TOOL = 'AWS_AGENTCORE_GATEWAY_TOOL' AZURE_MANAGEMENT_GROUP = 'AZURE_MANAGEMENT_GROUP' AZURE_RESOURCE_GROUP = 'AZURE_RESOURCE_GROUP' AZURE_SUBSCRIPTION = 'AZURE_SUBSCRIPTION' @@ -85,6 +88,7 @@ class EntityItemTypeEnum(str, Enum): GCP_CLOUD_SQL_POSTGRES_INSTANCE = 'GCP_CLOUD_SQL_POSTGRES_INSTANCE' GCP_CLOUD_SQL_MYSQL_INSTANCE = 'GCP_CLOUD_SQL_MYSQL_INSTANCE' GCP_SERVICE_ACCOUNT = 'GCP_SERVICE_ACCOUNT' + GCP_BILLING_ACCOUNT = 'GCP_BILLING_ACCOUNT' GIT_HUB_REPO = 'GIT_HUB_REPO' GIT_HUB_ORG_ROLE = 'GIT_HUB_ORG_ROLE' GIT_LAB_PROJECT = 'GIT_LAB_PROJECT' @@ -111,6 +115,13 @@ class EntityItemTypeEnum(str, Enum): TELEPORT_ROLE = 'TELEPORT_ROLE' DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL = 'DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL' ILEVEL_ADVANCED_ROLE = 'ILEVEL_ADVANCED_ROLE' + DATABRICKS_CATALOG = 'DATABRICKS_CATALOG' + DATABRICKS_SCHEMA = 'DATABRICKS_SCHEMA' + DATABRICKS_VOLUME = 'DATABRICKS_VOLUME' + DATABRICKS_FUNCTION = 'DATABRICKS_FUNCTION' + DATABRICKS_MODEL = 'DATABRICKS_MODEL' + DATABRICKS_SERVICE = 'DATABRICKS_SERVICE' + DATABRICKS_MCP_SERVER = 'DATABRICKS_MCP_SERVER' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/opal_security/models/entity_tag_filter.py b/opal_security/models/entity_tag_filter.py index a2716e4..5b7e0d3 100644 --- a/opal_security/models/entity_tag_filter.py +++ b/opal_security/models/entity_tag_filter.py @@ -29,7 +29,7 @@ class EntityTagFilter(BaseModel): Filters entities by a tag key/value pair, optionally scoped to a connection. """ # noqa: E501 key: StrictStr = Field(description="The tag key to filter by.") - value: Optional[StrictStr] = Field(default=None, description="The tag value to filter by. If omitted, matches any value for the given key.") + value: Optional[StrictStr] = Field(default=None, description="The tag value to filter by. If omitted, matches only tags with no value; use entityTagKey to match any value for a key.") connection_id: Optional[UUID] = Field(default=None, description="If specified, filters by tags associated with this connection.", alias="connectionId") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["key", "value", "connectionId"] diff --git a/opal_security/models/entity_tag_key_filter.py b/opal_security/models/entity_tag_key_filter.py new file mode 100644 index 0000000..4546596 --- /dev/null +++ b/opal_security/models/entity_tag_key_filter.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class EntityTagKeyFilter(BaseModel): + """ + Filters entities that have a tag whose key is one of `keys`, whatever its value (including no value). Keys match exactly and case-sensitively. An empty list matches nothing. AGENT entities carry no tags, so they never match; under `not`, every agent matches, as with entityTag. + """ # noqa: E501 + keys: List[StrictStr] = Field(description="The tag keys to match.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["keys"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EntityTagKeyFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EntityTagKeyFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "keys": obj.get("keys") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/escalate_request200_response.py b/opal_security/models/escalate_request200_response.py new file mode 100644 index 0000000..1f7ad50 --- /dev/null +++ b/opal_security/models/escalate_request200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class EscalateRequest200Response(BaseModel): + """ + EscalateRequest200Response + """ # noqa: E501 + success: StrictBool + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EscalateRequest200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EscalateRequest200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group.py b/opal_security/models/group.py index 9e734d1..4ef047d 100644 --- a/opal_security/models/group.py +++ b/opal_security/models/group.py @@ -49,22 +49,26 @@ class Group(BaseModel): require_manager_approval: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not access requests to the group require manager approval.") require_support_ticket: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not access requests to the group require an access ticket.") require_mfa_to_approve: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA for reviewers to approve requests for this group.") + requires_forfeit_reason: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not a reason is required when forfeiting access to this group.") require_mfa_to_request: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA for requesting access to this group.") auto_approval: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to automatically approve requests to this group.") request_template_id: Optional[UUID] = Field(default=None, description="The ID of the associated request template.") configuration_template_id: Optional[UUID] = Field(default=None, description="The ID of the associated configuration template.") group_binding_id: Optional[UUID] = Field(default=None, description="The ID of the associated group binding.") - is_requestable: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to allow access requests to this group.") + is_requestable: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to allow access requests to this group. Deprecated in favor of `request_configurations`.") request_configurations: Optional[List[RequestConfiguration]] = Field(default=None, description="A list of request configurations for this group.") request_configuration_list: Optional[List[RequestConfiguration]] = Field(default=None, description="A list of request configurations for this group. Deprecated in favor of `request_configurations`.") metadata: Optional[StrictStr] = Field(default=None, description="JSON metadata about the remote group. Only set for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details.") remote_info: Optional[GroupRemoteInfo] = None custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent to the requester when the request is approved.") + max_direct_users_allowed: Optional[StrictInt] = Field(default=None, description="The maximum number of direct users allowed for this group at once. Set to null to remove the limit.") risk_sensitivity: Optional[RiskSensitivityEnum] = Field(default=None, description="The risk sensitivity level for the group. When an override is set, this field will match that.") risk_sensitivity_override: Optional[RiskSensitivityEnum] = None + match_remote_name: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not the group's name is synced from the end system. When true, the name is overwritten with the remote name on each sync. Defaults to false.") + match_remote_description: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not the group's description is synced from the end system. When true, the description is overwritten with the remote description on each sync. Defaults to false.") last_successful_sync: Optional[SyncTask] = Field(default=None, description="Information about the last successful sync of this group.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["group_id", "app_id", "name", "description", "admin_owner_id", "group_leader_user_ids", "remote_id", "remote_name", "group_type", "max_duration", "recommended_duration", "extensions_duration_in_minutes", "require_manager_approval", "require_support_ticket", "require_mfa_to_approve", "require_mfa_to_request", "auto_approval", "request_template_id", "configuration_template_id", "group_binding_id", "is_requestable", "request_configurations", "request_configuration_list", "metadata", "remote_info", "custom_request_notification", "risk_sensitivity", "risk_sensitivity_override", "last_successful_sync"] + __properties: ClassVar[List[str]] = ["group_id", "app_id", "name", "description", "admin_owner_id", "group_leader_user_ids", "remote_id", "remote_name", "group_type", "max_duration", "recommended_duration", "extensions_duration_in_minutes", "require_manager_approval", "require_support_ticket", "require_mfa_to_approve", "requires_forfeit_reason", "require_mfa_to_request", "auto_approval", "request_template_id", "configuration_template_id", "group_binding_id", "is_requestable", "request_configurations", "request_configuration_list", "metadata", "remote_info", "custom_request_notification", "max_direct_users_allowed", "risk_sensitivity", "risk_sensitivity_override", "match_remote_name", "match_remote_description", "last_successful_sync"] model_config = ConfigDict( populate_by_name=True, @@ -163,6 +167,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "require_manager_approval": obj.get("require_manager_approval"), "require_support_ticket": obj.get("require_support_ticket"), "require_mfa_to_approve": obj.get("require_mfa_to_approve"), + "requires_forfeit_reason": obj.get("requires_forfeit_reason"), "require_mfa_to_request": obj.get("require_mfa_to_request"), "auto_approval": obj.get("auto_approval"), "request_template_id": obj.get("request_template_id"), @@ -174,8 +179,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "metadata": obj.get("metadata"), "remote_info": GroupRemoteInfo.from_dict(obj["remote_info"]) if obj.get("remote_info") is not None else None, "custom_request_notification": obj.get("custom_request_notification"), + "max_direct_users_allowed": obj.get("max_direct_users_allowed"), "risk_sensitivity": obj.get("risk_sensitivity"), "risk_sensitivity_override": obj.get("risk_sensitivity_override"), + "match_remote_name": obj.get("match_remote_name"), + "match_remote_description": obj.get("match_remote_description"), "last_successful_sync": SyncTask.from_dict(obj["last_successful_sync"]) if obj.get("last_successful_sync") is not None else None }) # store additional fields in additional_properties diff --git a/opal_security/models/group_access_level_list.py b/opal_security/models/group_access_level_list.py new file mode 100644 index 0000000..22e5f88 --- /dev/null +++ b/opal_security/models/group_access_level_list.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.group_access_level import GroupAccessLevel +from typing import Optional, Set +from typing_extensions import Self + +class GroupAccessLevelList(BaseModel): + """ + A list of access levels defined for a group. + """ # noqa: E501 + results: Optional[List[GroupAccessLevel]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupAccessLevelList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupAccessLevelList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [GroupAccessLevel.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_configuration_template.py b/opal_security/models/group_configuration_template.py new file mode 100644 index 0000000..4ba3872 --- /dev/null +++ b/opal_security/models/group_configuration_template.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from uuid import UUID +from typing import Optional, Set +from typing_extensions import Self + +class GroupConfigurationTemplate(BaseModel): + """ + A reference, by ID only, to the configuration template a group is linked to. This schema does not include any of the template's own fields (name, description, request configurations, visibility, etc.) — to read or modify those, use the `/configuration-templates` endpoints with the ID carried here. A `null` `configuration_template_id` indicates that the group is not linked to a configuration template and uses its own private configuration. + """ # noqa: E501 + configuration_template_id: UUID = Field(description="The ID of the configuration template that the group is linked to, or `null` if the group is not linked to a configuration template. Only the ID is exposed here; the template's own fields are managed through the `/configuration-templates` endpoints.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["configuration_template_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupConfigurationTemplate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupConfigurationTemplate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "configuration_template_id": obj.get("configuration_template_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_containing_group.py b/opal_security/models/group_containing_group.py index a2e48e1..509fab0 100644 --- a/opal_security/models/group_containing_group.py +++ b/opal_security/models/group_containing_group.py @@ -30,7 +30,7 @@ class GroupContainingGroup(BaseModel): # GroupContainingGroup Object ### Description The `GroupContainingGroup` object is used to represent a relationship between a group and a group. """ # noqa: E501 containing_group_id: UUID = Field(description="The groupID of the containing group.") - duration_minutes: Optional[Annotated[int, Field(le=525960, strict=True)]] = Field(default=None, description="The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite.") + duration_minutes: Optional[Annotated[int, Field(le=153722867, strict=True)]] = Field(default=None, description="The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite.") access_level_remote_id: Optional[StrictStr] = Field(default=None, description="The updated remote ID of the access level granted to this group.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["containing_group_id", "duration_minutes", "access_level_remote_id"] diff --git a/opal_security/models/group_member_group.py b/opal_security/models/group_member_group.py new file mode 100644 index 0000000..9829f19 --- /dev/null +++ b/opal_security/models/group_member_group.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from uuid import UUID +from typing import Optional, Set +from typing_extensions import Self + +class GroupMemberGroup(BaseModel): + """ + # GroupMemberGroup Object ### Description The `GroupMemberGroup` object is used to represent a group that is nested directly in another group. + """ # noqa: E501 + member_group_id: UUID = Field(description="The ID of the member group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["member_group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupMemberGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupMemberGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "member_group_id": obj.get("member_group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_member_group_list.py b/opal_security/models/group_member_group_list.py new file mode 100644 index 0000000..cb291b4 --- /dev/null +++ b/opal_security/models/group_member_group_list.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from opal_security.models.group_member_group import GroupMemberGroup +from typing import Optional, Set +from typing_extensions import Self + +class GroupMemberGroupList(BaseModel): + """ + GroupMemberGroupList + """ # noqa: E501 + member_groups: List[GroupMemberGroup] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["member_groups"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupMemberGroupList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in member_groups (list) + _items = [] + if self.member_groups: + for _item_member_groups in self.member_groups: + if _item_member_groups: + _items.append(_item_member_groups.to_dict()) + _dict['member_groups'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupMemberGroupList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "member_groups": [GroupMemberGroup.from_dict(_item) for _item in obj["member_groups"]] if obj.get("member_groups") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info.py b/opal_security/models/group_remote_info.py index 253a55c..c87a238 100644 --- a/opal_security/models/group_remote_info.py +++ b/opal_security/models/group_remote_info.py @@ -21,13 +21,25 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional from opal_security.models.group_remote_info_active_directory_group import GroupRemoteInfoActiveDirectoryGroup +from opal_security.models.group_remote_info_activecampaign_group import GroupRemoteInfoActivecampaignGroup +from opal_security.models.group_remote_info_aha_team import GroupRemoteInfoAhaTeam +from opal_security.models.group_remote_info_asana_team import GroupRemoteInfoAsanaTeam from opal_security.models.group_remote_info_aws_sso_group import GroupRemoteInfoAwsSsoGroup +from opal_security.models.group_remote_info_axiom_group import GroupRemoteInfoAxiomGroup from opal_security.models.group_remote_info_azure_ad_microsoft365_group import GroupRemoteInfoAzureAdMicrosoft365Group from opal_security.models.group_remote_info_azure_ad_security_group import GroupRemoteInfoAzureAdSecurityGroup +from opal_security.models.group_remote_info_bitwarden_group import GroupRemoteInfoBitwardenGroup +from opal_security.models.group_remote_info_box_group import GroupRemoteInfoBoxGroup +from opal_security.models.group_remote_info_calendly_group import GroupRemoteInfoCalendlyGroup from opal_security.models.group_remote_info_clickhouse_role import GroupRemoteInfoClickhouseRole +from opal_security.models.group_remote_info_confluence_group import GroupRemoteInfoConfluenceGroup from opal_security.models.group_remote_info_connector_group import GroupRemoteInfoConnectorGroup +from opal_security.models.group_remote_info_cursor_group import GroupRemoteInfoCursorGroup from opal_security.models.group_remote_info_databricks_account_group import GroupRemoteInfoDatabricksAccountGroup +from opal_security.models.group_remote_info_datadog_on_call_schedule import GroupRemoteInfoDatadogOnCallSchedule from opal_security.models.group_remote_info_devin_group import GroupRemoteInfoDevinGroup +from opal_security.models.group_remote_info_docusign_group import GroupRemoteInfoDocusignGroup +from opal_security.models.group_remote_info_docusign_signing_group import GroupRemoteInfoDocusignSigningGroup from opal_security.models.group_remote_info_duo_group import GroupRemoteInfoDuoGroup from opal_security.models.group_remote_info_github_enterprise_team import GroupRemoteInfoGithubEnterpriseTeam from opal_security.models.group_remote_info_github_team import GroupRemoteInfoGithubTeam @@ -36,19 +48,32 @@ from opal_security.models.group_remote_info_grafana_team import GroupRemoteInfoGrafanaTeam from opal_security.models.group_remote_info_hubspot_team import GroupRemoteInfoHubspotTeam from opal_security.models.group_remote_info_incidentio_on_call_schedule import GroupRemoteInfoIncidentioOnCallSchedule +from opal_security.models.group_remote_info_jira_group import GroupRemoteInfoJiraGroup from opal_security.models.group_remote_info_ldap_group import GroupRemoteInfoLdapGroup +from opal_security.models.group_remote_info_linear_team import GroupRemoteInfoLinearTeam from opal_security.models.group_remote_info_okta_group import GroupRemoteInfoOktaGroup from opal_security.models.group_remote_info_okta_group_rule import GroupRemoteInfoOktaGroupRule +from opal_security.models.group_remote_info_onelogin_group import GroupRemoteInfoOneloginGroup +from opal_security.models.group_remote_info_onelogin_role import GroupRemoteInfoOneloginRole from opal_security.models.group_remote_info_pagerduty_on_call_schedule import GroupRemoteInfoPagerdutyOnCallSchedule +from opal_security.models.group_remote_info_ramp_department import GroupRemoteInfoRampDepartment +from opal_security.models.group_remote_info_ramp_location import GroupRemoteInfoRampLocation +from opal_security.models.group_remote_info_rippling_supergroup import GroupRemoteInfoRipplingSupergroup +from opal_security.models.group_remote_info_rippling_team import GroupRemoteInfoRipplingTeam from opal_security.models.group_remote_info_rootly_on_call_schedule import GroupRemoteInfoRootlyOnCallSchedule from opal_security.models.group_remote_info_slack_user_group import GroupRemoteInfoSlackUserGroup from opal_security.models.group_remote_info_snowflake_role import GroupRemoteInfoSnowflakeRole +from opal_security.models.group_remote_info_square_job import GroupRemoteInfoSquareJob +from opal_security.models.group_remote_info_square_location import GroupRemoteInfoSquareLocation +from opal_security.models.group_remote_info_tableau_group import GroupRemoteInfoTableauGroup from opal_security.models.group_remote_info_tailscale_group import GroupRemoteInfoTailscaleGroup from opal_security.models.group_remote_info_twingate_group import GroupRemoteInfoTwingateGroup from opal_security.models.group_remote_info_twingate_group_synced import GroupRemoteInfoTwingateGroupSynced from opal_security.models.group_remote_info_workday_user_security_group import GroupRemoteInfoWorkdayUserSecurityGroup +from opal_security.models.group_remote_info_wrike_group import GroupRemoteInfoWrikeGroup from opal_security.models.group_remote_info_zendesk_group import GroupRemoteInfoZendeskGroup from opal_security.models.group_remote_info_zendesk_organization import GroupRemoteInfoZendeskOrganization +from opal_security.models.group_remote_info_zoom_group import GroupRemoteInfoZoomGroup from typing import Optional, Set from typing_extensions import Self @@ -58,6 +83,7 @@ class GroupRemoteInfo(BaseModel): """ # noqa: E501 active_directory_group: Optional[GroupRemoteInfoActiveDirectoryGroup] = None tailscale_group: Optional[GroupRemoteInfoTailscaleGroup] = None + cursor_group: Optional[GroupRemoteInfoCursorGroup] = None twingate_group: Optional[GroupRemoteInfoTwingateGroup] = None twingate_group_synced: Optional[GroupRemoteInfoTwingateGroupSynced] = None aws_sso_group: Optional[GroupRemoteInfoAwsSsoGroup] = None @@ -78,6 +104,7 @@ class GroupRemoteInfo(BaseModel): pagerduty_on_call_schedule: Optional[GroupRemoteInfoPagerdutyOnCallSchedule] = None incidentio_on_call_schedule: Optional[GroupRemoteInfoIncidentioOnCallSchedule] = None rootly_on_call_schedule: Optional[GroupRemoteInfoRootlyOnCallSchedule] = None + datadog_on_call_schedule: Optional[GroupRemoteInfoDatadogOnCallSchedule] = None devin_group: Optional[GroupRemoteInfoDevinGroup] = None clickhouse_role: Optional[GroupRemoteInfoClickhouseRole] = None grafana_team: Optional[GroupRemoteInfoGrafanaTeam] = None @@ -85,8 +112,31 @@ class GroupRemoteInfo(BaseModel): slack_user_group: Optional[GroupRemoteInfoSlackUserGroup] = None zendesk_organization: Optional[GroupRemoteInfoZendeskOrganization] = None hubspot_team: Optional[GroupRemoteInfoHubspotTeam] = None + tableau_group: Optional[GroupRemoteInfoTableauGroup] = None + confluence_group: Optional[GroupRemoteInfoConfluenceGroup] = None + jira_group: Optional[GroupRemoteInfoJiraGroup] = None + docusign_group: Optional[GroupRemoteInfoDocusignGroup] = None + zoom_group: Optional[GroupRemoteInfoZoomGroup] = None + ramp_department: Optional[GroupRemoteInfoRampDepartment] = None + ramp_location: Optional[GroupRemoteInfoRampLocation] = None + wrike_group: Optional[GroupRemoteInfoWrikeGroup] = None + axiom_group: Optional[GroupRemoteInfoAxiomGroup] = None + docusign_signing_group: Optional[GroupRemoteInfoDocusignSigningGroup] = None + linear_team: Optional[GroupRemoteInfoLinearTeam] = None + box_group: Optional[GroupRemoteInfoBoxGroup] = None + activecampaign_group: Optional[GroupRemoteInfoActivecampaignGroup] = None + aha_team: Optional[GroupRemoteInfoAhaTeam] = None + asana_team: Optional[GroupRemoteInfoAsanaTeam] = None + bitwarden_group: Optional[GroupRemoteInfoBitwardenGroup] = None + calendly_group: Optional[GroupRemoteInfoCalendlyGroup] = None + onelogin_role: Optional[GroupRemoteInfoOneloginRole] = None + onelogin_group: Optional[GroupRemoteInfoOneloginGroup] = None + square_location: Optional[GroupRemoteInfoSquareLocation] = None + square_job: Optional[GroupRemoteInfoSquareJob] = None + rippling_team: Optional[GroupRemoteInfoRipplingTeam] = None + rippling_supergroup: Optional[GroupRemoteInfoRipplingSupergroup] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["active_directory_group", "tailscale_group", "twingate_group", "twingate_group_synced", "aws_sso_group", "databricks_account_group", "connector_group", "github_team", "github_enterprise_team", "gitlab_group", "google_group", "ldap_group", "okta_group", "duo_group", "azure_ad_security_group", "azure_ad_microsoft_365_group", "snowflake_role", "okta_group_rule", "workday_user_security_group", "pagerduty_on_call_schedule", "incidentio_on_call_schedule", "rootly_on_call_schedule", "devin_group", "clickhouse_role", "grafana_team", "zendesk_group", "slack_user_group", "zendesk_organization", "hubspot_team"] + __properties: ClassVar[List[str]] = ["active_directory_group", "tailscale_group", "cursor_group", "twingate_group", "twingate_group_synced", "aws_sso_group", "databricks_account_group", "connector_group", "github_team", "github_enterprise_team", "gitlab_group", "google_group", "ldap_group", "okta_group", "duo_group", "azure_ad_security_group", "azure_ad_microsoft_365_group", "snowflake_role", "okta_group_rule", "workday_user_security_group", "pagerduty_on_call_schedule", "incidentio_on_call_schedule", "rootly_on_call_schedule", "datadog_on_call_schedule", "devin_group", "clickhouse_role", "grafana_team", "zendesk_group", "slack_user_group", "zendesk_organization", "hubspot_team", "tableau_group", "confluence_group", "jira_group", "docusign_group", "zoom_group", "ramp_department", "ramp_location", "wrike_group", "axiom_group", "docusign_signing_group", "linear_team", "box_group", "activecampaign_group", "aha_team", "asana_team", "bitwarden_group", "calendly_group", "onelogin_role", "onelogin_group", "square_location", "square_job", "rippling_team", "rippling_supergroup"] model_config = ConfigDict( populate_by_name=True, @@ -135,6 +185,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of tailscale_group if self.tailscale_group: _dict['tailscale_group'] = self.tailscale_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of cursor_group + if self.cursor_group: + _dict['cursor_group'] = self.cursor_group.to_dict() # override the default output from pydantic by calling `to_dict()` of twingate_group if self.twingate_group: _dict['twingate_group'] = self.twingate_group.to_dict() @@ -195,6 +248,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of rootly_on_call_schedule if self.rootly_on_call_schedule: _dict['rootly_on_call_schedule'] = self.rootly_on_call_schedule.to_dict() + # override the default output from pydantic by calling `to_dict()` of datadog_on_call_schedule + if self.datadog_on_call_schedule: + _dict['datadog_on_call_schedule'] = self.datadog_on_call_schedule.to_dict() # override the default output from pydantic by calling `to_dict()` of devin_group if self.devin_group: _dict['devin_group'] = self.devin_group.to_dict() @@ -216,6 +272,75 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of hubspot_team if self.hubspot_team: _dict['hubspot_team'] = self.hubspot_team.to_dict() + # override the default output from pydantic by calling `to_dict()` of tableau_group + if self.tableau_group: + _dict['tableau_group'] = self.tableau_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of confluence_group + if self.confluence_group: + _dict['confluence_group'] = self.confluence_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of jira_group + if self.jira_group: + _dict['jira_group'] = self.jira_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of docusign_group + if self.docusign_group: + _dict['docusign_group'] = self.docusign_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of zoom_group + if self.zoom_group: + _dict['zoom_group'] = self.zoom_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of ramp_department + if self.ramp_department: + _dict['ramp_department'] = self.ramp_department.to_dict() + # override the default output from pydantic by calling `to_dict()` of ramp_location + if self.ramp_location: + _dict['ramp_location'] = self.ramp_location.to_dict() + # override the default output from pydantic by calling `to_dict()` of wrike_group + if self.wrike_group: + _dict['wrike_group'] = self.wrike_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of axiom_group + if self.axiom_group: + _dict['axiom_group'] = self.axiom_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of docusign_signing_group + if self.docusign_signing_group: + _dict['docusign_signing_group'] = self.docusign_signing_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of linear_team + if self.linear_team: + _dict['linear_team'] = self.linear_team.to_dict() + # override the default output from pydantic by calling `to_dict()` of box_group + if self.box_group: + _dict['box_group'] = self.box_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of activecampaign_group + if self.activecampaign_group: + _dict['activecampaign_group'] = self.activecampaign_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of aha_team + if self.aha_team: + _dict['aha_team'] = self.aha_team.to_dict() + # override the default output from pydantic by calling `to_dict()` of asana_team + if self.asana_team: + _dict['asana_team'] = self.asana_team.to_dict() + # override the default output from pydantic by calling `to_dict()` of bitwarden_group + if self.bitwarden_group: + _dict['bitwarden_group'] = self.bitwarden_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of calendly_group + if self.calendly_group: + _dict['calendly_group'] = self.calendly_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of onelogin_role + if self.onelogin_role: + _dict['onelogin_role'] = self.onelogin_role.to_dict() + # override the default output from pydantic by calling `to_dict()` of onelogin_group + if self.onelogin_group: + _dict['onelogin_group'] = self.onelogin_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of square_location + if self.square_location: + _dict['square_location'] = self.square_location.to_dict() + # override the default output from pydantic by calling `to_dict()` of square_job + if self.square_job: + _dict['square_job'] = self.square_job.to_dict() + # override the default output from pydantic by calling `to_dict()` of rippling_team + if self.rippling_team: + _dict['rippling_team'] = self.rippling_team.to_dict() + # override the default output from pydantic by calling `to_dict()` of rippling_supergroup + if self.rippling_supergroup: + _dict['rippling_supergroup'] = self.rippling_supergroup.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -235,6 +360,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "active_directory_group": GroupRemoteInfoActiveDirectoryGroup.from_dict(obj["active_directory_group"]) if obj.get("active_directory_group") is not None else None, "tailscale_group": GroupRemoteInfoTailscaleGroup.from_dict(obj["tailscale_group"]) if obj.get("tailscale_group") is not None else None, + "cursor_group": GroupRemoteInfoCursorGroup.from_dict(obj["cursor_group"]) if obj.get("cursor_group") is not None else None, "twingate_group": GroupRemoteInfoTwingateGroup.from_dict(obj["twingate_group"]) if obj.get("twingate_group") is not None else None, "twingate_group_synced": GroupRemoteInfoTwingateGroupSynced.from_dict(obj["twingate_group_synced"]) if obj.get("twingate_group_synced") is not None else None, "aws_sso_group": GroupRemoteInfoAwsSsoGroup.from_dict(obj["aws_sso_group"]) if obj.get("aws_sso_group") is not None else None, @@ -255,13 +381,37 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "pagerduty_on_call_schedule": GroupRemoteInfoPagerdutyOnCallSchedule.from_dict(obj["pagerduty_on_call_schedule"]) if obj.get("pagerduty_on_call_schedule") is not None else None, "incidentio_on_call_schedule": GroupRemoteInfoIncidentioOnCallSchedule.from_dict(obj["incidentio_on_call_schedule"]) if obj.get("incidentio_on_call_schedule") is not None else None, "rootly_on_call_schedule": GroupRemoteInfoRootlyOnCallSchedule.from_dict(obj["rootly_on_call_schedule"]) if obj.get("rootly_on_call_schedule") is not None else None, + "datadog_on_call_schedule": GroupRemoteInfoDatadogOnCallSchedule.from_dict(obj["datadog_on_call_schedule"]) if obj.get("datadog_on_call_schedule") is not None else None, "devin_group": GroupRemoteInfoDevinGroup.from_dict(obj["devin_group"]) if obj.get("devin_group") is not None else None, "clickhouse_role": GroupRemoteInfoClickhouseRole.from_dict(obj["clickhouse_role"]) if obj.get("clickhouse_role") is not None else None, "grafana_team": GroupRemoteInfoGrafanaTeam.from_dict(obj["grafana_team"]) if obj.get("grafana_team") is not None else None, "zendesk_group": GroupRemoteInfoZendeskGroup.from_dict(obj["zendesk_group"]) if obj.get("zendesk_group") is not None else None, "slack_user_group": GroupRemoteInfoSlackUserGroup.from_dict(obj["slack_user_group"]) if obj.get("slack_user_group") is not None else None, "zendesk_organization": GroupRemoteInfoZendeskOrganization.from_dict(obj["zendesk_organization"]) if obj.get("zendesk_organization") is not None else None, - "hubspot_team": GroupRemoteInfoHubspotTeam.from_dict(obj["hubspot_team"]) if obj.get("hubspot_team") is not None else None + "hubspot_team": GroupRemoteInfoHubspotTeam.from_dict(obj["hubspot_team"]) if obj.get("hubspot_team") is not None else None, + "tableau_group": GroupRemoteInfoTableauGroup.from_dict(obj["tableau_group"]) if obj.get("tableau_group") is not None else None, + "confluence_group": GroupRemoteInfoConfluenceGroup.from_dict(obj["confluence_group"]) if obj.get("confluence_group") is not None else None, + "jira_group": GroupRemoteInfoJiraGroup.from_dict(obj["jira_group"]) if obj.get("jira_group") is not None else None, + "docusign_group": GroupRemoteInfoDocusignGroup.from_dict(obj["docusign_group"]) if obj.get("docusign_group") is not None else None, + "zoom_group": GroupRemoteInfoZoomGroup.from_dict(obj["zoom_group"]) if obj.get("zoom_group") is not None else None, + "ramp_department": GroupRemoteInfoRampDepartment.from_dict(obj["ramp_department"]) if obj.get("ramp_department") is not None else None, + "ramp_location": GroupRemoteInfoRampLocation.from_dict(obj["ramp_location"]) if obj.get("ramp_location") is not None else None, + "wrike_group": GroupRemoteInfoWrikeGroup.from_dict(obj["wrike_group"]) if obj.get("wrike_group") is not None else None, + "axiom_group": GroupRemoteInfoAxiomGroup.from_dict(obj["axiom_group"]) if obj.get("axiom_group") is not None else None, + "docusign_signing_group": GroupRemoteInfoDocusignSigningGroup.from_dict(obj["docusign_signing_group"]) if obj.get("docusign_signing_group") is not None else None, + "linear_team": GroupRemoteInfoLinearTeam.from_dict(obj["linear_team"]) if obj.get("linear_team") is not None else None, + "box_group": GroupRemoteInfoBoxGroup.from_dict(obj["box_group"]) if obj.get("box_group") is not None else None, + "activecampaign_group": GroupRemoteInfoActivecampaignGroup.from_dict(obj["activecampaign_group"]) if obj.get("activecampaign_group") is not None else None, + "aha_team": GroupRemoteInfoAhaTeam.from_dict(obj["aha_team"]) if obj.get("aha_team") is not None else None, + "asana_team": GroupRemoteInfoAsanaTeam.from_dict(obj["asana_team"]) if obj.get("asana_team") is not None else None, + "bitwarden_group": GroupRemoteInfoBitwardenGroup.from_dict(obj["bitwarden_group"]) if obj.get("bitwarden_group") is not None else None, + "calendly_group": GroupRemoteInfoCalendlyGroup.from_dict(obj["calendly_group"]) if obj.get("calendly_group") is not None else None, + "onelogin_role": GroupRemoteInfoOneloginRole.from_dict(obj["onelogin_role"]) if obj.get("onelogin_role") is not None else None, + "onelogin_group": GroupRemoteInfoOneloginGroup.from_dict(obj["onelogin_group"]) if obj.get("onelogin_group") is not None else None, + "square_location": GroupRemoteInfoSquareLocation.from_dict(obj["square_location"]) if obj.get("square_location") is not None else None, + "square_job": GroupRemoteInfoSquareJob.from_dict(obj["square_job"]) if obj.get("square_job") is not None else None, + "rippling_team": GroupRemoteInfoRipplingTeam.from_dict(obj["rippling_team"]) if obj.get("rippling_team") is not None else None, + "rippling_supergroup": GroupRemoteInfoRipplingSupergroup.from_dict(obj["rippling_supergroup"]) if obj.get("rippling_supergroup") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal_security/models/group_remote_info_activecampaign_group.py b/opal_security/models/group_remote_info_activecampaign_group.py new file mode 100644 index 0000000..ce701a7 --- /dev/null +++ b/opal_security/models/group_remote_info_activecampaign_group.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoActivecampaignGroup(BaseModel): + """ + Remote info for ActiveCampaign Group. + """ # noqa: E501 + group_id: StrictStr = Field(description="The group id of the ActiveCampaign Group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoActivecampaignGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoActivecampaignGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_aha_team.py b/opal_security/models/group_remote_info_aha_team.py new file mode 100644 index 0000000..dd966e4 --- /dev/null +++ b/opal_security/models/group_remote_info_aha_team.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoAhaTeam(BaseModel): + """ + Remote info for Aha Team. + """ # noqa: E501 + group_id: StrictStr = Field(description="The group id of the Aha Team.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoAhaTeam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoAhaTeam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_asana_team.py b/opal_security/models/group_remote_info_asana_team.py new file mode 100644 index 0000000..f88afa1 --- /dev/null +++ b/opal_security/models/group_remote_info_asana_team.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoAsanaTeam(BaseModel): + """ + Remote info for Asana Team. + """ # noqa: E501 + team_gid: StrictStr = Field(description="The team gid of the Asana Team.") + workspace_gid: Optional[StrictStr] = Field(default=None, description="The workspace gid of the Asana Team.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["team_gid", "workspace_gid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoAsanaTeam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoAsanaTeam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "team_gid": obj.get("team_gid"), + "workspace_gid": obj.get("workspace_gid") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_axiom_group.py b/opal_security/models/group_remote_info_axiom_group.py new file mode 100644 index 0000000..b0981d1 --- /dev/null +++ b/opal_security/models/group_remote_info_axiom_group.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoAxiomGroup(BaseModel): + """ + Remote info for Axiom RBAC group. + """ # noqa: E501 + group_id: StrictStr = Field(description="The ID of the Axiom group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoAxiomGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoAxiomGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_bitwarden_group.py b/opal_security/models/group_remote_info_bitwarden_group.py new file mode 100644 index 0000000..3bfc926 --- /dev/null +++ b/opal_security/models/group_remote_info_bitwarden_group.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoBitwardenGroup(BaseModel): + """ + Remote info for Bitwarden Group. + """ # noqa: E501 + group_id: StrictStr = Field(description="The group id of the Bitwarden Group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoBitwardenGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoBitwardenGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_box_group.py b/opal_security/models/group_remote_info_box_group.py new file mode 100644 index 0000000..d53824a --- /dev/null +++ b/opal_security/models/group_remote_info_box_group.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoBoxGroup(BaseModel): + """ + Remote info for Box Group. + """ # noqa: E501 + group_id: StrictStr = Field(description="The group id of the Box Group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoBoxGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoBoxGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_calendly_group.py b/opal_security/models/group_remote_info_calendly_group.py new file mode 100644 index 0000000..d5fc274 --- /dev/null +++ b/opal_security/models/group_remote_info_calendly_group.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoCalendlyGroup(BaseModel): + """ + Remote info for Calendly Group. + """ # noqa: E501 + group_id: StrictStr = Field(description="The group id of the Calendly Group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoCalendlyGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoCalendlyGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_confluence_group.py b/opal_security/models/group_remote_info_confluence_group.py new file mode 100644 index 0000000..e777853 --- /dev/null +++ b/opal_security/models/group_remote_info_confluence_group.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoConfluenceGroup(BaseModel): + """ + Remote info for Confluence group. + """ # noqa: E501 + group_id: StrictStr = Field(description="The ID of the Confluence group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoConfluenceGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoConfluenceGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_cursor_group.py b/opal_security/models/group_remote_info_cursor_group.py new file mode 100644 index 0000000..5472df9 --- /dev/null +++ b/opal_security/models/group_remote_info_cursor_group.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoCursorGroup(BaseModel): + """ + Remote info for a Cursor group. + """ # noqa: E501 + group_id: StrictStr = Field(description="The id of the Cursor group, or team:members / team:admins for the owning team's built-in groups.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoCursorGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoCursorGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_datadog_on_call_schedule.py b/opal_security/models/group_remote_info_datadog_on_call_schedule.py new file mode 100644 index 0000000..025fd5e --- /dev/null +++ b/opal_security/models/group_remote_info_datadog_on_call_schedule.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoDatadogOnCallSchedule(BaseModel): + """ + Remote info for Datadog on-call schedule group. + """ # noqa: E501 + schedule_id: StrictStr = Field(description="The id of the Datadog on-call schedule.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["schedule_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoDatadogOnCallSchedule from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoDatadogOnCallSchedule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "schedule_id": obj.get("schedule_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_docusign_group.py b/opal_security/models/group_remote_info_docusign_group.py new file mode 100644 index 0000000..2c1696d --- /dev/null +++ b/opal_security/models/group_remote_info_docusign_group.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoDocusignGroup(BaseModel): + """ + Remote info for Docusign group. + """ # noqa: E501 + group_id: StrictStr = Field(description="The ID of the Docusign group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoDocusignGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoDocusignGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_docusign_signing_group.py b/opal_security/models/group_remote_info_docusign_signing_group.py new file mode 100644 index 0000000..8e6cbc8 --- /dev/null +++ b/opal_security/models/group_remote_info_docusign_signing_group.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoDocusignSigningGroup(BaseModel): + """ + Remote info for Docusign signing group. + """ # noqa: E501 + signing_group_id: StrictStr = Field(description="The ID of the Docusign signing group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["signing_group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoDocusignSigningGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoDocusignSigningGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "signing_group_id": obj.get("signing_group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_jira_group.py b/opal_security/models/group_remote_info_jira_group.py new file mode 100644 index 0000000..068359e --- /dev/null +++ b/opal_security/models/group_remote_info_jira_group.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoJiraGroup(BaseModel): + """ + Remote info for Jira group. + """ # noqa: E501 + group_id: StrictStr = Field(description="The ID of the Jira group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoJiraGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoJiraGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_linear_team.py b/opal_security/models/group_remote_info_linear_team.py new file mode 100644 index 0000000..3b99a0b --- /dev/null +++ b/opal_security/models/group_remote_info_linear_team.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoLinearTeam(BaseModel): + """ + Remote info for Linear team. + """ # noqa: E501 + team_id: StrictStr = Field(description="The ID of the Linear team.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["team_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoLinearTeam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoLinearTeam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "team_id": obj.get("team_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_onelogin_group.py b/opal_security/models/group_remote_info_onelogin_group.py new file mode 100644 index 0000000..c817892 --- /dev/null +++ b/opal_security/models/group_remote_info_onelogin_group.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoOneloginGroup(BaseModel): + """ + Remote info for OneLogin Group. + """ # noqa: E501 + group_id: StrictStr = Field(description="The group id of the OneLogin Group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoOneloginGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoOneloginGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_onelogin_role.py b/opal_security/models/group_remote_info_onelogin_role.py new file mode 100644 index 0000000..98653b7 --- /dev/null +++ b/opal_security/models/group_remote_info_onelogin_role.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoOneloginRole(BaseModel): + """ + Remote info for OneLogin Role. + """ # noqa: E501 + group_id: StrictStr = Field(description="The group id of the OneLogin Role.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoOneloginRole from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoOneloginRole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_ramp_department.py b/opal_security/models/group_remote_info_ramp_department.py new file mode 100644 index 0000000..b996791 --- /dev/null +++ b/opal_security/models/group_remote_info_ramp_department.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoRampDepartment(BaseModel): + """ + Remote info for Ramp department. + """ # noqa: E501 + department_id: StrictStr = Field(description="The ID of the Ramp department.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["department_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoRampDepartment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoRampDepartment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "department_id": obj.get("department_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_ramp_location.py b/opal_security/models/group_remote_info_ramp_location.py new file mode 100644 index 0000000..bfa0ced --- /dev/null +++ b/opal_security/models/group_remote_info_ramp_location.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoRampLocation(BaseModel): + """ + Remote info for Ramp location. + """ # noqa: E501 + location_id: StrictStr = Field(description="The ID of the Ramp location.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["location_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoRampLocation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoRampLocation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "location_id": obj.get("location_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_rippling_supergroup.py b/opal_security/models/group_remote_info_rippling_supergroup.py new file mode 100644 index 0000000..079fbfc --- /dev/null +++ b/opal_security/models/group_remote_info_rippling_supergroup.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoRipplingSupergroup(BaseModel): + """ + Remote info for Rippling supergroup. + """ # noqa: E501 + supergroup_id: StrictStr = Field(description="The ID of the Rippling supergroup.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["supergroup_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoRipplingSupergroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoRipplingSupergroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "supergroup_id": obj.get("supergroup_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_rippling_team.py b/opal_security/models/group_remote_info_rippling_team.py new file mode 100644 index 0000000..f1177f4 --- /dev/null +++ b/opal_security/models/group_remote_info_rippling_team.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoRipplingTeam(BaseModel): + """ + Remote info for Rippling team. + """ # noqa: E501 + team_id: StrictStr = Field(description="The ID of the Rippling team.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["team_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoRipplingTeam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoRipplingTeam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "team_id": obj.get("team_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_square_job.py b/opal_security/models/group_remote_info_square_job.py new file mode 100644 index 0000000..e3ddb7e --- /dev/null +++ b/opal_security/models/group_remote_info_square_job.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoSquareJob(BaseModel): + """ + Remote info for Square Job. + """ # noqa: E501 + group_id: StrictStr = Field(description="The group id of the Square Job.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoSquareJob from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoSquareJob from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_square_location.py b/opal_security/models/group_remote_info_square_location.py new file mode 100644 index 0000000..4888e5a --- /dev/null +++ b/opal_security/models/group_remote_info_square_location.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoSquareLocation(BaseModel): + """ + Remote info for Square Location. + """ # noqa: E501 + group_id: StrictStr = Field(description="The group id of the Square Location.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoSquareLocation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoSquareLocation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_tableau_group.py b/opal_security/models/group_remote_info_tableau_group.py new file mode 100644 index 0000000..cd3dd5f --- /dev/null +++ b/opal_security/models/group_remote_info_tableau_group.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoTableauGroup(BaseModel): + """ + Remote info for Tableau group. + """ # noqa: E501 + group_id: StrictStr = Field(description="The ID of the Tableau group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoTableauGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoTableauGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_wrike_group.py b/opal_security/models/group_remote_info_wrike_group.py new file mode 100644 index 0000000..1218a61 --- /dev/null +++ b/opal_security/models/group_remote_info_wrike_group.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoWrikeGroup(BaseModel): + """ + Remote info for Wrike group. + """ # noqa: E501 + group_id: StrictStr = Field(description="The ID of the Wrike group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoWrikeGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoWrikeGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_remote_info_zoom_group.py b/opal_security/models/group_remote_info_zoom_group.py new file mode 100644 index 0000000..57847d8 --- /dev/null +++ b/opal_security/models/group_remote_info_zoom_group.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GroupRemoteInfoZoomGroup(BaseModel): + """ + Remote info for Zoom group. + """ # noqa: E501 + group_id: StrictStr = Field(description="The ID of the Zoom group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupRemoteInfoZoomGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupRemoteInfoZoomGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/group_type_enum.py b/opal_security/models/group_type_enum.py index 64a2bc4..ea32e01 100644 --- a/opal_security/models/group_type_enum.py +++ b/opal_security/models/group_type_enum.py @@ -49,16 +49,40 @@ class GroupTypeEnum(str, Enum): PAGERDUTY_ON_CALL_SCHEDULE = 'PAGERDUTY_ON_CALL_SCHEDULE' INCIDENTIO_ON_CALL_SCHEDULE = 'INCIDENTIO_ON_CALL_SCHEDULE' ROOTLY_ON_CALL_SCHEDULE = 'ROOTLY_ON_CALL_SCHEDULE' + DATADOG_ON_CALL_SCHEDULE = 'DATADOG_ON_CALL_SCHEDULE' DEVIN_GROUP = 'DEVIN_GROUP' GIT_HUB_ENTERPRISE_TEAM = 'GIT_HUB_ENTERPRISE_TEAM' GRAFANA_TEAM = 'GRAFANA_TEAM' CLICKHOUSE_ROLE = 'CLICKHOUSE_ROLE' SLACK_USER_GROUP = 'SLACK_USER_GROUP' + CURSOR_GROUP = 'CURSOR_GROUP' TWINGATE_GROUP = 'TWINGATE_GROUP' TWINGATE_GROUP_SYNCED = 'TWINGATE_GROUP_SYNCED' ZENDESK_GROUP = 'ZENDESK_GROUP' ZENDESK_ORGANIZATION = 'ZENDESK_ORGANIZATION' HUBSPOT_TEAM = 'HUBSPOT_TEAM' + TABLEAU_GROUP = 'TABLEAU_GROUP' + CONFLUENCE_GROUP = 'CONFLUENCE_GROUP' + JIRA_GROUP = 'JIRA_GROUP' + DOCUSIGN_GROUP = 'DOCUSIGN_GROUP' + ZOOM_GROUP = 'ZOOM_GROUP' + LINEAR_TEAM = 'LINEAR_TEAM' + RAMP_DEPARTMENT = 'RAMP_DEPARTMENT' + RAMP_LOCATION = 'RAMP_LOCATION' + WRIKE_GROUP = 'WRIKE_GROUP' + AXIOM_GROUP = 'AXIOM_GROUP' + BOX_GROUP = 'BOX_GROUP' + ACTIVECAMPAIGN_GROUP = 'ACTIVECAMPAIGN_GROUP' + AHA_TEAM = 'AHA_TEAM' + ASANA_TEAM = 'ASANA_TEAM' + BITWARDEN_GROUP = 'BITWARDEN_GROUP' + CALENDLY_GROUP = 'CALENDLY_GROUP' + ONELOGIN_ROLE = 'ONELOGIN_ROLE' + ONELOGIN_GROUP = 'ONELOGIN_GROUP' + SQUARE_LOCATION = 'SQUARE_LOCATION' + SQUARE_JOB = 'SQUARE_JOB' + RIPPLING_TEAM = 'RIPPLING_TEAM' + RIPPLING_SUPERGROUP = 'RIPPLING_SUPERGROUP' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/opal_security/models/idp_status_filter.py b/opal_security/models/idp_status_filter.py new file mode 100644 index 0000000..bf62123 --- /dev/null +++ b/opal_security/models/idp_status_filter.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.user_hr_idp_status_enum import UserHrIdpStatusEnum +from typing import Optional, Set +from typing_extensions import Self + +class IdpStatusFilter(BaseModel): + """ + Filters USER entities by their HR/IDP lifecycle status. Only applies to USER entities; GROUP and RESOURCE entities never match, in either polarity. `statuses` combine with OR. `not` inverts the match within the user domain (e.g. \"IDP status is NOT active\"), so it still returns only users rather than sweeping in groups/resources. + """ # noqa: E501 + statuses: Optional[List[UserHrIdpStatusEnum]] = Field(default=None, description="Match users whose HR/IDP status is one of these values.") + var_not: Optional[StrictBool] = Field(default=None, description="Invert the match within the user domain (e.g. \"IDP status is NOT active\").", alias="not") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["statuses", "not"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IdpStatusFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IdpStatusFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "statuses": obj.get("statuses"), + "not": obj.get("not") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/invite_user_info.py b/opal_security/models/invite_user_info.py new file mode 100644 index 0000000..cff3b7a --- /dev/null +++ b/opal_security/models/invite_user_info.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from opal_security.models.user_product_role_enum import UserProductRoleEnum +from typing import Optional, Set +from typing_extensions import Self + +class InviteUserInfo(BaseModel): + """ + The information required to invite a user. + """ # noqa: E501 + email: StrictStr + first_name: StrictStr + last_name: StrictStr + role: UserProductRoleEnum + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["email", "first_name", "last_name", "role"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteUserInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteUserInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "first_name": obj.get("first_name"), + "last_name": obj.get("last_name"), + "role": obj.get("role") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/mcp_config_permission.py b/opal_security/models/mcp_config_permission.py new file mode 100644 index 0000000..5288f05 --- /dev/null +++ b/opal_security/models/mcp_config_permission.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class McpConfigPermission(BaseModel): + """ + # McpConfigPermission Object ### Description One permission rule or default mode of one settings source. The kit masks secrets in a rule with the same redaction it uses for conversation content, and Opal masks it again. + """ # noqa: E501 + source: Optional[StrictStr] = Field(default=None, description="`managed`, `user`, `project` or `local`.") + kind: StrictStr = Field(description="`allow`, `ask`, `deny` or `default_mode`.") + value: StrictStr = Field(description="The rule, such as `Bash(npm run test *)`, or the mode, such as `acceptEdits`.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["source", "kind", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of McpConfigPermission from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of McpConfigPermission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "source": obj.get("source"), + "kind": obj.get("kind"), + "value": obj.get("value") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/mcp_config_plugin.py b/opal_security/models/mcp_config_plugin.py new file mode 100644 index 0000000..6a30667 --- /dev/null +++ b/opal_security/models/mcp_config_plugin.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class McpConfigPlugin(BaseModel): + """ + # McpConfigPlugin Object ### Description A Claude Code plugin the machine's settings enable. + """ # noqa: E501 + name: StrictStr + marketplace: Optional[StrictStr] = None + version: Optional[StrictStr] = Field(default=None, description="The installed version, when the kit could read it.") + scope: Optional[StrictStr] = Field(default=None, description="The settings source that enables it: `managed`, `user`, `project` or `local`.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "marketplace", "version", "scope"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of McpConfigPlugin from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of McpConfigPlugin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "marketplace": obj.get("marketplace"), + "version": obj.get("version"), + "scope": obj.get("scope") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/mcp_config_report.py b/opal_security/models/mcp_config_report.py new file mode 100644 index 0000000..99f1973 --- /dev/null +++ b/opal_security/models/mcp_config_report.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.mcp_config_permission import McpConfigPermission +from opal_security.models.mcp_config_plugin import McpConfigPlugin +from opal_security.models.mcp_config_reporter import McpConfigReporter +from opal_security.models.mcp_config_server import McpConfigServer +from opal_security.models.mcp_config_skill import McpConfigSkill +from opal_security.models.mcp_config_subagent import McpConfigSubagent +from typing import Optional, Set +from typing_extensions import Self + +class McpConfigReport(BaseModel): + """ + # McpConfigReport Object ### Description The MCP servers configured in Claude Code on one machine, and what else its configuration lets Claude Code reach: enabled plugins, skills, custom subagents and permission rules. Each of those four lists is optional; a kit that does not send one leaves what Opal has of that kind as it is, and an empty list says the machine has none. Each holds at most 200 entries. + """ # noqa: E501 + servers: List[McpConfigServer] + reporter: Optional[McpConfigReporter] = None + plugins: Optional[List[McpConfigPlugin]] = None + skills: Optional[List[McpConfigSkill]] = None + subagents: Optional[List[McpConfigSubagent]] = None + permissions: Optional[List[McpConfigPermission]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["servers", "reporter", "plugins", "skills", "subagents", "permissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of McpConfigReport from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in servers (list) + _items = [] + if self.servers: + for _item_servers in self.servers: + if _item_servers: + _items.append(_item_servers.to_dict()) + _dict['servers'] = _items + # override the default output from pydantic by calling `to_dict()` of reporter + if self.reporter: + _dict['reporter'] = self.reporter.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in plugins (list) + _items = [] + if self.plugins: + for _item_plugins in self.plugins: + if _item_plugins: + _items.append(_item_plugins.to_dict()) + _dict['plugins'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in skills (list) + _items = [] + if self.skills: + for _item_skills in self.skills: + if _item_skills: + _items.append(_item_skills.to_dict()) + _dict['skills'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in subagents (list) + _items = [] + if self.subagents: + for _item_subagents in self.subagents: + if _item_subagents: + _items.append(_item_subagents.to_dict()) + _dict['subagents'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of McpConfigReport from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "servers": [McpConfigServer.from_dict(_item) for _item in obj["servers"]] if obj.get("servers") is not None else None, + "reporter": McpConfigReporter.from_dict(obj["reporter"]) if obj.get("reporter") is not None else None, + "plugins": [McpConfigPlugin.from_dict(_item) for _item in obj["plugins"]] if obj.get("plugins") is not None else None, + "skills": [McpConfigSkill.from_dict(_item) for _item in obj["skills"]] if obj.get("skills") is not None else None, + "subagents": [McpConfigSubagent.from_dict(_item) for _item in obj["subagents"]] if obj.get("subagents") is not None else None, + "permissions": [McpConfigPermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/mcp_config_report_result.py b/opal_security/models/mcp_config_report_result.py new file mode 100644 index 0000000..2bcfc09 --- /dev/null +++ b/opal_security/models/mcp_config_report_result.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class McpConfigReportResult(BaseModel): + """ + # McpConfigReportResult Object ### Description What one configuration report did. + """ # noqa: E501 + received: StrictInt = Field(description="Servers in the report.") + recorded: StrictInt = Field(description="Servers recorded in the registry. Lower than `received` when an entry had neither a name Opal could use nor a URL or command hash.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["received", "recorded"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of McpConfigReportResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of McpConfigReportResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "received": obj.get("received"), + "recorded": obj.get("recorded") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/mcp_config_reporter.py b/opal_security/models/mcp_config_reporter.py new file mode 100644 index 0000000..7b8ab51 --- /dev/null +++ b/opal_security/models/mcp_config_reporter.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class McpConfigReporter(BaseModel): + """ + # McpConfigReporter Object ### Description Who the reporting machine says it belongs to. Unverified, like `X-Opal-Actor`. + """ # noqa: E501 + configured_email: Optional[StrictStr] = None + claude_account_email: Optional[StrictStr] = None + git_email: Optional[StrictStr] = None + os_user: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["configured_email", "claude_account_email", "git_email", "os_user"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of McpConfigReporter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of McpConfigReporter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "configured_email": obj.get("configured_email"), + "claude_account_email": obj.get("claude_account_email"), + "git_email": obj.get("git_email"), + "os_user": obj.get("os_user") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/mcp_config_server.py b/opal_security/models/mcp_config_server.py new file mode 100644 index 0000000..6f48d33 --- /dev/null +++ b/opal_security/models/mcp_config_server.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class McpConfigServer(BaseModel): + """ + # McpConfigServer Object ### Description One MCP server in a machine's Claude Code configuration. Exactly what the hook kit sends: no environment values, headers or command arguments. + """ # noqa: E501 + name: StrictStr = Field(description="The server's name in the configuration.") + scope: Optional[StrictStr] = Field(default=None, description="`user`, `project`, `local`, `managed` or `plugin`.") + transport: Optional[StrictStr] = Field(default=None, description="`http`, `sse` or `stdio`.") + url: Optional[StrictStr] = Field(default=None, description="The server's URL, for an `http` or `sse` server.") + command_hash: Optional[StrictStr] = Field(default=None, description="For a `stdio` server, a SHA-256 of its command's shape, in hex.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "scope", "transport", "url", "command_hash"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of McpConfigServer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of McpConfigServer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "scope": obj.get("scope"), + "transport": obj.get("transport"), + "url": obj.get("url"), + "command_hash": obj.get("command_hash") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/mcp_config_skill.py b/opal_security/models/mcp_config_skill.py new file mode 100644 index 0000000..70804ca --- /dev/null +++ b/opal_security/models/mcp_config_skill.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class McpConfigSkill(BaseModel): + """ + # McpConfigSkill Object ### Description A skill (or legacy command) Claude Code loads on the machine. A plugin's is named `:`. Only its name is sent, never the file. + """ # noqa: E501 + name: StrictStr + source: Optional[StrictStr] = Field(default=None, description="`user`, `project`, `plugin` or `managed`.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "source"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of McpConfigSkill from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of McpConfigSkill from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "source": obj.get("source") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/mcp_config_subagent.py b/opal_security/models/mcp_config_subagent.py new file mode 100644 index 0000000..91ba565 --- /dev/null +++ b/opal_security/models/mcp_config_subagent.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class McpConfigSubagent(BaseModel): + """ + # McpConfigSubagent Object ### Description A custom subagent defined on the machine. A plugin's is named `:`. + """ # noqa: E501 + name: StrictStr + scope: Optional[StrictStr] = Field(default=None, description="`user`, `project`, `plugin` or `managed`.") + tools: Optional[List[StrictStr]] = Field(default=None, description="The tools its file lists. Absent when the file lists none, which lets the subagent use every tool of the session, MCP tools included.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "scope", "tools"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of McpConfigSubagent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of McpConfigSubagent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "scope": obj.get("scope"), + "tools": obj.get("tools") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/name_match_type.py b/opal_security/models/name_match_type.py new file mode 100644 index 0000000..35aa7a3 --- /dev/null +++ b/opal_security/models/name_match_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class NameMatchType(str, Enum): + """ + How to match a free-text name filter on list endpoints. All match types are case-insensitive. When omitted, CONTAINS is used. REGEX is not supported here — use POST /queries/run for regular-expression matching. + """ + + """ + allowed enum values + """ + CONTAINS = 'CONTAINS' + EQUALS = 'EQUALS' + STARTS_WITH = 'STARTS_WITH' + ENDS_WITH = 'ENDS_WITH' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of NameMatchType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/opal_access_path_detail.py b/opal_security/models/opal_access_path_detail.py new file mode 100644 index 0000000..7174786 --- /dev/null +++ b/opal_security/models/opal_access_path_detail.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from typing import Optional, Set +from typing_extensions import Self + +class OpalAccessPathDetail(BaseModel): + """ + A single access path within an ACCESS result. + """ # noqa: E501 + path: List[UUID] = Field(description="Entity IDs along the path from principal to entitlement.") + expiration: Optional[datetime] = Field(default=None, description="This path's expiration, if any.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["path", "expiration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpalAccessPathDetail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpalAccessPathDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "path": obj.get("path"), + "expiration": obj.get("expiration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/opal_access_path_edge_filter.py b/opal_security/models/opal_access_path_edge_filter.py new file mode 100644 index 0000000..65ad889 --- /dev/null +++ b/opal_security/models/opal_access_path_edge_filter.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OpalAccessPathEdgeFilter(BaseModel): + """ + Constraints on the access path edges themselves. + """ # noqa: E501 + direct_only: Optional[StrictBool] = Field(default=None, description="When true, only return direct (depth-1) principal-to-entitlement edges.", alias="directOnly") + access_duration_type: Optional[StrictStr] = Field(default=None, description="Constrain results by whether the terminal access expires.", alias="accessDurationType") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["directOnly", "accessDurationType"] + + @field_validator('access_duration_type') + def access_duration_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['EXPIRING_ONLY', 'PERMANENT_ONLY']): + raise ValueError("must be one of enum values ('EXPIRING_ONLY', 'PERMANENT_ONLY')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpalAccessPathEdgeFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpalAccessPathEdgeFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "directOnly": obj.get("directOnly"), + "accessDurationType": obj.get("accessDurationType") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/opal_access_path_query_body.py b/opal_security/models/opal_access_path_query_body.py new file mode 100644 index 0000000..3b341a7 --- /dev/null +++ b/opal_security/models/opal_access_path_query_body.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.access_entity_filters import AccessEntityFilters +from opal_security.models.access_relationship_filters import AccessRelationshipFilters +from opal_security.models.opal_access_path_edge_filter import OpalAccessPathEdgeFilter +from typing import Optional, Set +from typing_extensions import Self + +class OpalAccessPathQueryBody(BaseModel): + """ + Edge-query filters for an ACCESS OpalQuery. At least one of principalFilter or entitlementFilter is required. + """ # noqa: E501 + principal_filter: Optional[AccessEntityFilters] = Field(default=None, alias="principalFilter") + entitlement_filter: Optional[AccessEntityFilters] = Field(default=None, alias="entitlementFilter") + principal_access_filters: Optional[AccessRelationshipFilters] = Field(default=None, description="Advanced access filter on the principal side of each path. Restricts results to principals that additionally satisfy these access-edge constraints: `hasAccessTo` keeps only principals that also have access to a matching entity; `isAccessibleBy` keeps only principals that are also accessible by a matching entity. Only takes effect when `principalFilter` is also supplied (it refines that filter); on its own it has no effect. ", alias="principalAccessFilters") + entitlement_access_filters: Optional[AccessRelationshipFilters] = Field(default=None, description="Advanced access filter on the entitlement side of each path. Restricts results to entitlements that additionally satisfy these access-edge constraints: `hasAccessTo` keeps only entitlements that also have access to a matching entity; `isAccessibleBy` keeps only entitlements that are also accessible by a matching entity. Only takes effect when `entitlementFilter` is also supplied (it refines that filter); on its own it has no effect. ", alias="entitlementAccessFilters") + access_level_remote_ids: Optional[List[StrictStr]] = Field(default=None, description="Filter by access-level remote IDs on the terminal edge.", alias="accessLevelRemoteIds") + access_level_names: Optional[List[StrictStr]] = Field(default=None, description="Filter by access-level display names on the terminal edge.", alias="accessLevelNames") + edge_filter: Optional[OpalAccessPathEdgeFilter] = Field(default=None, alias="edgeFilter") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["principalFilter", "entitlementFilter", "principalAccessFilters", "entitlementAccessFilters", "accessLevelRemoteIds", "accessLevelNames", "edgeFilter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpalAccessPathQueryBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of principal_filter + if self.principal_filter: + _dict['principalFilter'] = self.principal_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of entitlement_filter + if self.entitlement_filter: + _dict['entitlementFilter'] = self.entitlement_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of principal_access_filters + if self.principal_access_filters: + _dict['principalAccessFilters'] = self.principal_access_filters.to_dict() + # override the default output from pydantic by calling `to_dict()` of entitlement_access_filters + if self.entitlement_access_filters: + _dict['entitlementAccessFilters'] = self.entitlement_access_filters.to_dict() + # override the default output from pydantic by calling `to_dict()` of edge_filter + if self.edge_filter: + _dict['edgeFilter'] = self.edge_filter.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpalAccessPathQueryBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "principalFilter": AccessEntityFilters.from_dict(obj["principalFilter"]) if obj.get("principalFilter") is not None else None, + "entitlementFilter": AccessEntityFilters.from_dict(obj["entitlementFilter"]) if obj.get("entitlementFilter") is not None else None, + "principalAccessFilters": AccessRelationshipFilters.from_dict(obj["principalAccessFilters"]) if obj.get("principalAccessFilters") is not None else None, + "entitlementAccessFilters": AccessRelationshipFilters.from_dict(obj["entitlementAccessFilters"]) if obj.get("entitlementAccessFilters") is not None else None, + "accessLevelRemoteIds": obj.get("accessLevelRemoteIds"), + "accessLevelNames": obj.get("accessLevelNames"), + "edgeFilter": OpalAccessPathEdgeFilter.from_dict(obj["edgeFilter"]) if obj.get("edgeFilter") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/opal_access_query.py b/opal_security/models/opal_access_query.py new file mode 100644 index 0000000..7b1003a --- /dev/null +++ b/opal_security/models/opal_access_query.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.opal_access_path_query_body import OpalAccessPathQueryBody +from typing import Optional, Set +from typing_extensions import Self + +class OpalAccessQuery(BaseModel): + """ + Use an Access query to retrieve access grants between principals (users or groups) and their entitlements (resources or groups), with one result per (principal, entitlement, access level). Every access path reaching that grant is returned as metadata on the result. Uses the same filters as an Access Path query; results are paginated. + """ # noqa: E501 + type: StrictStr + query: Optional[OpalAccessPathQueryBody] = None + first: Optional[StrictInt] = Field(default=None, description="Maximum number of results to return. Defaults to 200.") + after: Optional[StrictStr] = Field(default=None, description="Opaque cursor from a previous ACCESS response to fetch the next page of results.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "query", "first", "after"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ACCESS']): + raise ValueError("must be one of enum values ('ACCESS')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpalAccessQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of query + if self.query: + _dict['query'] = self.query.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpalAccessQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "query": OpalAccessPathQueryBody.from_dict(obj["query"]) if obj.get("query") is not None else None, + "first": obj.get("first"), + "after": obj.get("after") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/opal_access_query_results.py b/opal_security/models/opal_access_query_results.py new file mode 100644 index 0000000..bd957bf --- /dev/null +++ b/opal_security/models/opal_access_query_results.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from opal_security.models.opal_access_result_edge import OpalAccessResultEdge +from opal_security.models.page_info import PageInfo +from typing import Optional, Set +from typing_extensions import Self + +class OpalAccessQueryResults(BaseModel): + """ + Paginated results of an ACCESS-type OpalQuery — one edge per matched (principal, entitlement, access level) grant. + """ # noqa: E501 + type: StrictStr + edges: List[OpalAccessResultEdge] = Field(description="List of matched access grants.") + page_info: PageInfo = Field(alias="pageInfo") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "edges", "pageInfo"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ACCESS']): + raise ValueError("must be one of enum values ('ACCESS')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpalAccessQueryResults from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in edges (list) + _items = [] + if self.edges: + for _item_edges in self.edges: + if _item_edges: + _items.append(_item_edges.to_dict()) + _dict['edges'] = _items + # override the default output from pydantic by calling `to_dict()` of page_info + if self.page_info: + _dict['pageInfo'] = self.page_info.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpalAccessQueryResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "edges": [OpalAccessResultEdge.from_dict(_item) for _item in obj["edges"]] if obj.get("edges") is not None else None, + "pageInfo": PageInfo.from_dict(obj["pageInfo"]) if obj.get("pageInfo") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/opal_access_result_edge.py b/opal_security/models/opal_access_result_edge.py new file mode 100644 index 0000000..f51ac50 --- /dev/null +++ b/opal_security/models/opal_access_result_edge.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from opal_security.models.opal_access_result_node import OpalAccessResultNode +from typing import Optional, Set +from typing_extensions import Self + +class OpalAccessResultEdge(BaseModel): + """ + A single ACCESS result edge containing the matched access grant and its pagination cursor. + """ # noqa: E501 + node: OpalAccessResultNode + cursor: StrictStr = Field(description="Opaque cursor for this grant, used for pagination.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["node", "cursor"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpalAccessResultEdge from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of node + if self.node: + _dict['node'] = self.node.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpalAccessResultEdge from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "node": OpalAccessResultNode.from_dict(obj["node"]) if obj.get("node") is not None else None, + "cursor": obj.get("cursor") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/opal_access_result_node.py b/opal_security/models/opal_access_result_node.py new file mode 100644 index 0000000..89b6d23 --- /dev/null +++ b/opal_security/models/opal_access_result_node.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.opal_access_path_detail import OpalAccessPathDetail +from typing import Optional, Set +from typing_extensions import Self + +class OpalAccessResultNode(BaseModel): + """ + A matched access grant from an ACCESS OpalQuery — one per (principal, entitlement, access level), with every access path as metadata. + """ # noqa: E501 + principal_id: UUID = Field(description="The principal entity ID.", alias="principalId") + entitlement_id: UUID = Field(description="The entitlement entity ID.", alias="entitlementId") + access_level_remote_id: Optional[StrictStr] = Field(default=None, description="Remote ID of the access level.", alias="accessLevelRemoteId") + access_level_name: Optional[StrictStr] = Field(default=None, description="Display name of the access level.", alias="accessLevelName") + effective_expiration: Optional[datetime] = Field(default=None, description="The expiration in effect across all paths (the latest-expiring; a permanent path wins). Null means access never expires.", alias="effectiveExpiration") + is_direct: StrictBool = Field(description="True when any path is a direct grant.", alias="isDirect") + paths: List[OpalAccessPathDetail] = Field(description="Every access path reaching this grant.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["principalId", "entitlementId", "accessLevelRemoteId", "accessLevelName", "effectiveExpiration", "isDirect", "paths"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpalAccessResultNode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in paths (list) + _items = [] + if self.paths: + for _item_paths in self.paths: + if _item_paths: + _items.append(_item_paths.to_dict()) + _dict['paths'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpalAccessResultNode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "principalId": obj.get("principalId"), + "entitlementId": obj.get("entitlementId"), + "accessLevelRemoteId": obj.get("accessLevelRemoteId"), + "accessLevelName": obj.get("accessLevelName"), + "effectiveExpiration": obj.get("effectiveExpiration"), + "isDirect": obj.get("isDirect"), + "paths": [OpalAccessPathDetail.from_dict(_item) for _item in obj["paths"]] if obj.get("paths") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/opal_node_query.py b/opal_security/models/opal_node_query.py index 35b278b..751f5c3 100644 --- a/opal_security/models/opal_node_query.py +++ b/opal_security/models/opal_node_query.py @@ -26,7 +26,7 @@ class OpalNodeQuery(BaseModel): """ - Request body for a NODE-type OpalQuery. Returns entities (users, resources, groups) matching the given filters. + Use a Node query to retrieve entities — users, resources, or groups — that match a set of filters. You can filter by entity type, tags, and access relationships. Results are paginated and returned as a list of entity edges. """ # noqa: E501 type: StrictStr query: Optional[OpalNodeQueryBody] = None diff --git a/opal_security/models/opal_query_results.py b/opal_security/models/opal_query_results.py new file mode 100644 index 0000000..e195b87 --- /dev/null +++ b/opal_security/models/opal_query_results.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from opal_security.models.opal_access_query_results import OpalAccessQueryResults +from opal_security.models.opal_node_query_results import OpalNodeQueryResults +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +OPALQUERYRESULTS_ONE_OF_SCHEMAS = ["OpalAccessQueryResults", "OpalNodeQueryResults"] + +class OpalQueryResults(BaseModel): + """ + Paginated results of an OpalQuery. The `type` field discriminates which result schema applies and mirrors the `type` field on the request. + """ + # data type: OpalNodeQueryResults + oneof_schema_1_validator: Optional[OpalNodeQueryResults] = None + # data type: OpalAccessQueryResults + oneof_schema_2_validator: Optional[OpalAccessQueryResults] = None + actual_instance: Optional[Union[OpalAccessQueryResults, OpalNodeQueryResults]] = None + one_of_schemas: Set[str] = { "OpalAccessQueryResults", "OpalNodeQueryResults" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = OpalQueryResults.model_construct() + error_messages = [] + match = 0 + # validate data type: OpalNodeQueryResults + if not isinstance(v, OpalNodeQueryResults): + error_messages.append(f"Error! Input type `{type(v)}` is not `OpalNodeQueryResults`") + else: + match += 1 + # validate data type: OpalAccessQueryResults + if not isinstance(v, OpalAccessQueryResults): + error_messages.append(f"Error! Input type `{type(v)}` is not `OpalAccessQueryResults`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in OpalQueryResults with oneOf schemas: OpalAccessQueryResults, OpalNodeQueryResults. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in OpalQueryResults with oneOf schemas: OpalAccessQueryResults, OpalNodeQueryResults. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into OpalNodeQueryResults + try: + instance.actual_instance = OpalNodeQueryResults.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OpalAccessQueryResults + try: + instance.actual_instance = OpalAccessQueryResults.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into OpalQueryResults with oneOf schemas: OpalAccessQueryResults, OpalNodeQueryResults. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into OpalQueryResults with oneOf schemas: OpalAccessQueryResults, OpalNodeQueryResults. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], OpalAccessQueryResults, OpalNodeQueryResults]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/opal_security/models/opal_script.py b/opal_security/models/opal_script.py new file mode 100644 index 0000000..930bea5 --- /dev/null +++ b/opal_security/models/opal_script.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.opal_script_type_enum import OpalScriptTypeEnum +from typing import Optional, Set +from typing_extensions import Self + +class OpalScript(BaseModel): + """ + # OpalScript Object ### Description The `OpalScript` object represents an OpalScript: a Starlark script that automates part of Opal's access lifecycle. + """ # noqa: E501 + opal_script_id: UUID = Field(description="The ID of the OpalScript.") + name: StrictStr = Field(description="The name of the OpalScript.") + script_type: OpalScriptTypeEnum + script: StrictStr = Field(description="The source of the OpalScript's latest version.") + version: StrictInt = Field(description="The version number of the OpalScript's latest version.") + updated_at: Optional[datetime] = Field(default=None, description="The date the OpalScript was last updated.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["opal_script_id", "name", "script_type", "script", "version", "updated_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpalScript from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpalScript from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "opal_script_id": obj.get("opal_script_id"), + "name": obj.get("name"), + "script_type": obj.get("script_type"), + "script": obj.get("script"), + "version": obj.get("version"), + "updated_at": obj.get("updated_at") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/opal_script_list.py b/opal_security/models/opal_script_list.py new file mode 100644 index 0000000..a55e7ea --- /dev/null +++ b/opal_security/models/opal_script_list.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from opal_security.models.opal_script import OpalScript +from typing import Optional, Set +from typing_extensions import Self + +class OpalScriptList(BaseModel): + """ + # OpalScriptList Object ### Description A list of `OpalScript` objects. + """ # noqa: E501 + results: List[OpalScript] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpalScriptList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpalScriptList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [OpalScript.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/opal_script_type_enum.py b/opal_security/models/opal_script_type_enum.py new file mode 100644 index 0000000..bf46cc5 --- /dev/null +++ b/opal_security/models/opal_script_type_enum.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class OpalScriptTypeEnum(str, Enum): + """ + The kind of automation an OpalScript performs. + """ + + """ + allowed enum values + """ + REQUEST_REVIEW = 'REQUEST_REVIEW' + REQUEST_DELEGATION_CONDITION = 'REQUEST_DELEGATION_CONDITION' + CONTEXT_PROVIDER = 'CONTEXT_PROVIDER' + REQUEST_CONFIGURATION_CONDITION = 'REQUEST_CONFIGURATION_CONDITION' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OpalScriptTypeEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/paginated_campaign_items_list.py b/opal_security/models/paginated_campaign_items_list.py new file mode 100644 index 0000000..76a76d4 --- /dev/null +++ b/opal_security/models/paginated_campaign_items_list.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.campaign_item import CampaignItem +from typing import Optional, Set +from typing_extensions import Self + +class PaginatedCampaignItemsList(BaseModel): + """ + A paginated list of campaign items. + """ # noqa: E501 + next: Optional[StrictStr] = Field(default=None, description="The cursor with which to continue pagination if additional result pages exist.") + previous: Optional[StrictStr] = Field(default=None, description="The cursor used to obtain the current result page.") + results: List[CampaignItem] + total_count: StrictInt = Field(description="Total number of items matching the filter (across all pages).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["next", "previous", "results", "total_count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginatedCampaignItemsList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaginatedCampaignItemsList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "next": obj.get("next"), + "previous": obj.get("previous"), + "results": [CampaignItem.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "total_count": obj.get("total_count") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/paginated_campaigns_list.py b/opal_security/models/paginated_campaigns_list.py new file mode 100644 index 0000000..6bbb552 --- /dev/null +++ b/opal_security/models/paginated_campaigns_list.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.campaign import Campaign +from typing import Optional, Set +from typing_extensions import Self + +class PaginatedCampaignsList(BaseModel): + """ + A list of campaigns. + """ # noqa: E501 + next: Optional[StrictStr] = Field(default=None, description="The cursor with which to continue pagination if additional result pages exist.") + previous: Optional[StrictStr] = Field(default=None, description="The cursor used to obtain the current result page.") + results: List[Campaign] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["next", "previous", "results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginatedCampaignsList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaginatedCampaignsList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "next": obj.get("next"), + "previous": obj.get("previous"), + "results": [Campaign.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/paginated_request_template_list.py b/opal_security/models/paginated_request_template_list.py new file mode 100644 index 0000000..276880f --- /dev/null +++ b/opal_security/models/paginated_request_template_list.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.request_template import RequestTemplate +from typing import Optional, Set +from typing_extensions import Self + +class PaginatedRequestTemplateList(BaseModel): + """ + PaginatedRequestTemplateList + """ # noqa: E501 + next: Optional[StrictStr] = Field(default=None, description="The cursor with which to continue pagination if additional result pages exist.") + previous: Optional[StrictStr] = Field(default=None, description="The cursor used to obtain the current result page.") + results: Optional[List[RequestTemplate]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["next", "previous", "results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginatedRequestTemplateList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaginatedRequestTemplateList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "next": obj.get("next"), + "previous": obj.get("previous"), + "results": [RequestTemplate.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/paginated_role_assignments_list.py b/opal_security/models/paginated_role_assignments_list.py new file mode 100644 index 0000000..c23b33f --- /dev/null +++ b/opal_security/models/paginated_role_assignments_list.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.role_assignment import RoleAssignment +from typing import Optional, Set +from typing_extensions import Self + +class PaginatedRoleAssignmentsList(BaseModel): + """ + A paginated page of role assignments. + """ # noqa: E501 + next: Optional[StrictStr] = Field(default=None, description="The cursor with which to continue pagination if additional result pages exist.") + previous: Optional[StrictStr] = Field(default=None, description="The cursor used to obtain the current result page.") + results: List[RoleAssignment] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["next", "previous", "results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginatedRoleAssignmentsList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaginatedRoleAssignmentsList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "next": obj.get("next"), + "previous": obj.get("previous"), + "results": [RoleAssignment.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/paginated_viewer_campaign_items_list.py b/opal_security/models/paginated_viewer_campaign_items_list.py new file mode 100644 index 0000000..76a79c0 --- /dev/null +++ b/opal_security/models/paginated_viewer_campaign_items_list.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.viewer_campaign_item import ViewerCampaignItem +from typing import Optional, Set +from typing_extensions import Self + +class PaginatedViewerCampaignItemsList(BaseModel): + """ + A paginated list of viewer campaign items. + """ # noqa: E501 + next: Optional[StrictStr] = Field(default=None, description="The cursor with which to continue pagination if additional result pages exist. ") + previous: Optional[StrictStr] = Field(default=None, description="The cursor used to obtain the current result page.") + results: List[ViewerCampaignItem] + total_count: StrictInt = Field(description="Total number of items matching the filter (across all pages).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["next", "previous", "results", "total_count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginatedViewerCampaignItemsList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaginatedViewerCampaignItemsList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "next": obj.get("next"), + "previous": obj.get("previous"), + "results": [ViewerCampaignItem.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "total_count": obj.get("total_count") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/paladin.py b/opal_security/models/paladin.py new file mode 100644 index 0000000..456a5f6 --- /dev/null +++ b/opal_security/models/paladin.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from uuid import UUID +from opal_security.models.paladin_connector import PaladinConnector +from typing import Optional, Set +from typing_extensions import Self + +class Paladin(BaseModel): + """ + # Paladin Object ### Description The `Paladin` object represents a Paladin, Opal's AI access-request reviewer. + """ # noqa: E501 + paladin_id: UUID = Field(description="The ID of the Paladin. Use this value as a reviewer in a request configuration's service_user_ids.") + name: StrictStr = Field(description="The name of the Paladin.") + owner_id: UUID = Field(description="The ID of the owner of the Paladin.") + monitor_mode: StrictBool = Field(description="When true, the Paladin reasons about requests but takes no action. Shown as \"Monitor mode\" in the UI.") + admin_view_only: StrictBool = Field(description="When true, the Paladin's recommendations are visible only to admins. Only meaningful when monitor_mode is true.") + enabled_connectors: List[PaladinConnector] = Field(description="The connectors the Paladin is allowed to use.") + instructions: StrictStr = Field(description="The free-form instructions that guide the Paladin's decisions.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["paladin_id", "name", "owner_id", "monitor_mode", "admin_view_only", "enabled_connectors", "instructions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Paladin from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Paladin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "paladin_id": obj.get("paladin_id"), + "name": obj.get("name"), + "owner_id": obj.get("owner_id"), + "monitor_mode": obj.get("monitor_mode"), + "admin_view_only": obj.get("admin_view_only"), + "enabled_connectors": obj.get("enabled_connectors"), + "instructions": obj.get("instructions") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/paladin_connector.py b/opal_security/models/paladin_connector.py new file mode 100644 index 0000000..73ae4a1 --- /dev/null +++ b/opal_security/models/paladin_connector.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class PaladinConnector(str, Enum): + """ + A connector a Paladin is allowed to use. + """ + + """ + allowed enum values + """ + NOTION = 'NOTION' + JIRA = 'JIRA' + LINEAR = 'LINEAR' + SERVICE_NOW = 'SERVICE_NOW' + NOTION_TICKETS = 'NOTION_TICKETS' + FRESH_SERVICE = 'FRESH_SERVICE' + SHORTCUT = 'SHORTCUT' + SLACK = 'SLACK' + PAGER_DUTY = 'PAGER_DUTY' + CONFLUENCE = 'CONFLUENCE' + FLEET_DM = 'FLEET_DM' + FRESH_SERVICE_KNOWLEDGE = 'FRESH_SERVICE_KNOWLEDGE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of PaladinConnector from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/paladin_context_source.py b/opal_security/models/paladin_context_source.py new file mode 100644 index 0000000..b6cef0c --- /dev/null +++ b/opal_security/models/paladin_context_source.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from uuid import UUID +from opal_security.models.paladin_context_source_kind import PaladinContextSourceKind +from opal_security.models.paladin_context_source_provider import PaladinContextSourceProvider +from typing import Optional, Set +from typing_extensions import Self + +class PaladinContextSource(BaseModel): + """ + # PaladinContextSource Object ### Description A context source (a Slack channel or a document) that a Paladin is configured to read during access-request review. + """ # noqa: E501 + id: UUID = Field(description="The ID of the context source.") + paladin_id: UUID = Field(description="The ID of the Paladin this source belongs to.") + source_kind: PaladinContextSourceKind + third_party_provider: PaladinContextSourceProvider + remote_id: StrictStr = Field(description="The provider's identifier for the source. The Slack channel ID for a channel, or the Notion/Confluence page ID or numeric Freshservice article ID for a document.") + name: StrictStr = Field(description="A human-readable name for the source.") + url: StrictStr = Field(description="A link to the source.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "paladin_id", "source_kind", "third_party_provider", "remote_id", "name", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaladinContextSource from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaladinContextSource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "paladin_id": obj.get("paladin_id"), + "source_kind": obj.get("source_kind"), + "third_party_provider": obj.get("third_party_provider"), + "remote_id": obj.get("remote_id"), + "name": obj.get("name"), + "url": obj.get("url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/paladin_context_source_kind.py b/opal_security/models/paladin_context_source_kind.py new file mode 100644 index 0000000..01cac23 --- /dev/null +++ b/opal_security/models/paladin_context_source_kind.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class PaladinContextSourceKind(str, Enum): + """ + The kind of source a Paladin can read. A SLACK_CHANNEL is a Slack channel; a DOCUMENT is a Notion or Confluence page or a Freshservice knowledge base article. + """ + + """ + allowed enum values + """ + SLACK_CHANNEL = 'SLACK_CHANNEL' + DOCUMENT = 'DOCUMENT' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of PaladinContextSourceKind from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/paladin_context_source_list.py b/opal_security/models/paladin_context_source_list.py new file mode 100644 index 0000000..fd25ffb --- /dev/null +++ b/opal_security/models/paladin_context_source_list.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from opal_security.models.paladin_context_source import PaladinContextSource +from typing import Optional, Set +from typing_extensions import Self + +class PaladinContextSourceList(BaseModel): + """ + # PaladinContextSourceList Object ### Description A list of `PaladinContextSource` objects. + """ # noqa: E501 + results: List[PaladinContextSource] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaladinContextSourceList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaladinContextSourceList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [PaladinContextSource.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/paladin_context_source_provider.py b/opal_security/models/paladin_context_source_provider.py new file mode 100644 index 0000000..0786a31 --- /dev/null +++ b/opal_security/models/paladin_context_source_provider.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class PaladinContextSourceProvider(str, Enum): + """ + The integration a Paladin context source comes from. + """ + + """ + allowed enum values + """ + SLACK = 'SLACK' + NOTION = 'NOTION' + CONFLUENCE = 'CONFLUENCE' + FRESH_SERVICE = 'FRESH_SERVICE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of PaladinContextSourceProvider from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/paladin_list.py b/opal_security/models/paladin_list.py new file mode 100644 index 0000000..ade820b --- /dev/null +++ b/opal_security/models/paladin_list.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from opal_security.models.paladin import Paladin +from typing import Optional, Set +from typing_extensions import Self + +class PaladinList(BaseModel): + """ + # PaladinList Object ### Description A list of `Paladin` objects. + """ # noqa: E501 + results: List[Paladin] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaladinList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaladinList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [Paladin.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/propagation_status_enum.py b/opal_security/models/propagation_status_enum.py index 0a98d55..af0424b 100644 --- a/opal_security/models/propagation_status_enum.py +++ b/opal_security/models/propagation_status_enum.py @@ -48,6 +48,8 @@ class PropagationStatusEnum(str, Enum): ERR_DRY_RUN_MODE_ENABLED = 'ERR_DRY_RUN_MODE_ENABLED' ERR_HR_IDP_PROVIDER_NOT_LINKED = 'ERR_HR_IDP_PROVIDER_NOT_LINKED' ERR_REMOTE_UNRECOVERABLE_ERROR = 'ERR_REMOTE_UNRECOVERABLE_ERROR' + ERR_REMOTE_TICKET_NOT_FOUND = 'ERR_REMOTE_TICKET_NOT_FOUND' + ERR_CONNECTION_VALIDATION_FAILED = 'ERR_CONNECTION_VALIDATION_FAILED' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/opal_security/models/remove_role_assignment_input.py b/opal_security/models/remove_role_assignment_input.py new file mode 100644 index 0000000..79169e5 --- /dev/null +++ b/opal_security/models/remove_role_assignment_input.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.entity_type_enum import EntityTypeEnum +from typing import Optional, Set +from typing_extensions import Self + +class RemoveRoleAssignmentInput(BaseModel): + """ + A single role assignment to revoke. + """ # noqa: E501 + entity_id: UUID = Field(description="The ID of the entity (resource or group) to revoke access from.") + entity_type: EntityTypeEnum + principal_id: UUID = Field(description="The ID of the principal (user, group, or resource) losing access.") + principal_type: EntityTypeEnum + access_level_remote_id: Optional[StrictStr] = Field(default=None, description="Remote ID of the specific access-level grant to revoke. The lookup is exact-match on this value against stored grants. Required when the entity has access levels defined (the server returns 422 if omitted or sent as `null`/empty for such an entity). Must be omitted or `null` for entities with no access-level catalog (group memberships and resources that have no defined access levels); supplying a value in that case also returns 422. These rules mirror those of `POST /v1/role-assignments`. A specified value that does not match any stored grant for this `(entity_id, principal_id)` pair is a successful idempotent no-op: HTTP 200 is returned and the entry is absent from `entries`. ") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["entity_id", "entity_type", "principal_id", "principal_type", "access_level_remote_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemoveRoleAssignmentInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemoveRoleAssignmentInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "entity_id": obj.get("entity_id"), + "entity_type": obj.get("entity_type"), + "principal_id": obj.get("principal_id"), + "principal_type": obj.get("principal_type"), + "access_level_remote_id": obj.get("access_level_remote_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/remove_role_assignments_entry.py b/opal_security/models/remove_role_assignments_entry.py new file mode 100644 index 0000000..8a2e877 --- /dev/null +++ b/opal_security/models/remove_role_assignments_entry.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from opal_security.models.role_assignment import RoleAssignment +from typing import Optional, Set +from typing_extensions import Self + +class RemoveRoleAssignmentsEntry(BaseModel): + """ + A single revoked role assignment in a `RemoveRoleAssignmentsResponse`. + """ # noqa: E501 + role_assignment: RoleAssignment + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["role_assignment"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemoveRoleAssignmentsEntry from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of role_assignment + if self.role_assignment: + _dict['role_assignment'] = self.role_assignment.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemoveRoleAssignmentsEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "role_assignment": RoleAssignment.from_dict(obj["role_assignment"]) if obj.get("role_assignment") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/remove_role_assignments_request.py b/opal_security/models/remove_role_assignments_request.py new file mode 100644 index 0000000..faede82 --- /dev/null +++ b/opal_security/models/remove_role_assignments_request.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from opal_security.models.remove_role_assignment_input import RemoveRoleAssignmentInput +from typing import Optional, Set +from typing_extensions import Self + +class RemoveRoleAssignmentsRequest(BaseModel): + """ + Request body for `DELETE /role-assignments`. + """ # noqa: E501 + role_assignments: Annotated[List[RemoveRoleAssignmentInput], Field(min_length=1, max_length=100)] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["role_assignments"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemoveRoleAssignmentsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in role_assignments (list) + _items = [] + if self.role_assignments: + for _item_role_assignments in self.role_assignments: + if _item_role_assignments: + _items.append(_item_role_assignments.to_dict()) + _dict['role_assignments'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemoveRoleAssignmentsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "role_assignments": [RemoveRoleAssignmentInput.from_dict(_item) for _item in obj["role_assignments"]] if obj.get("role_assignments") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/remove_role_assignments_response.py b/opal_security/models/remove_role_assignments_response.py new file mode 100644 index 0000000..935ae59 --- /dev/null +++ b/opal_security/models/remove_role_assignments_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from opal_security.models.remove_role_assignments_entry import RemoveRoleAssignmentsEntry +from typing import Optional, Set +from typing_extensions import Self + +class RemoveRoleAssignmentsResponse(BaseModel): + """ + Response body for `DELETE /role-assignments`. + """ # noqa: E501 + task_ids: List[StrictStr] = Field(description="Opaque identifiers for the push tasks enqueued to propagate the revocation to the end system. Encoded identically to the `PushTaskId` scalar in the GraphQL API (base64 of the underlying protobuf). One ID per deferred revocation (today, resource/user grants are always deferred); empty when every revocation completed inline (resource/group, group/user, group/group).") + entries: List[RemoveRoleAssignmentsEntry] = Field(description="One entry per role assignment that was removed inline. Shorter than the request when some assignments did not exist (idempotent), and empty when every revocation in the batch was deferred to an async propagation task — in that case `task_ids` carries one ID per deferred revocation and `entries` is empty. Resource/user grants are currently always deferred; the other `(entity, principal)` combinations complete inline and populate `entries`.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["task_ids", "entries"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemoveRoleAssignmentsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in entries (list) + _items = [] + if self.entries: + for _item_entries in self.entries: + if _item_entries: + _items.append(_item_entries.to_dict()) + _dict['entries'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemoveRoleAssignmentsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "task_ids": obj.get("task_ids"), + "entries": [RemoveRoleAssignmentsEntry.from_dict(_item) for _item in obj["entries"]] if obj.get("entries") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/request.py b/opal_security/models/request.py index 4f6ae22..618a4f7 100644 --- a/opal_security/models/request.py +++ b/opal_security/models/request.py @@ -19,7 +19,7 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from uuid import UUID from opal_security.models.request_custom_field_response import RequestCustomFieldResponse @@ -38,9 +38,11 @@ class Request(BaseModel): created_at: datetime = Field(description="The date and time the request was created.") updated_at: datetime = Field(description="The date and time the request was last updated.") requester_id: UUID = Field(description="The unique identifier of the user who created the request.") + initiated_by_user_id: Optional[UUID] = Field(default=None, description="The unique identifier of the user the caller asserted asked for this access. Unverified - Opal records the claim as given. Absent unless the caller supplied it.") target_user_id: Optional[UUID] = Field(default=None, description="The unique identifier of the user who is the target of the request.") target_group_id: Optional[UUID] = Field(default=None, description="The unique identifier of the group who is the target of the request.") status: RequestStatusEnum = Field(description="The status of the request.") + source: Optional[StrictStr] = Field(default=None, description="The channel that created the request. Omitted when the source was not recorded. MCP counts only OAuth sessions. An agent using an API token or a person's credentials is counted as API, CLI, or WEB.") reason: StrictStr = Field(description="The reason for the request.") duration_minutes: Optional[StrictInt] = Field(default=None, description="The duration of the request in minutes.") requested_items_list: Optional[List[RequestedItem]] = Field(default=None, description="The list of targets for the request.") @@ -48,7 +50,17 @@ class Request(BaseModel): stages: Optional[RequestItemStages] = Field(default=None, description="The stages configuration for this request") reviewer_stages: Optional[RequestReviewerStages] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "requester_id", "target_user_id", "target_group_id", "status", "reason", "duration_minutes", "requested_items_list", "custom_fields_responses", "stages", "reviewer_stages"] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "requester_id", "initiated_by_user_id", "target_user_id", "target_group_id", "status", "source", "reason", "duration_minutes", "requested_items_list", "custom_fields_responses", "stages", "reviewer_stages"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['WEB', 'SLACK', 'MICROSOFT_TEAMS', 'CLI', 'API', 'MCP', 'ACCESS_REVIEW']): + raise ValueError("must be one of enum values ('WEB', 'SLACK', 'MICROSOFT_TEAMS', 'CLI', 'API', 'MCP', 'ACCESS_REVIEW')") + return value model_config = ConfigDict( populate_by_name=True, @@ -132,9 +144,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "created_at": obj.get("created_at"), "updated_at": obj.get("updated_at"), "requester_id": obj.get("requester_id"), + "initiated_by_user_id": obj.get("initiated_by_user_id"), "target_user_id": obj.get("target_user_id"), "target_group_id": obj.get("target_group_id"), "status": obj.get("status"), + "source": obj.get("source"), "reason": obj.get("reason"), "duration_minutes": obj.get("duration_minutes"), "requested_items_list": [RequestedItem.from_dict(_item) for _item in obj["requested_items_list"]] if obj.get("requested_items_list") is not None else None, diff --git a/opal_security/models/request_configuration.py b/opal_security/models/request_configuration.py index d8853e9..550da7e 100644 --- a/opal_security/models/request_configuration.py +++ b/opal_security/models/request_configuration.py @@ -34,15 +34,16 @@ class RequestConfiguration(BaseModel): allow_requests: StrictBool = Field(description="A bool representing whether or not to allow requests for this resource.") auto_approval: StrictBool = Field(description="A bool representing whether or not to automatically approve requests for this resource.") require_mfa_to_request: StrictBool = Field(description="A bool representing whether or not to require MFA for requesting access to this resource.") - max_duration_minutes: Optional[StrictInt] = Field(default=None, description="The maximum duration for which the resource can be requested (in minutes).") + max_duration_minutes: Optional[StrictInt] = Field(default=None, description="The maximum duration for which the resource can be requested (in minutes). Capped at 1 year (525600) unless a longer maximum has been enabled for your organization. Use -1 for an indefinite duration.") recommended_duration_minutes: Optional[StrictInt] = Field(default=None, description="The recommended duration for which the resource should be requested (in minutes). -1 represents an indefinite duration.") require_support_ticket: StrictBool = Field(description="A bool representing whether or not access requests to the resource require an access ticket.") + reason_optional: Optional[StrictBool] = Field(default=None, description="A bool representing whether the reason field is optional for requests.") extensions_duration_in_minutes: Optional[StrictInt] = Field(default=None, description="The duration for which access can be extended (in minutes). Set to 0 to disable extensions. When > 0, extensions are enabled for the specified duration.") request_template_id: Optional[UUID] = Field(default=None, description="The ID of the associated request template.") reviewer_stages: Optional[List[ReviewerStage]] = Field(default=None, description="The list of reviewer stages for the request configuration.") priority: StrictInt = Field(description="The priority of the request configuration.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["condition", "allow_requests", "auto_approval", "require_mfa_to_request", "max_duration_minutes", "recommended_duration_minutes", "require_support_ticket", "extensions_duration_in_minutes", "request_template_id", "reviewer_stages", "priority"] + __properties: ClassVar[List[str]] = ["condition", "allow_requests", "auto_approval", "require_mfa_to_request", "max_duration_minutes", "recommended_duration_minutes", "require_support_ticket", "reason_optional", "extensions_duration_in_minutes", "request_template_id", "reviewer_stages", "priority"] model_config = ConfigDict( populate_by_name=True, @@ -119,6 +120,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "max_duration_minutes": obj.get("max_duration_minutes"), "recommended_duration_minutes": obj.get("recommended_duration_minutes"), "require_support_ticket": obj.get("require_support_ticket"), + "reason_optional": obj.get("reason_optional"), "extensions_duration_in_minutes": obj.get("extensions_duration_in_minutes"), "request_template_id": obj.get("request_template_id"), "reviewer_stages": [ReviewerStage.from_dict(_item) for _item in obj["reviewer_stages"]] if obj.get("reviewer_stages") is not None else None, diff --git a/opal_security/models/request_template.py b/opal_security/models/request_template.py new file mode 100644 index 0000000..0b9ec98 --- /dev/null +++ b/opal_security/models/request_template.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.request_template_custom_field import RequestTemplateCustomField +from typing import Optional, Set +from typing_extensions import Self + +class RequestTemplate(BaseModel): + """ + A template describing what a requester is asked when requesting access. + """ # noqa: E501 + request_template_id: UUID = Field(description="The ID of the request template.") + name: StrictStr = Field(description="The name of the request template.") + custom_fields: Optional[List[RequestTemplateCustomField]] = Field(default=None, description="The fields on this template, in the order they are shown.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["request_template_id", "name", "custom_fields"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RequestTemplate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) + _items = [] + if self.custom_fields: + for _item_custom_fields in self.custom_fields: + if _item_custom_fields: + _items.append(_item_custom_fields.to_dict()) + _dict['custom_fields'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RequestTemplate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "request_template_id": obj.get("request_template_id"), + "name": obj.get("name"), + "custom_fields": [RequestTemplateCustomField.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/request_template_custom_field.py b/opal_security/models/request_template_custom_field.py new file mode 100644 index 0000000..bc5fe0c --- /dev/null +++ b/opal_security/models/request_template_custom_field.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.request_template_custom_field_metadata import RequestTemplateCustomFieldMetadata +from opal_security.models.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum +from typing import Optional, Set +from typing_extensions import Self + +class RequestTemplateCustomField(BaseModel): + """ + A field on a request template. + """ # noqa: E501 + name: StrictStr = Field(description="The label shown to the requester. `CALLOUT` fields are display-only, so their name is an internal identifier and is never displayed.") + description: Optional[StrictStr] = Field(default=None, description="Helper text shown beneath the field.") + type: RequestTemplateCustomFieldTypeEnum + required: Optional[StrictBool] = Field(default=None, description="Whether the requester must answer. Always false for `CALLOUT` fields, which collect no answer.") + metadata: Optional[RequestTemplateCustomFieldMetadata] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "description", "type", "required", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RequestTemplateCustomField from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RequestTemplateCustomField from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "type": obj.get("type"), + "required": obj.get("required"), + "metadata": RequestTemplateCustomFieldMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/request_template_custom_field_callout_metadata.py b/opal_security/models/request_template_custom_field_callout_metadata.py new file mode 100644 index 0000000..119c267 --- /dev/null +++ b/opal_security/models/request_template_custom_field_callout_metadata.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class RequestTemplateCustomFieldCalloutMetadata(BaseModel): + """ + The message shown to a requester by a `CALLOUT` field, and how prominently to show it. + """ # noqa: E501 + severity: StrictStr = Field(description="How prominently the message is shown.") + text: StrictStr = Field(description="The message shown to the requester.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["severity", "text"] + + @field_validator('severity') + def severity_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['INFO', 'WARNING', 'ERROR']): + raise ValueError("must be one of enum values ('INFO', 'WARNING', 'ERROR')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RequestTemplateCustomFieldCalloutMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RequestTemplateCustomFieldCalloutMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "severity": obj.get("severity"), + "text": obj.get("text") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/request_template_custom_field_input.py b/opal_security/models/request_template_custom_field_input.py new file mode 100644 index 0000000..b8fa7b6 --- /dev/null +++ b/opal_security/models/request_template_custom_field_input.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.request_template_custom_field_metadata import RequestTemplateCustomFieldMetadata +from opal_security.models.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum +from typing import Optional, Set +from typing_extensions import Self + +class RequestTemplateCustomFieldInput(BaseModel): + """ + A field to put on a request template. Separate from `RequestTemplateCustomField` because a callout's name may be omitted on write, while a field read back always has one. + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The label shown to the requester. Required for every type except `CALLOUT`, which is display-only -- its name is an internal identifier, never displayed, and is generated if omitted.") + description: Optional[StrictStr] = Field(default=None, description="Helper text shown beneath the field.") + type: RequestTemplateCustomFieldTypeEnum + required: Optional[StrictBool] = Field(default=None, description="Whether the requester must answer. Ignored for `CALLOUT` fields, which collect no answer.") + metadata: Optional[RequestTemplateCustomFieldMetadata] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "description", "type", "required", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RequestTemplateCustomFieldInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RequestTemplateCustomFieldInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "type": obj.get("type"), + "required": obj.get("required"), + "metadata": RequestTemplateCustomFieldMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/request_template_custom_field_metadata.py b/opal_security/models/request_template_custom_field_metadata.py new file mode 100644 index 0000000..2644042 --- /dev/null +++ b/opal_security/models/request_template_custom_field_metadata.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.request_template_custom_field_callout_metadata import RequestTemplateCustomFieldCalloutMetadata +from opal_security.models.request_template_custom_field_multi_choice_metadata import RequestTemplateCustomFieldMultiChoiceMetadata +from typing import Optional, Set +from typing_extensions import Self + +class RequestTemplateCustomFieldMetadata(BaseModel): + """ + Extra configuration for field types that need it. Exactly one member is set, and which one is determined by the field's `type`. + """ # noqa: E501 + callout_data: Optional[RequestTemplateCustomFieldCalloutMetadata] = None + multi_choice_data: Optional[RequestTemplateCustomFieldMultiChoiceMetadata] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["callout_data", "multi_choice_data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RequestTemplateCustomFieldMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of callout_data + if self.callout_data: + _dict['callout_data'] = self.callout_data.to_dict() + # override the default output from pydantic by calling `to_dict()` of multi_choice_data + if self.multi_choice_data: + _dict['multi_choice_data'] = self.multi_choice_data.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RequestTemplateCustomFieldMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "callout_data": RequestTemplateCustomFieldCalloutMetadata.from_dict(obj["callout_data"]) if obj.get("callout_data") is not None else None, + "multi_choice_data": RequestTemplateCustomFieldMultiChoiceMetadata.from_dict(obj["multi_choice_data"]) if obj.get("multi_choice_data") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/request_template_custom_field_multi_choice_metadata.py b/opal_security/models/request_template_custom_field_multi_choice_metadata.py new file mode 100644 index 0000000..83ccec7 --- /dev/null +++ b/opal_security/models/request_template_custom_field_multi_choice_metadata.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class RequestTemplateCustomFieldMultiChoiceMetadata(BaseModel): + """ + The options a requester can pick from in a `MULTI_CHOICE` or `MULTI_SELECT` field. + """ # noqa: E501 + options: List[StrictStr] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["options"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RequestTemplateCustomFieldMultiChoiceMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RequestTemplateCustomFieldMultiChoiceMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "options": obj.get("options") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/request_template_custom_field_type_enum.py b/opal_security/models/request_template_custom_field_type_enum.py index e0a1fc6..df2a72d 100644 --- a/opal_security/models/request_template_custom_field_type_enum.py +++ b/opal_security/models/request_template_custom_field_type_enum.py @@ -21,7 +21,7 @@ class RequestTemplateCustomFieldTypeEnum(str, Enum): """ - The type of the custom request field. + The type of the custom request field. `CALLOUT` fields are display-only -- they show a message to the requester and collect no answer, so they never appear in a request's `custom_fields`. """ """ @@ -31,6 +31,8 @@ class RequestTemplateCustomFieldTypeEnum(str, Enum): LONG_TEXT = 'LONG_TEXT' BOOLEAN = 'BOOLEAN' MULTI_CHOICE = 'MULTI_CHOICE' + MULTI_SELECT = 'MULTI_SELECT' + CALLOUT = 'CALLOUT' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/opal_security/models/resource.py b/opal_security/models/resource.py index a717453..a719d95 100644 --- a/opal_security/models/resource.py +++ b/opal_security/models/resource.py @@ -49,26 +49,30 @@ class Resource(BaseModel): require_manager_approval: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not access requests to the resource require manager approval.") require_support_ticket: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not access requests to the resource require an access ticket.") require_mfa_to_approve: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA for reviewers to approve requests for this resource.") + requires_forfeit_reason: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not a reason is required when forfeiting access to this resource.") require_mfa_to_request: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA for requesting access to this resource.") require_mfa_to_connect: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA to connect to this resource.") auto_approval: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to automatically approve requests to this resource.") request_template_id: Optional[UUID] = Field(default=None, description="The ID of the associated request template.") - is_requestable: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to allow access requests to this resource.") + is_requestable: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to allow access requests to this resource. Deprecated in favor of `request_configurations`.") parent_resource_id: Optional[UUID] = Field(default=None, description="The ID of the parent resource.") configuration_template_id: Optional[UUID] = Field(default=None, description="The ID of the associated configuration template.") request_configurations: Optional[List[RequestConfiguration]] = Field(default=None, description="A list of configurations for requests to this resource.") request_configuration_list: Optional[List[RequestConfiguration]] = Field(default=None, description="A list of configurations for requests to this resource. Deprecated in favor of `request_configurations`.") ticket_propagation: Optional[TicketPropagationConfiguration] = None custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent upon request approval.") + max_direct_users_allowed: Optional[StrictInt] = Field(default=None, description="The maximum number of direct users allowed for this resource at once. Set to null to remove the limit.") risk_sensitivity: Optional[RiskSensitivityEnum] = Field(default=None, description="The risk sensitivity level for the resource. When an override is set, this field will match that.") risk_sensitivity_override: Optional[RiskSensitivityEnum] = None metadata: Optional[StrictStr] = Field(default=None, description="JSON metadata about the remote resource. Only set for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details.") remote_info: Optional[ResourceRemoteInfo] = None ancestor_resource_ids: Optional[List[UUID]] = Field(default=None, description="List of resource IDs that are ancestors of this resource.") descendant_resource_ids: Optional[List[UUID]] = Field(default=None, description="List of resource IDs that are descendants of this resource.") + match_remote_name: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not the resource's name is synced from the end system. When true, the name is overwritten with the remote name on each sync. Defaults to false.") + match_remote_description: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not the resource's description is synced from the end system. When true, the description is overwritten with the remote description on each sync. Defaults to false.") last_successful_sync: Optional[SyncTask] = Field(default=None, description="Information about the last successful sync of this resource.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["resource_id", "app_id", "name", "description", "admin_owner_id", "remote_resource_id", "remote_resource_name", "resource_type", "max_duration", "recommended_duration", "extensions_duration_in_minutes", "require_manager_approval", "require_support_ticket", "require_mfa_to_approve", "require_mfa_to_request", "require_mfa_to_connect", "auto_approval", "request_template_id", "is_requestable", "parent_resource_id", "configuration_template_id", "request_configurations", "request_configuration_list", "ticket_propagation", "custom_request_notification", "risk_sensitivity", "risk_sensitivity_override", "metadata", "remote_info", "ancestor_resource_ids", "descendant_resource_ids", "last_successful_sync"] + __properties: ClassVar[List[str]] = ["resource_id", "app_id", "name", "description", "admin_owner_id", "remote_resource_id", "remote_resource_name", "resource_type", "max_duration", "recommended_duration", "extensions_duration_in_minutes", "require_manager_approval", "require_support_ticket", "require_mfa_to_approve", "requires_forfeit_reason", "require_mfa_to_request", "require_mfa_to_connect", "auto_approval", "request_template_id", "is_requestable", "parent_resource_id", "configuration_template_id", "request_configurations", "request_configuration_list", "ticket_propagation", "custom_request_notification", "max_direct_users_allowed", "risk_sensitivity", "risk_sensitivity_override", "metadata", "remote_info", "ancestor_resource_ids", "descendant_resource_ids", "match_remote_name", "match_remote_description", "last_successful_sync"] model_config = ConfigDict( populate_by_name=True, @@ -169,6 +173,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "require_manager_approval": obj.get("require_manager_approval"), "require_support_ticket": obj.get("require_support_ticket"), "require_mfa_to_approve": obj.get("require_mfa_to_approve"), + "requires_forfeit_reason": obj.get("requires_forfeit_reason"), "require_mfa_to_request": obj.get("require_mfa_to_request"), "require_mfa_to_connect": obj.get("require_mfa_to_connect"), "auto_approval": obj.get("auto_approval"), @@ -180,12 +185,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "request_configuration_list": [RequestConfiguration.from_dict(_item) for _item in obj["request_configuration_list"]] if obj.get("request_configuration_list") is not None else None, "ticket_propagation": TicketPropagationConfiguration.from_dict(obj["ticket_propagation"]) if obj.get("ticket_propagation") is not None else None, "custom_request_notification": obj.get("custom_request_notification"), + "max_direct_users_allowed": obj.get("max_direct_users_allowed"), "risk_sensitivity": obj.get("risk_sensitivity"), "risk_sensitivity_override": obj.get("risk_sensitivity_override"), "metadata": obj.get("metadata"), "remote_info": ResourceRemoteInfo.from_dict(obj["remote_info"]) if obj.get("remote_info") is not None else None, "ancestor_resource_ids": obj.get("ancestor_resource_ids"), "descendant_resource_ids": obj.get("descendant_resource_ids"), + "match_remote_name": obj.get("match_remote_name"), + "match_remote_description": obj.get("match_remote_description"), "last_successful_sync": SyncTask.from_dict(obj["last_successful_sync"]) if obj.get("last_successful_sync") is not None else None }) # store additional fields in additional_properties diff --git a/opal_security/models/resource_access_level_list.py b/opal_security/models/resource_access_level_list.py new file mode 100644 index 0000000..8dd8dc5 --- /dev/null +++ b/opal_security/models/resource_access_level_list.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.resource_access_level import ResourceAccessLevel +from typing import Optional, Set +from typing_extensions import Self + +class ResourceAccessLevelList(BaseModel): + """ + A list of access levels defined for a resource. + """ # noqa: E501 + results: Optional[List[ResourceAccessLevel]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceAccessLevelList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceAccessLevelList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [ResourceAccessLevel.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_configuration_template.py b/opal_security/models/resource_configuration_template.py new file mode 100644 index 0000000..30428d7 --- /dev/null +++ b/opal_security/models/resource_configuration_template.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from uuid import UUID +from typing import Optional, Set +from typing_extensions import Self + +class ResourceConfigurationTemplate(BaseModel): + """ + A reference, by ID only, to the configuration template a resource is linked to. This schema does not include any of the template's own fields (name, description, request configurations, visibility, etc.) — to read or modify those, use the `/configuration-templates` endpoints with the ID carried here. A `null` `configuration_template_id` indicates that the resource is not linked to a configuration template and uses its own private configuration. + """ # noqa: E501 + configuration_template_id: UUID = Field(description="The ID of the configuration template that the resource is linked to, or `null` if the resource is not linked to a configuration template. Only the ID is exposed here; the template's own fields are managed through the `/configuration-templates` endpoints.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["configuration_template_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceConfigurationTemplate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceConfigurationTemplate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "configuration_template_id": obj.get("configuration_template_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_custom_access_level_list.py b/opal_security/models/resource_custom_access_level_list.py new file mode 100644 index 0000000..97147f6 --- /dev/null +++ b/opal_security/models/resource_custom_access_level_list.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from opal_security.models.resource_custom_access_level_response import ResourceCustomAccessLevelResponse +from typing import Optional, Set +from typing_extensions import Self + +class ResourceCustomAccessLevelList(BaseModel): + """ + A list of custom access levels. + """ # noqa: E501 + custom_access_levels: List[ResourceCustomAccessLevelResponse] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["custom_access_levels"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceCustomAccessLevelList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in custom_access_levels (list) + _items = [] + if self.custom_access_levels: + for _item_custom_access_levels in self.custom_access_levels: + if _item_custom_access_levels: + _items.append(_item_custom_access_levels.to_dict()) + _dict['custom_access_levels'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceCustomAccessLevelList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "custom_access_levels": [ResourceCustomAccessLevelResponse.from_dict(_item) for _item in obj["custom_access_levels"]] if obj.get("custom_access_levels") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_custom_access_level_response.py b/opal_security/models/resource_custom_access_level_response.py new file mode 100644 index 0000000..180aec3 --- /dev/null +++ b/opal_security/models/resource_custom_access_level_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.resource_access_level import ResourceAccessLevel +from typing import Optional, Set +from typing_extensions import Self + +class ResourceCustomAccessLevelResponse(BaseModel): + """ + A custom access level for a resource. + """ # noqa: E501 + resource_custom_access_level_id: UUID = Field(description="The unique ID of the custom access level.") + resource_id: UUID = Field(description="The resource this access level belongs to.") + access_level: ResourceAccessLevel + policy: Optional[StrictStr] = Field(default=None, description="The policy document for this access level.") + requestable_by_default: StrictBool = Field(description="Whether this role is requestable.") + stackable_sensitivity_index: Optional[StrictInt] = Field(default=None, description="The sensitivity index in the access hierarchy. Null if unranked.") + member_resource_ids: Optional[List[UUID]] = Field(default=None, description="When addressed via a parent resource, lists the child resource IDs that back this aggregated entry.") + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["resource_custom_access_level_id", "resource_id", "access_level", "policy", "requestable_by_default", "stackable_sensitivity_index", "member_resource_ids", "created_at", "updated_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceCustomAccessLevelResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of access_level + if self.access_level: + _dict['access_level'] = self.access_level.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceCustomAccessLevelResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resource_custom_access_level_id": obj.get("resource_custom_access_level_id"), + "resource_id": obj.get("resource_id"), + "access_level": ResourceAccessLevel.from_dict(obj["access_level"]) if obj.get("access_level") is not None else None, + "policy": obj.get("policy"), + "requestable_by_default": obj.get("requestable_by_default"), + "stackable_sensitivity_index": obj.get("stackable_sensitivity_index"), + "member_resource_ids": obj.get("member_resource_ids"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info.py b/opal_security/models/resource_remote_info.py index 02523eb..8a54eb1 100644 --- a/opal_security/models/resource_remote_info.py +++ b/opal_security/models/resource_remote_info.py @@ -20,7 +20,10 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.resource_remote_info_alicloud_ecs_instance import ResourceRemoteInfoAlicloudEcsInstance +from opal_security.models.resource_remote_info_alicloud_ram_role import ResourceRemoteInfoAlicloudRamRole from opal_security.models.resource_remote_info_anthropic_workspace import ResourceRemoteInfoAnthropicWorkspace +from opal_security.models.resource_remote_info_asana_workspace import ResourceRemoteInfoAsanaWorkspace from opal_security.models.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount from opal_security.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance from opal_security.models.resource_remote_info_aws_eks_cluster import ResourceRemoteInfoAwsEksCluster @@ -29,6 +32,8 @@ from opal_security.models.resource_remote_info_aws_permission_set import ResourceRemoteInfoAwsPermissionSet from opal_security.models.resource_remote_info_aws_rds_cluster import ResourceRemoteInfoAwsRdsCluster from opal_security.models.resource_remote_info_aws_rds_instance import ResourceRemoteInfoAwsRdsInstance +from opal_security.models.resource_remote_info_axiom_custom_role import ResourceRemoteInfoAxiomCustomRole +from opal_security.models.resource_remote_info_axiom_role import ResourceRemoteInfoAxiomRole from opal_security.models.resource_remote_info_azure_enterprise_app import ResourceRemoteInfoAzureEnterpriseApp from opal_security.models.resource_remote_info_azure_entra_id_role import ResourceRemoteInfoAzureEntraIdRole from opal_security.models.resource_remote_info_azure_management_group import ResourceRemoteInfoAzureManagementGroup @@ -42,18 +47,33 @@ from opal_security.models.resource_remote_info_azure_subscription import ResourceRemoteInfoAzureSubscription from opal_security.models.resource_remote_info_azure_user_assigned_managed_identity import ResourceRemoteInfoAzureUserAssignedManagedIdentity from opal_security.models.resource_remote_info_azure_virtual_machine import ResourceRemoteInfoAzureVirtualMachine +from opal_security.models.resource_remote_info_bitwarden_organization import ResourceRemoteInfoBitwardenOrganization +from opal_security.models.resource_remote_info_box_enterprise import ResourceRemoteInfoBoxEnterprise +from opal_security.models.resource_remote_info_box_folder import ResourceRemoteInfoBoxFolder +from opal_security.models.resource_remote_info_calendly_event_type import ResourceRemoteInfoCalendlyEventType +from opal_security.models.resource_remote_info_calendly_role import ResourceRemoteInfoCalendlyRole +from opal_security.models.resource_remote_info_clickhouse_console_role import ResourceRemoteInfoClickhouseConsoleRole from opal_security.models.resource_remote_info_clickhouse_database import ResourceRemoteInfoClickhouseDatabase from opal_security.models.resource_remote_info_clickhouse_table import ResourceRemoteInfoClickhouseTable from opal_security.models.resource_remote_info_coupa_role import ResourceRemoteInfoCoupaRole from opal_security.models.resource_remote_info_cursor_organization import ResourceRemoteInfoCursorOrganization +from opal_security.models.resource_remote_info_cursor_origin_repository import ResourceRemoteInfoCursorOriginRepository from opal_security.models.resource_remote_info_custom_connector import ResourceRemoteInfoCustomConnector from opal_security.models.resource_remote_info_databricks_account_service_principal import ResourceRemoteInfoDatabricksAccountServicePrincipal +from opal_security.models.resource_remote_info_databricks_catalog import ResourceRemoteInfoDatabricksCatalog +from opal_security.models.resource_remote_info_databricks_function import ResourceRemoteInfoDatabricksFunction +from opal_security.models.resource_remote_info_databricks_model import ResourceRemoteInfoDatabricksModel +from opal_security.models.resource_remote_info_databricks_schema import ResourceRemoteInfoDatabricksSchema +from opal_security.models.resource_remote_info_databricks_service import ResourceRemoteInfoDatabricksService +from opal_security.models.resource_remote_info_databricks_volume import ResourceRemoteInfoDatabricksVolume from opal_security.models.resource_remote_info_datadog_role import ResourceRemoteInfoDatadogRole from opal_security.models.resource_remote_info_datastax_astra_role import ResourceRemoteInfoDatastaxAstraRole from opal_security.models.resource_remote_info_devin_organization import ResourceRemoteInfoDevinOrganization from opal_security.models.resource_remote_info_devin_role import ResourceRemoteInfoDevinRole +from opal_security.models.resource_remote_info_docusign_permission_profile import ResourceRemoteInfoDocusignPermissionProfile from opal_security.models.resource_remote_info_gcp_big_query_dataset import ResourceRemoteInfoGcpBigQueryDataset from opal_security.models.resource_remote_info_gcp_big_query_table import ResourceRemoteInfoGcpBigQueryTable +from opal_security.models.resource_remote_info_gcp_billing_account import ResourceRemoteInfoGcpBillingAccount from opal_security.models.resource_remote_info_gcp_bucket import ResourceRemoteInfoGcpBucket from opal_security.models.resource_remote_info_gcp_compute_instance import ResourceRemoteInfoGcpComputeInstance from opal_security.models.resource_remote_info_gcp_folder import ResourceRemoteInfoGcpFolder @@ -73,25 +93,40 @@ from opal_security.models.resource_remote_info_grafana_role import ResourceRemoteInfoGrafanaRole from opal_security.models.resource_remote_info_hubspot_role import ResourceRemoteInfoHubspotRole from opal_security.models.resource_remote_info_ilevel_advanced_role import ResourceRemoteInfoIlevelAdvancedRole +from opal_security.models.resource_remote_info_linear_organization import ResourceRemoteInfoLinearOrganization +from opal_security.models.resource_remote_info_linear_project import ResourceRemoteInfoLinearProject from opal_security.models.resource_remote_info_netsuite_role import ResourceRemoteInfoNetsuiteRole from opal_security.models.resource_remote_info_okta_app import ResourceRemoteInfoOktaApp from opal_security.models.resource_remote_info_okta_custom_role import ResourceRemoteInfoOktaCustomRole from opal_security.models.resource_remote_info_okta_standard_role import ResourceRemoteInfoOktaStandardRole +from opal_security.models.resource_remote_info_onelogin_app import ResourceRemoteInfoOneloginApp from opal_security.models.resource_remote_info_openai_platform_project import ResourceRemoteInfoOpenaiPlatformProject from opal_security.models.resource_remote_info_openai_platform_service_account import ResourceRemoteInfoOpenaiPlatformServiceAccount from opal_security.models.resource_remote_info_oracle_fusion_role import ResourceRemoteInfoOracleFusionRole from opal_security.models.resource_remote_info_pagerduty_role import ResourceRemoteInfoPagerdutyRole +from opal_security.models.resource_remote_info_ramp_fund import ResourceRemoteInfoRampFund +from opal_security.models.resource_remote_info_ramp_role import ResourceRemoteInfoRampRole +from opal_security.models.resource_remote_info_rippling_department import ResourceRemoteInfoRipplingDepartment from opal_security.models.resource_remote_info_salesforce_permission_set import ResourceRemoteInfoSalesforcePermissionSet from opal_security.models.resource_remote_info_salesforce_profile import ResourceRemoteInfoSalesforceProfile from opal_security.models.resource_remote_info_salesforce_role import ResourceRemoteInfoSalesforceRole +from opal_security.models.resource_remote_info_slack_organization import ResourceRemoteInfoSlackOrganization +from opal_security.models.resource_remote_info_slack_workspace import ResourceRemoteInfoSlackWorkspace from opal_security.models.resource_remote_info_snowflake_database import ResourceRemoteInfoSnowflakeDatabase from opal_security.models.resource_remote_info_snowflake_schema import ResourceRemoteInfoSnowflakeSchema from opal_security.models.resource_remote_info_snowflake_table import ResourceRemoteInfoSnowflakeTable from opal_security.models.resource_remote_info_tailscale_ssh import ResourceRemoteInfoTailscaleSsh from opal_security.models.resource_remote_info_teleport_role import ResourceRemoteInfoTeleportRole +from opal_security.models.resource_remote_info_tray_organization import ResourceRemoteInfoTrayOrganization +from opal_security.models.resource_remote_info_tray_workspace import ResourceRemoteInfoTrayWorkspace from opal_security.models.resource_remote_info_twingate_resource import ResourceRemoteInfoTwingateResource +from opal_security.models.resource_remote_info_vercel_project import ResourceRemoteInfoVercelProject +from opal_security.models.resource_remote_info_vercel_role import ResourceRemoteInfoVercelRole from opal_security.models.resource_remote_info_workday_role import ResourceRemoteInfoWorkdayRole +from opal_security.models.resource_remote_info_wrike_user_type import ResourceRemoteInfoWrikeUserType from opal_security.models.resource_remote_info_zendesk_role import ResourceRemoteInfoZendeskRole +from opal_security.models.resource_remote_info_zoom_license import ResourceRemoteInfoZoomLicense +from opal_security.models.resource_remote_info_zoom_role import ResourceRemoteInfoZoomRole from typing import Optional, Set from typing_extensions import Self @@ -131,6 +166,7 @@ class ResourceRemoteInfo(BaseModel): gcp_gke_cluster: Optional[ResourceRemoteInfoGcpGkeCluster] = None gcp_project: Optional[ResourceRemoteInfoGcpProject] = None gcp_sql_instance: Optional[ResourceRemoteInfoGcpSqlInstance] = None + gcp_billing_account: Optional[ResourceRemoteInfoGcpBillingAccount] = None gcp_service_account: Optional[ResourceRemoteInfoGcpServiceAccount] = None google_workspace_role: Optional[ResourceRemoteInfoGoogleWorkspaceRole] = None github_repo: Optional[ResourceRemoteInfoGithubRepo] = None @@ -151,28 +187,62 @@ class ResourceRemoteInfo(BaseModel): workday_role: Optional[ResourceRemoteInfoWorkdayRole] = None salesforce_permission_set: Optional[ResourceRemoteInfoSalesforcePermissionSet] = None salesforce_profile: Optional[ResourceRemoteInfoSalesforceProfile] = None + docusign_permission_profile: Optional[ResourceRemoteInfoDocusignPermissionProfile] = None salesforce_role: Optional[ResourceRemoteInfoSalesforceRole] = None teleport_role: Optional[ResourceRemoteInfoTeleportRole] = None datastax_astra_role: Optional[ResourceRemoteInfoDatastaxAstraRole] = None coupa_role: Optional[ResourceRemoteInfoCoupaRole] = None cursor_organization: Optional[ResourceRemoteInfoCursorOrganization] = None + cursor_origin_repository: Optional[ResourceRemoteInfoCursorOriginRepository] = None openai_platform_project: Optional[ResourceRemoteInfoOpenaiPlatformProject] = None openai_platform_service_account: Optional[ResourceRemoteInfoOpenaiPlatformServiceAccount] = None anthropic_workspace: Optional[ResourceRemoteInfoAnthropicWorkspace] = None + slack_organization: Optional[ResourceRemoteInfoSlackOrganization] = None oracle_fusion_role: Optional[ResourceRemoteInfoOracleFusionRole] = None devin_organization: Optional[ResourceRemoteInfoDevinOrganization] = None devin_role: Optional[ResourceRemoteInfoDevinRole] = None netsuite_role: Optional[ResourceRemoteInfoNetsuiteRole] = None datadog_role: Optional[ResourceRemoteInfoDatadogRole] = None clickhouse_database: Optional[ResourceRemoteInfoClickhouseDatabase] = None + clickhouse_console_role: Optional[ResourceRemoteInfoClickhouseConsoleRole] = None clickhouse_table: Optional[ResourceRemoteInfoClickhouseTable] = None grafana_folder: Optional[ResourceRemoteInfoGrafanaFolder] = None grafana_dashboard: Optional[ResourceRemoteInfoGrafanaDashboard] = None grafana_role: Optional[ResourceRemoteInfoGrafanaRole] = None zendesk_role: Optional[ResourceRemoteInfoZendeskRole] = None hubspot_role: Optional[ResourceRemoteInfoHubspotRole] = None + alicloud_ram_role: Optional[ResourceRemoteInfoAlicloudRamRole] = None + alicloud_ecs_instance: Optional[ResourceRemoteInfoAlicloudEcsInstance] = None + zoom_role: Optional[ResourceRemoteInfoZoomRole] = None + zoom_license: Optional[ResourceRemoteInfoZoomLicense] = None + linear_organization: Optional[ResourceRemoteInfoLinearOrganization] = None + linear_project: Optional[ResourceRemoteInfoLinearProject] = None + ramp_fund: Optional[ResourceRemoteInfoRampFund] = None + ramp_role: Optional[ResourceRemoteInfoRampRole] = None + wrike_user_type: Optional[ResourceRemoteInfoWrikeUserType] = None + databricks_catalog: Optional[ResourceRemoteInfoDatabricksCatalog] = None + databricks_schema: Optional[ResourceRemoteInfoDatabricksSchema] = None + databricks_volume: Optional[ResourceRemoteInfoDatabricksVolume] = None + databricks_function: Optional[ResourceRemoteInfoDatabricksFunction] = None + databricks_model: Optional[ResourceRemoteInfoDatabricksModel] = None + databricks_service: Optional[ResourceRemoteInfoDatabricksService] = None + vercel_role: Optional[ResourceRemoteInfoVercelRole] = None + vercel_project: Optional[ResourceRemoteInfoVercelProject] = None + axiom_role: Optional[ResourceRemoteInfoAxiomRole] = None + axiom_custom_role: Optional[ResourceRemoteInfoAxiomCustomRole] = None + box_enterprise: Optional[ResourceRemoteInfoBoxEnterprise] = None + box_folder: Optional[ResourceRemoteInfoBoxFolder] = None + asana_workspace: Optional[ResourceRemoteInfoAsanaWorkspace] = None + bitwarden_organization: Optional[ResourceRemoteInfoBitwardenOrganization] = None + calendly_role: Optional[ResourceRemoteInfoCalendlyRole] = None + calendly_event_type: Optional[ResourceRemoteInfoCalendlyEventType] = None + onelogin_app: Optional[ResourceRemoteInfoOneloginApp] = None + tray_workspace: Optional[ResourceRemoteInfoTrayWorkspace] = None + tray_organization: Optional[ResourceRemoteInfoTrayOrganization] = None + rippling_department: Optional[ResourceRemoteInfoRipplingDepartment] = None + slack_workspace: Optional[ResourceRemoteInfoSlackWorkspace] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["databricks_account_service_principal", "azure_subscription", "azure_resource_group", "azure_management_group", "azure_virtual_machine", "azure_storage_account", "azure_storage_container", "azure_sql_server", "azure_sql_database", "azure_sql_managed_instance", "azure_sql_managed_database", "azure_user_assigned_managed_identity", "azure_enterprise_app", "azure_entra_id_role", "aws_organizational_unit", "aws_account", "aws_permission_set", "aws_iam_role", "aws_ec2_instance", "aws_rds_cluster", "aws_rds_instance", "aws_eks_cluster", "custom_connector", "gcp_organization", "gcp_bucket", "gcp_compute_instance", "gcp_big_query_dataset", "gcp_big_query_table", "gcp_folder", "gcp_gke_cluster", "gcp_project", "gcp_sql_instance", "gcp_service_account", "google_workspace_role", "github_repo", "github_org_role", "github_org", "github_enterprise_role", "gitlab_project", "okta_app", "okta_standard_role", "okta_custom_role", "snowflake_database", "snowflake_schema", "snowflake_table", "ilevel_advanced_role", "tailscale_ssh", "twingate_resource", "pagerduty_role", "workday_role", "salesforce_permission_set", "salesforce_profile", "salesforce_role", "teleport_role", "datastax_astra_role", "coupa_role", "cursor_organization", "openai_platform_project", "openai_platform_service_account", "anthropic_workspace", "oracle_fusion_role", "devin_organization", "devin_role", "netsuite_role", "datadog_role", "clickhouse_database", "clickhouse_table", "grafana_folder", "grafana_dashboard", "grafana_role", "zendesk_role", "hubspot_role"] + __properties: ClassVar[List[str]] = ["databricks_account_service_principal", "azure_subscription", "azure_resource_group", "azure_management_group", "azure_virtual_machine", "azure_storage_account", "azure_storage_container", "azure_sql_server", "azure_sql_database", "azure_sql_managed_instance", "azure_sql_managed_database", "azure_user_assigned_managed_identity", "azure_enterprise_app", "azure_entra_id_role", "aws_organizational_unit", "aws_account", "aws_permission_set", "aws_iam_role", "aws_ec2_instance", "aws_rds_cluster", "aws_rds_instance", "aws_eks_cluster", "custom_connector", "gcp_organization", "gcp_bucket", "gcp_compute_instance", "gcp_big_query_dataset", "gcp_big_query_table", "gcp_folder", "gcp_gke_cluster", "gcp_project", "gcp_sql_instance", "gcp_billing_account", "gcp_service_account", "google_workspace_role", "github_repo", "github_org_role", "github_org", "github_enterprise_role", "gitlab_project", "okta_app", "okta_standard_role", "okta_custom_role", "snowflake_database", "snowflake_schema", "snowflake_table", "ilevel_advanced_role", "tailscale_ssh", "twingate_resource", "pagerduty_role", "workday_role", "salesforce_permission_set", "salesforce_profile", "docusign_permission_profile", "salesforce_role", "teleport_role", "datastax_astra_role", "coupa_role", "cursor_organization", "cursor_origin_repository", "openai_platform_project", "openai_platform_service_account", "anthropic_workspace", "slack_organization", "oracle_fusion_role", "devin_organization", "devin_role", "netsuite_role", "datadog_role", "clickhouse_database", "clickhouse_console_role", "clickhouse_table", "grafana_folder", "grafana_dashboard", "grafana_role", "zendesk_role", "hubspot_role", "alicloud_ram_role", "alicloud_ecs_instance", "zoom_role", "zoom_license", "linear_organization", "linear_project", "ramp_fund", "ramp_role", "wrike_user_type", "databricks_catalog", "databricks_schema", "databricks_volume", "databricks_function", "databricks_model", "databricks_service", "vercel_role", "vercel_project", "axiom_role", "axiom_custom_role", "box_enterprise", "box_folder", "asana_workspace", "bitwarden_organization", "calendly_role", "calendly_event_type", "onelogin_app", "tray_workspace", "tray_organization", "rippling_department", "slack_workspace"] model_config = ConfigDict( populate_by_name=True, @@ -311,6 +381,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of gcp_sql_instance if self.gcp_sql_instance: _dict['gcp_sql_instance'] = self.gcp_sql_instance.to_dict() + # override the default output from pydantic by calling `to_dict()` of gcp_billing_account + if self.gcp_billing_account: + _dict['gcp_billing_account'] = self.gcp_billing_account.to_dict() # override the default output from pydantic by calling `to_dict()` of gcp_service_account if self.gcp_service_account: _dict['gcp_service_account'] = self.gcp_service_account.to_dict() @@ -371,6 +444,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of salesforce_profile if self.salesforce_profile: _dict['salesforce_profile'] = self.salesforce_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of docusign_permission_profile + if self.docusign_permission_profile: + _dict['docusign_permission_profile'] = self.docusign_permission_profile.to_dict() # override the default output from pydantic by calling `to_dict()` of salesforce_role if self.salesforce_role: _dict['salesforce_role'] = self.salesforce_role.to_dict() @@ -386,6 +462,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of cursor_organization if self.cursor_organization: _dict['cursor_organization'] = self.cursor_organization.to_dict() + # override the default output from pydantic by calling `to_dict()` of cursor_origin_repository + if self.cursor_origin_repository: + _dict['cursor_origin_repository'] = self.cursor_origin_repository.to_dict() # override the default output from pydantic by calling `to_dict()` of openai_platform_project if self.openai_platform_project: _dict['openai_platform_project'] = self.openai_platform_project.to_dict() @@ -395,6 +474,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of anthropic_workspace if self.anthropic_workspace: _dict['anthropic_workspace'] = self.anthropic_workspace.to_dict() + # override the default output from pydantic by calling `to_dict()` of slack_organization + if self.slack_organization: + _dict['slack_organization'] = self.slack_organization.to_dict() # override the default output from pydantic by calling `to_dict()` of oracle_fusion_role if self.oracle_fusion_role: _dict['oracle_fusion_role'] = self.oracle_fusion_role.to_dict() @@ -413,6 +495,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of clickhouse_database if self.clickhouse_database: _dict['clickhouse_database'] = self.clickhouse_database.to_dict() + # override the default output from pydantic by calling `to_dict()` of clickhouse_console_role + if self.clickhouse_console_role: + _dict['clickhouse_console_role'] = self.clickhouse_console_role.to_dict() # override the default output from pydantic by calling `to_dict()` of clickhouse_table if self.clickhouse_table: _dict['clickhouse_table'] = self.clickhouse_table.to_dict() @@ -431,6 +516,96 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of hubspot_role if self.hubspot_role: _dict['hubspot_role'] = self.hubspot_role.to_dict() + # override the default output from pydantic by calling `to_dict()` of alicloud_ram_role + if self.alicloud_ram_role: + _dict['alicloud_ram_role'] = self.alicloud_ram_role.to_dict() + # override the default output from pydantic by calling `to_dict()` of alicloud_ecs_instance + if self.alicloud_ecs_instance: + _dict['alicloud_ecs_instance'] = self.alicloud_ecs_instance.to_dict() + # override the default output from pydantic by calling `to_dict()` of zoom_role + if self.zoom_role: + _dict['zoom_role'] = self.zoom_role.to_dict() + # override the default output from pydantic by calling `to_dict()` of zoom_license + if self.zoom_license: + _dict['zoom_license'] = self.zoom_license.to_dict() + # override the default output from pydantic by calling `to_dict()` of linear_organization + if self.linear_organization: + _dict['linear_organization'] = self.linear_organization.to_dict() + # override the default output from pydantic by calling `to_dict()` of linear_project + if self.linear_project: + _dict['linear_project'] = self.linear_project.to_dict() + # override the default output from pydantic by calling `to_dict()` of ramp_fund + if self.ramp_fund: + _dict['ramp_fund'] = self.ramp_fund.to_dict() + # override the default output from pydantic by calling `to_dict()` of ramp_role + if self.ramp_role: + _dict['ramp_role'] = self.ramp_role.to_dict() + # override the default output from pydantic by calling `to_dict()` of wrike_user_type + if self.wrike_user_type: + _dict['wrike_user_type'] = self.wrike_user_type.to_dict() + # override the default output from pydantic by calling `to_dict()` of databricks_catalog + if self.databricks_catalog: + _dict['databricks_catalog'] = self.databricks_catalog.to_dict() + # override the default output from pydantic by calling `to_dict()` of databricks_schema + if self.databricks_schema: + _dict['databricks_schema'] = self.databricks_schema.to_dict() + # override the default output from pydantic by calling `to_dict()` of databricks_volume + if self.databricks_volume: + _dict['databricks_volume'] = self.databricks_volume.to_dict() + # override the default output from pydantic by calling `to_dict()` of databricks_function + if self.databricks_function: + _dict['databricks_function'] = self.databricks_function.to_dict() + # override the default output from pydantic by calling `to_dict()` of databricks_model + if self.databricks_model: + _dict['databricks_model'] = self.databricks_model.to_dict() + # override the default output from pydantic by calling `to_dict()` of databricks_service + if self.databricks_service: + _dict['databricks_service'] = self.databricks_service.to_dict() + # override the default output from pydantic by calling `to_dict()` of vercel_role + if self.vercel_role: + _dict['vercel_role'] = self.vercel_role.to_dict() + # override the default output from pydantic by calling `to_dict()` of vercel_project + if self.vercel_project: + _dict['vercel_project'] = self.vercel_project.to_dict() + # override the default output from pydantic by calling `to_dict()` of axiom_role + if self.axiom_role: + _dict['axiom_role'] = self.axiom_role.to_dict() + # override the default output from pydantic by calling `to_dict()` of axiom_custom_role + if self.axiom_custom_role: + _dict['axiom_custom_role'] = self.axiom_custom_role.to_dict() + # override the default output from pydantic by calling `to_dict()` of box_enterprise + if self.box_enterprise: + _dict['box_enterprise'] = self.box_enterprise.to_dict() + # override the default output from pydantic by calling `to_dict()` of box_folder + if self.box_folder: + _dict['box_folder'] = self.box_folder.to_dict() + # override the default output from pydantic by calling `to_dict()` of asana_workspace + if self.asana_workspace: + _dict['asana_workspace'] = self.asana_workspace.to_dict() + # override the default output from pydantic by calling `to_dict()` of bitwarden_organization + if self.bitwarden_organization: + _dict['bitwarden_organization'] = self.bitwarden_organization.to_dict() + # override the default output from pydantic by calling `to_dict()` of calendly_role + if self.calendly_role: + _dict['calendly_role'] = self.calendly_role.to_dict() + # override the default output from pydantic by calling `to_dict()` of calendly_event_type + if self.calendly_event_type: + _dict['calendly_event_type'] = self.calendly_event_type.to_dict() + # override the default output from pydantic by calling `to_dict()` of onelogin_app + if self.onelogin_app: + _dict['onelogin_app'] = self.onelogin_app.to_dict() + # override the default output from pydantic by calling `to_dict()` of tray_workspace + if self.tray_workspace: + _dict['tray_workspace'] = self.tray_workspace.to_dict() + # override the default output from pydantic by calling `to_dict()` of tray_organization + if self.tray_organization: + _dict['tray_organization'] = self.tray_organization.to_dict() + # override the default output from pydantic by calling `to_dict()` of rippling_department + if self.rippling_department: + _dict['rippling_department'] = self.rippling_department.to_dict() + # override the default output from pydantic by calling `to_dict()` of slack_workspace + if self.slack_workspace: + _dict['slack_workspace'] = self.slack_workspace.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -480,6 +655,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "gcp_gke_cluster": ResourceRemoteInfoGcpGkeCluster.from_dict(obj["gcp_gke_cluster"]) if obj.get("gcp_gke_cluster") is not None else None, "gcp_project": ResourceRemoteInfoGcpProject.from_dict(obj["gcp_project"]) if obj.get("gcp_project") is not None else None, "gcp_sql_instance": ResourceRemoteInfoGcpSqlInstance.from_dict(obj["gcp_sql_instance"]) if obj.get("gcp_sql_instance") is not None else None, + "gcp_billing_account": ResourceRemoteInfoGcpBillingAccount.from_dict(obj["gcp_billing_account"]) if obj.get("gcp_billing_account") is not None else None, "gcp_service_account": ResourceRemoteInfoGcpServiceAccount.from_dict(obj["gcp_service_account"]) if obj.get("gcp_service_account") is not None else None, "google_workspace_role": ResourceRemoteInfoGoogleWorkspaceRole.from_dict(obj["google_workspace_role"]) if obj.get("google_workspace_role") is not None else None, "github_repo": ResourceRemoteInfoGithubRepo.from_dict(obj["github_repo"]) if obj.get("github_repo") is not None else None, @@ -500,26 +676,60 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "workday_role": ResourceRemoteInfoWorkdayRole.from_dict(obj["workday_role"]) if obj.get("workday_role") is not None else None, "salesforce_permission_set": ResourceRemoteInfoSalesforcePermissionSet.from_dict(obj["salesforce_permission_set"]) if obj.get("salesforce_permission_set") is not None else None, "salesforce_profile": ResourceRemoteInfoSalesforceProfile.from_dict(obj["salesforce_profile"]) if obj.get("salesforce_profile") is not None else None, + "docusign_permission_profile": ResourceRemoteInfoDocusignPermissionProfile.from_dict(obj["docusign_permission_profile"]) if obj.get("docusign_permission_profile") is not None else None, "salesforce_role": ResourceRemoteInfoSalesforceRole.from_dict(obj["salesforce_role"]) if obj.get("salesforce_role") is not None else None, "teleport_role": ResourceRemoteInfoTeleportRole.from_dict(obj["teleport_role"]) if obj.get("teleport_role") is not None else None, "datastax_astra_role": ResourceRemoteInfoDatastaxAstraRole.from_dict(obj["datastax_astra_role"]) if obj.get("datastax_astra_role") is not None else None, "coupa_role": ResourceRemoteInfoCoupaRole.from_dict(obj["coupa_role"]) if obj.get("coupa_role") is not None else None, "cursor_organization": ResourceRemoteInfoCursorOrganization.from_dict(obj["cursor_organization"]) if obj.get("cursor_organization") is not None else None, + "cursor_origin_repository": ResourceRemoteInfoCursorOriginRepository.from_dict(obj["cursor_origin_repository"]) if obj.get("cursor_origin_repository") is not None else None, "openai_platform_project": ResourceRemoteInfoOpenaiPlatformProject.from_dict(obj["openai_platform_project"]) if obj.get("openai_platform_project") is not None else None, "openai_platform_service_account": ResourceRemoteInfoOpenaiPlatformServiceAccount.from_dict(obj["openai_platform_service_account"]) if obj.get("openai_platform_service_account") is not None else None, "anthropic_workspace": ResourceRemoteInfoAnthropicWorkspace.from_dict(obj["anthropic_workspace"]) if obj.get("anthropic_workspace") is not None else None, + "slack_organization": ResourceRemoteInfoSlackOrganization.from_dict(obj["slack_organization"]) if obj.get("slack_organization") is not None else None, "oracle_fusion_role": ResourceRemoteInfoOracleFusionRole.from_dict(obj["oracle_fusion_role"]) if obj.get("oracle_fusion_role") is not None else None, "devin_organization": ResourceRemoteInfoDevinOrganization.from_dict(obj["devin_organization"]) if obj.get("devin_organization") is not None else None, "devin_role": ResourceRemoteInfoDevinRole.from_dict(obj["devin_role"]) if obj.get("devin_role") is not None else None, "netsuite_role": ResourceRemoteInfoNetsuiteRole.from_dict(obj["netsuite_role"]) if obj.get("netsuite_role") is not None else None, "datadog_role": ResourceRemoteInfoDatadogRole.from_dict(obj["datadog_role"]) if obj.get("datadog_role") is not None else None, "clickhouse_database": ResourceRemoteInfoClickhouseDatabase.from_dict(obj["clickhouse_database"]) if obj.get("clickhouse_database") is not None else None, + "clickhouse_console_role": ResourceRemoteInfoClickhouseConsoleRole.from_dict(obj["clickhouse_console_role"]) if obj.get("clickhouse_console_role") is not None else None, "clickhouse_table": ResourceRemoteInfoClickhouseTable.from_dict(obj["clickhouse_table"]) if obj.get("clickhouse_table") is not None else None, "grafana_folder": ResourceRemoteInfoGrafanaFolder.from_dict(obj["grafana_folder"]) if obj.get("grafana_folder") is not None else None, "grafana_dashboard": ResourceRemoteInfoGrafanaDashboard.from_dict(obj["grafana_dashboard"]) if obj.get("grafana_dashboard") is not None else None, "grafana_role": ResourceRemoteInfoGrafanaRole.from_dict(obj["grafana_role"]) if obj.get("grafana_role") is not None else None, "zendesk_role": ResourceRemoteInfoZendeskRole.from_dict(obj["zendesk_role"]) if obj.get("zendesk_role") is not None else None, - "hubspot_role": ResourceRemoteInfoHubspotRole.from_dict(obj["hubspot_role"]) if obj.get("hubspot_role") is not None else None + "hubspot_role": ResourceRemoteInfoHubspotRole.from_dict(obj["hubspot_role"]) if obj.get("hubspot_role") is not None else None, + "alicloud_ram_role": ResourceRemoteInfoAlicloudRamRole.from_dict(obj["alicloud_ram_role"]) if obj.get("alicloud_ram_role") is not None else None, + "alicloud_ecs_instance": ResourceRemoteInfoAlicloudEcsInstance.from_dict(obj["alicloud_ecs_instance"]) if obj.get("alicloud_ecs_instance") is not None else None, + "zoom_role": ResourceRemoteInfoZoomRole.from_dict(obj["zoom_role"]) if obj.get("zoom_role") is not None else None, + "zoom_license": ResourceRemoteInfoZoomLicense.from_dict(obj["zoom_license"]) if obj.get("zoom_license") is not None else None, + "linear_organization": ResourceRemoteInfoLinearOrganization.from_dict(obj["linear_organization"]) if obj.get("linear_organization") is not None else None, + "linear_project": ResourceRemoteInfoLinearProject.from_dict(obj["linear_project"]) if obj.get("linear_project") is not None else None, + "ramp_fund": ResourceRemoteInfoRampFund.from_dict(obj["ramp_fund"]) if obj.get("ramp_fund") is not None else None, + "ramp_role": ResourceRemoteInfoRampRole.from_dict(obj["ramp_role"]) if obj.get("ramp_role") is not None else None, + "wrike_user_type": ResourceRemoteInfoWrikeUserType.from_dict(obj["wrike_user_type"]) if obj.get("wrike_user_type") is not None else None, + "databricks_catalog": ResourceRemoteInfoDatabricksCatalog.from_dict(obj["databricks_catalog"]) if obj.get("databricks_catalog") is not None else None, + "databricks_schema": ResourceRemoteInfoDatabricksSchema.from_dict(obj["databricks_schema"]) if obj.get("databricks_schema") is not None else None, + "databricks_volume": ResourceRemoteInfoDatabricksVolume.from_dict(obj["databricks_volume"]) if obj.get("databricks_volume") is not None else None, + "databricks_function": ResourceRemoteInfoDatabricksFunction.from_dict(obj["databricks_function"]) if obj.get("databricks_function") is not None else None, + "databricks_model": ResourceRemoteInfoDatabricksModel.from_dict(obj["databricks_model"]) if obj.get("databricks_model") is not None else None, + "databricks_service": ResourceRemoteInfoDatabricksService.from_dict(obj["databricks_service"]) if obj.get("databricks_service") is not None else None, + "vercel_role": ResourceRemoteInfoVercelRole.from_dict(obj["vercel_role"]) if obj.get("vercel_role") is not None else None, + "vercel_project": ResourceRemoteInfoVercelProject.from_dict(obj["vercel_project"]) if obj.get("vercel_project") is not None else None, + "axiom_role": ResourceRemoteInfoAxiomRole.from_dict(obj["axiom_role"]) if obj.get("axiom_role") is not None else None, + "axiom_custom_role": ResourceRemoteInfoAxiomCustomRole.from_dict(obj["axiom_custom_role"]) if obj.get("axiom_custom_role") is not None else None, + "box_enterprise": ResourceRemoteInfoBoxEnterprise.from_dict(obj["box_enterprise"]) if obj.get("box_enterprise") is not None else None, + "box_folder": ResourceRemoteInfoBoxFolder.from_dict(obj["box_folder"]) if obj.get("box_folder") is not None else None, + "asana_workspace": ResourceRemoteInfoAsanaWorkspace.from_dict(obj["asana_workspace"]) if obj.get("asana_workspace") is not None else None, + "bitwarden_organization": ResourceRemoteInfoBitwardenOrganization.from_dict(obj["bitwarden_organization"]) if obj.get("bitwarden_organization") is not None else None, + "calendly_role": ResourceRemoteInfoCalendlyRole.from_dict(obj["calendly_role"]) if obj.get("calendly_role") is not None else None, + "calendly_event_type": ResourceRemoteInfoCalendlyEventType.from_dict(obj["calendly_event_type"]) if obj.get("calendly_event_type") is not None else None, + "onelogin_app": ResourceRemoteInfoOneloginApp.from_dict(obj["onelogin_app"]) if obj.get("onelogin_app") is not None else None, + "tray_workspace": ResourceRemoteInfoTrayWorkspace.from_dict(obj["tray_workspace"]) if obj.get("tray_workspace") is not None else None, + "tray_organization": ResourceRemoteInfoTrayOrganization.from_dict(obj["tray_organization"]) if obj.get("tray_organization") is not None else None, + "rippling_department": ResourceRemoteInfoRipplingDepartment.from_dict(obj["rippling_department"]) if obj.get("rippling_department") is not None else None, + "slack_workspace": ResourceRemoteInfoSlackWorkspace.from_dict(obj["slack_workspace"]) if obj.get("slack_workspace") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal_security/models/resource_remote_info_alicloud_ecs_instance.py b/opal_security/models/resource_remote_info_alicloud_ecs_instance.py new file mode 100644 index 0000000..9dfe5f2 --- /dev/null +++ b/opal_security/models/resource_remote_info_alicloud_ecs_instance.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoAlicloudEcsInstance(BaseModel): + """ + Remote info for AliCloud ECS instance. + """ # noqa: E501 + instance_id: StrictStr = Field(description="The ID of the ECS instance.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["instance_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoAlicloudEcsInstance from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoAlicloudEcsInstance from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance_id": obj.get("instance_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_alicloud_ram_role.py b/opal_security/models/resource_remote_info_alicloud_ram_role.py new file mode 100644 index 0000000..65b263d --- /dev/null +++ b/opal_security/models/resource_remote_info_alicloud_ram_role.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoAlicloudRamRole(BaseModel): + """ + Remote info for AliCloud RAM role. + """ # noqa: E501 + role_arn: StrictStr = Field(description="The ARN of the AliCloud RAM role.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["role_arn"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoAlicloudRamRole from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoAlicloudRamRole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "role_arn": obj.get("role_arn") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_asana_workspace.py b/opal_security/models/resource_remote_info_asana_workspace.py new file mode 100644 index 0000000..6b5235a --- /dev/null +++ b/opal_security/models/resource_remote_info_asana_workspace.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoAsanaWorkspace(BaseModel): + """ + Remote info for Asana Workspace. + """ # noqa: E501 + workspace_gid: StrictStr = Field(description="The workspace gid of the Asana Workspace.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["workspace_gid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoAsanaWorkspace from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoAsanaWorkspace from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "workspace_gid": obj.get("workspace_gid") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_axiom_custom_role.py b/opal_security/models/resource_remote_info_axiom_custom_role.py new file mode 100644 index 0000000..32ac6bd --- /dev/null +++ b/opal_security/models/resource_remote_info_axiom_custom_role.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoAxiomCustomRole(BaseModel): + """ + Remote info for Axiom custom RBAC role. + """ # noqa: E501 + role_id: StrictStr = Field(description="The ID of the Axiom custom role.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["role_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoAxiomCustomRole from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoAxiomCustomRole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "role_id": obj.get("role_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_axiom_role.py b/opal_security/models/resource_remote_info_axiom_role.py new file mode 100644 index 0000000..6072b29 --- /dev/null +++ b/opal_security/models/resource_remote_info_axiom_role.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoAxiomRole(BaseModel): + """ + Remote info for Axiom base role. + """ # noqa: E501 + role_id: StrictStr = Field(description="The ID of the Axiom base role.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["role_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoAxiomRole from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoAxiomRole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "role_id": obj.get("role_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_bitwarden_organization.py b/opal_security/models/resource_remote_info_bitwarden_organization.py new file mode 100644 index 0000000..d322086 --- /dev/null +++ b/opal_security/models/resource_remote_info_bitwarden_organization.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoBitwardenOrganization(BaseModel): + """ + Remote info for Bitwarden Organization. + """ # noqa: E501 + organization_id: StrictStr = Field(description="The organization id of the Bitwarden Organization.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["organization_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoBitwardenOrganization from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoBitwardenOrganization from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organization_id": obj.get("organization_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_box_enterprise.py b/opal_security/models/resource_remote_info_box_enterprise.py new file mode 100644 index 0000000..38822c0 --- /dev/null +++ b/opal_security/models/resource_remote_info_box_enterprise.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoBoxEnterprise(BaseModel): + """ + Remote info for Box Enterprise. + """ # noqa: E501 + resource_id: StrictStr = Field(description="The resource id of the Box Enterprise.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["resource_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoBoxEnterprise from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoBoxEnterprise from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resource_id": obj.get("resource_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_box_folder.py b/opal_security/models/resource_remote_info_box_folder.py new file mode 100644 index 0000000..d104f56 --- /dev/null +++ b/opal_security/models/resource_remote_info_box_folder.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoBoxFolder(BaseModel): + """ + Remote info for Box Folder. + """ # noqa: E501 + resource_id: StrictStr = Field(description="The resource id of the Box Folder.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["resource_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoBoxFolder from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoBoxFolder from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resource_id": obj.get("resource_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_calendly_event_type.py b/opal_security/models/resource_remote_info_calendly_event_type.py new file mode 100644 index 0000000..a71735a --- /dev/null +++ b/opal_security/models/resource_remote_info_calendly_event_type.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoCalendlyEventType(BaseModel): + """ + Remote info for Calendly Event Type. + """ # noqa: E501 + resource_id: StrictStr = Field(description="The resource id of the Calendly Event Type.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["resource_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoCalendlyEventType from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoCalendlyEventType from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resource_id": obj.get("resource_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_calendly_role.py b/opal_security/models/resource_remote_info_calendly_role.py new file mode 100644 index 0000000..eb53bfc --- /dev/null +++ b/opal_security/models/resource_remote_info_calendly_role.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoCalendlyRole(BaseModel): + """ + Remote info for Calendly Role. + """ # noqa: E501 + resource_id: StrictStr = Field(description="The resource id of the Calendly Role.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["resource_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoCalendlyRole from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoCalendlyRole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resource_id": obj.get("resource_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_clickhouse_console_role.py b/opal_security/models/resource_remote_info_clickhouse_console_role.py new file mode 100644 index 0000000..496a383 --- /dev/null +++ b/opal_security/models/resource_remote_info_clickhouse_console_role.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoClickhouseConsoleRole(BaseModel): + """ + Remote info for ClickHouse Cloud console role. + """ # noqa: E501 + role_id: StrictStr = Field(description="The UUID of the ClickHouse Cloud console role.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["role_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoClickhouseConsoleRole from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoClickhouseConsoleRole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "role_id": obj.get("role_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_cursor_origin_repository.py b/opal_security/models/resource_remote_info_cursor_origin_repository.py new file mode 100644 index 0000000..89b7921 --- /dev/null +++ b/opal_security/models/resource_remote_info_cursor_origin_repository.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoCursorOriginRepository(BaseModel): + """ + Remote info for a Cursor Origin repository. + """ # noqa: E501 + repository_name: StrictStr = Field(description="The repository's owner slug and name.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["repository_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoCursorOriginRepository from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoCursorOriginRepository from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "repository_name": obj.get("repository_name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_databricks_catalog.py b/opal_security/models/resource_remote_info_databricks_catalog.py new file mode 100644 index 0000000..719fdeb --- /dev/null +++ b/opal_security/models/resource_remote_info_databricks_catalog.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoDatabricksCatalog(BaseModel): + """ + Remote info for Databricks Unity Catalog catalog. + """ # noqa: E501 + metastore_id: StrictStr = Field(description="The ID of the Unity Catalog metastore the catalog belongs to.") + full_name: StrictStr = Field(description="The dot-qualified full name of the catalog (e.g. \"catalog\").") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["metastore_id", "full_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoDatabricksCatalog from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoDatabricksCatalog from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "metastore_id": obj.get("metastore_id"), + "full_name": obj.get("full_name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_databricks_function.py b/opal_security/models/resource_remote_info_databricks_function.py new file mode 100644 index 0000000..1a9a27c --- /dev/null +++ b/opal_security/models/resource_remote_info_databricks_function.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoDatabricksFunction(BaseModel): + """ + Remote info for Databricks Unity Catalog function. + """ # noqa: E501 + metastore_id: StrictStr = Field(description="The ID of the Unity Catalog metastore the function belongs to.") + full_name: StrictStr = Field(description="The dot-qualified full name of the function (e.g. \"catalog.schema.function\").") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["metastore_id", "full_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoDatabricksFunction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoDatabricksFunction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "metastore_id": obj.get("metastore_id"), + "full_name": obj.get("full_name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_databricks_model.py b/opal_security/models/resource_remote_info_databricks_model.py new file mode 100644 index 0000000..8ff63f5 --- /dev/null +++ b/opal_security/models/resource_remote_info_databricks_model.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoDatabricksModel(BaseModel): + """ + Remote info for Databricks Unity Catalog registered model. + """ # noqa: E501 + metastore_id: StrictStr = Field(description="The ID of the Unity Catalog metastore the model belongs to.") + full_name: StrictStr = Field(description="The dot-qualified full name of the model (e.g. \"catalog.schema.model\").") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["metastore_id", "full_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoDatabricksModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoDatabricksModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "metastore_id": obj.get("metastore_id"), + "full_name": obj.get("full_name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_databricks_schema.py b/opal_security/models/resource_remote_info_databricks_schema.py new file mode 100644 index 0000000..f805842 --- /dev/null +++ b/opal_security/models/resource_remote_info_databricks_schema.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoDatabricksSchema(BaseModel): + """ + Remote info for Databricks Unity Catalog schema. + """ # noqa: E501 + metastore_id: StrictStr = Field(description="The ID of the Unity Catalog metastore the schema belongs to.") + full_name: StrictStr = Field(description="The dot-qualified full name of the schema (e.g. \"catalog.schema\").") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["metastore_id", "full_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoDatabricksSchema from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoDatabricksSchema from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "metastore_id": obj.get("metastore_id"), + "full_name": obj.get("full_name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_databricks_service.py b/opal_security/models/resource_remote_info_databricks_service.py new file mode 100644 index 0000000..fea51c8 --- /dev/null +++ b/opal_security/models/resource_remote_info_databricks_service.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoDatabricksService(BaseModel): + """ + Remote info for Databricks AI Gateway service. + """ # noqa: E501 + metastore_id: StrictStr = Field(description="The ID of the Unity Catalog metastore the service belongs to.") + full_name: StrictStr = Field(description="The dot-qualified full name of the service (e.g. \"catalog.schema.service\").") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["metastore_id", "full_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoDatabricksService from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoDatabricksService from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "metastore_id": obj.get("metastore_id"), + "full_name": obj.get("full_name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_databricks_volume.py b/opal_security/models/resource_remote_info_databricks_volume.py new file mode 100644 index 0000000..6281908 --- /dev/null +++ b/opal_security/models/resource_remote_info_databricks_volume.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoDatabricksVolume(BaseModel): + """ + Remote info for Databricks Unity Catalog volume. + """ # noqa: E501 + metastore_id: StrictStr = Field(description="The ID of the Unity Catalog metastore the volume belongs to.") + full_name: StrictStr = Field(description="The dot-qualified full name of the volume (e.g. \"catalog.schema.volume\").") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["metastore_id", "full_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoDatabricksVolume from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoDatabricksVolume from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "metastore_id": obj.get("metastore_id"), + "full_name": obj.get("full_name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_docusign_permission_profile.py b/opal_security/models/resource_remote_info_docusign_permission_profile.py new file mode 100644 index 0000000..7c298a9 --- /dev/null +++ b/opal_security/models/resource_remote_info_docusign_permission_profile.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoDocusignPermissionProfile(BaseModel): + """ + Remote info for Docusign permission profile. + """ # noqa: E501 + permission_profile_id: StrictStr = Field(description="The ID of the Docusign permission profile.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["permission_profile_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoDocusignPermissionProfile from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoDocusignPermissionProfile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "permission_profile_id": obj.get("permission_profile_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_gcp_billing_account.py b/opal_security/models/resource_remote_info_gcp_billing_account.py new file mode 100644 index 0000000..b5cb230 --- /dev/null +++ b/opal_security/models/resource_remote_info_gcp_billing_account.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoGcpBillingAccount(BaseModel): + """ + Remote info for a GCP billing account. + """ # noqa: E501 + billing_account_id: StrictStr = Field(description="The resource name of the billing account.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["billing_account_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoGcpBillingAccount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoGcpBillingAccount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "billing_account_id": obj.get("billing_account_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_linear_organization.py b/opal_security/models/resource_remote_info_linear_organization.py new file mode 100644 index 0000000..1271af5 --- /dev/null +++ b/opal_security/models/resource_remote_info_linear_organization.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoLinearOrganization(BaseModel): + """ + Remote info for Linear organization. + """ # noqa: E501 + org_id: StrictStr = Field(description="The ID of the Linear organization.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["org_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoLinearOrganization from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoLinearOrganization from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "org_id": obj.get("org_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_linear_project.py b/opal_security/models/resource_remote_info_linear_project.py new file mode 100644 index 0000000..95acd5e --- /dev/null +++ b/opal_security/models/resource_remote_info_linear_project.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoLinearProject(BaseModel): + """ + Remote info for Linear project. + """ # noqa: E501 + project_id: StrictStr = Field(description="The ID of the Linear project.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["project_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoLinearProject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoLinearProject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "project_id": obj.get("project_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_onelogin_app.py b/opal_security/models/resource_remote_info_onelogin_app.py new file mode 100644 index 0000000..0f48793 --- /dev/null +++ b/opal_security/models/resource_remote_info_onelogin_app.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoOneloginApp(BaseModel): + """ + Remote info for OneLogin App. + """ # noqa: E501 + resource_id: StrictStr = Field(description="The resource id of the OneLogin App.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["resource_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoOneloginApp from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoOneloginApp from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resource_id": obj.get("resource_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_ramp_fund.py b/opal_security/models/resource_remote_info_ramp_fund.py new file mode 100644 index 0000000..78ddc16 --- /dev/null +++ b/opal_security/models/resource_remote_info_ramp_fund.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoRampFund(BaseModel): + """ + Remote info for Ramp fund. + """ # noqa: E501 + fund_id: StrictStr = Field(description="The ID of the Ramp fund.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fund_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoRampFund from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoRampFund from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fund_id": obj.get("fund_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_ramp_role.py b/opal_security/models/resource_remote_info_ramp_role.py new file mode 100644 index 0000000..8080a18 --- /dev/null +++ b/opal_security/models/resource_remote_info_ramp_role.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoRampRole(BaseModel): + """ + Remote info for Ramp built-in role. + """ # noqa: E501 + role: StrictStr = Field(description="The Ramp built-in role enum (e.g. BUSINESS_USER).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["role"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoRampRole from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoRampRole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "role": obj.get("role") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_rippling_department.py b/opal_security/models/resource_remote_info_rippling_department.py new file mode 100644 index 0000000..ffb0985 --- /dev/null +++ b/opal_security/models/resource_remote_info_rippling_department.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoRipplingDepartment(BaseModel): + """ + Remote info for Rippling department. + """ # noqa: E501 + department_id: StrictStr = Field(description="The ID of the Rippling department.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["department_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoRipplingDepartment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoRipplingDepartment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "department_id": obj.get("department_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_slack_organization.py b/opal_security/models/resource_remote_info_slack_organization.py new file mode 100644 index 0000000..7931ad3 --- /dev/null +++ b/opal_security/models/resource_remote_info_slack_organization.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoSlackOrganization(BaseModel): + """ + Remote info for Slack Enterprise Grid organization. + """ # noqa: E501 + organization_id: StrictStr = Field(description="The ID of the Slack Enterprise Grid organization (enterprise ID).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["organization_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoSlackOrganization from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoSlackOrganization from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organization_id": obj.get("organization_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_slack_workspace.py b/opal_security/models/resource_remote_info_slack_workspace.py new file mode 100644 index 0000000..3f37814 --- /dev/null +++ b/opal_security/models/resource_remote_info_slack_workspace.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoSlackWorkspace(BaseModel): + """ + Remote info for Slack workspace. + """ # noqa: E501 + workspace_id: StrictStr = Field(description="The ID of the Slack workspace (team ID).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["workspace_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoSlackWorkspace from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoSlackWorkspace from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "workspace_id": obj.get("workspace_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_tray_organization.py b/opal_security/models/resource_remote_info_tray_organization.py new file mode 100644 index 0000000..d3842b4 --- /dev/null +++ b/opal_security/models/resource_remote_info_tray_organization.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoTrayOrganization(BaseModel): + """ + Remote info for Tray Organization. + """ # noqa: E501 + organization_id: StrictStr = Field(description="The organization id of the Tray Organization.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["organization_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoTrayOrganization from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoTrayOrganization from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organization_id": obj.get("organization_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_tray_workspace.py b/opal_security/models/resource_remote_info_tray_workspace.py new file mode 100644 index 0000000..1553462 --- /dev/null +++ b/opal_security/models/resource_remote_info_tray_workspace.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoTrayWorkspace(BaseModel): + """ + Remote info for Tray Workspace. + """ # noqa: E501 + workspace_id: StrictStr = Field(description="The workspace id of the Tray Workspace.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["workspace_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoTrayWorkspace from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoTrayWorkspace from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "workspace_id": obj.get("workspace_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_vercel_project.py b/opal_security/models/resource_remote_info_vercel_project.py new file mode 100644 index 0000000..2584ecb --- /dev/null +++ b/opal_security/models/resource_remote_info_vercel_project.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoVercelProject(BaseModel): + """ + Remote info for Vercel project. + """ # noqa: E501 + project_id: StrictStr = Field(description="The Vercel project id.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["project_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoVercelProject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoVercelProject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "project_id": obj.get("project_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_vercel_role.py b/opal_security/models/resource_remote_info_vercel_role.py new file mode 100644 index 0000000..62b3737 --- /dev/null +++ b/opal_security/models/resource_remote_info_vercel_role.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoVercelRole(BaseModel): + """ + Remote info for Vercel team role. + """ # noqa: E501 + role_id: StrictStr = Field(description="The Vercel team role identifier (e.g. OWNER, MEMBER, CONTRIBUTOR).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["role_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoVercelRole from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoVercelRole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "role_id": obj.get("role_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_wrike_user_type.py b/opal_security/models/resource_remote_info_wrike_user_type.py new file mode 100644 index 0000000..d639b48 --- /dev/null +++ b/opal_security/models/resource_remote_info_wrike_user_type.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoWrikeUserType(BaseModel): + """ + Remote info for Wrike user type (license type). + """ # noqa: E501 + user_type_id: StrictStr = Field(description="The Wrike user type ID (16-char UID from GET /user_types).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["user_type_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoWrikeUserType from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoWrikeUserType from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user_type_id": obj.get("user_type_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_zoom_license.py b/opal_security/models/resource_remote_info_zoom_license.py new file mode 100644 index 0000000..97e0c58 --- /dev/null +++ b/opal_security/models/resource_remote_info_zoom_license.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoZoomLicense(BaseModel): + """ + Remote info for Zoom license (user type). + """ # noqa: E501 + license_type: StrictStr = Field(description="The Zoom user type representing the license (e.g. \"2\" for Licensed).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["license_type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoZoomLicense from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoZoomLicense from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "license_type": obj.get("license_type") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_remote_info_zoom_role.py b/opal_security/models/resource_remote_info_zoom_role.py new file mode 100644 index 0000000..161268b --- /dev/null +++ b/opal_security/models/resource_remote_info_zoom_role.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoZoomRole(BaseModel): + """ + Remote info for Zoom role. + """ # noqa: E501 + role_id: StrictStr = Field(description="The ID of the Zoom role.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["role_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoZoomRole from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoZoomRole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "role_id": obj.get("role_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/resource_type_enum.py b/opal_security/models/resource_type_enum.py index f95a03a..aff6bd5 100644 --- a/opal_security/models/resource_type_enum.py +++ b/opal_security/models/resource_type_enum.py @@ -37,6 +37,11 @@ class ResourceTypeEnum(str, Enum): AWS_ACCOUNT = 'AWS_ACCOUNT' AWS_SSO_PERMISSION_SET = 'AWS_SSO_PERMISSION_SET' AWS_ORGANIZATIONAL_UNIT = 'AWS_ORGANIZATIONAL_UNIT' + AWS_AGENTCORE_GATEWAY = 'AWS_AGENTCORE_GATEWAY' + AWS_AGENTCORE_GATEWAY_TARGET = 'AWS_AGENTCORE_GATEWAY_TARGET' + AWS_AGENTCORE_GATEWAY_TOOL = 'AWS_AGENTCORE_GATEWAY_TOOL' + MCP_SERVER = 'MCP_SERVER' + MCP_TOOL = 'MCP_TOOL' AZURE_MANAGEMENT_GROUP = 'AZURE_MANAGEMENT_GROUP' AZURE_RESOURCE_GROUP = 'AZURE_RESOURCE_GROUP' AZURE_SUBSCRIPTION = 'AZURE_SUBSCRIPTION' @@ -64,6 +69,7 @@ class ResourceTypeEnum(str, Enum): GCP_BIG_QUERY_DATASET = 'GCP_BIG_QUERY_DATASET' GCP_BIG_QUERY_TABLE = 'GCP_BIG_QUERY_TABLE' GCP_SERVICE_ACCOUNT = 'GCP_SERVICE_ACCOUNT' + GCP_BILLING_ACCOUNT = 'GCP_BILLING_ACCOUNT' GIT_HUB_REPO = 'GIT_HUB_REPO' GIT_HUB_ORG_ROLE = 'GIT_HUB_ORG_ROLE' GIT_LAB_PROJECT = 'GIT_LAB_PROJECT' @@ -93,6 +99,7 @@ class ResourceTypeEnum(str, Enum): DATASTAX_ASTRA_ROLE = 'DATASTAX_ASTRA_ROLE' COUPA_ROLE = 'COUPA_ROLE' CURSOR_ORGANIZATION = 'CURSOR_ORGANIZATION' + CURSOR_ORIGIN_REPOSITORY = 'CURSOR_ORIGIN_REPOSITORY' OPENAI_PLATFORM_PROJECT = 'OPENAI_PLATFORM_PROJECT' OPENAI_PLATFORM_SERVICE_ACCOUNT = 'OPENAI_PLATFORM_SERVICE_ACCOUNT' ANTHROPIC_WORKSPACE = 'ANTHROPIC_WORKSPACE' @@ -110,9 +117,44 @@ class ResourceTypeEnum(str, Enum): GRAFANA_ROLE = 'GRAFANA_ROLE' CLICKHOUSE_DATABASE = 'CLICKHOUSE_DATABASE' CLICKHOUSE_TABLE = 'CLICKHOUSE_TABLE' + CLICKHOUSE_CONSOLE_ROLE = 'CLICKHOUSE_CONSOLE_ROLE' TWINGATE_RESOURCE = 'TWINGATE_RESOURCE' ZENDESK_ROLE = 'ZENDESK_ROLE' HUBSPOT_ROLE = 'HUBSPOT_ROLE' + ALICLOUD_RAM_ROLE = 'ALICLOUD_RAM_ROLE' + ALICLOUD_ECS_INSTANCE = 'ALICLOUD_ECS_INSTANCE' + DOCUSIGN_PERMISSION_PROFILE = 'DOCUSIGN_PERMISSION_PROFILE' + ZOOM_ROLE = 'ZOOM_ROLE' + ZOOM_LICENSE = 'ZOOM_LICENSE' + LINEAR_ORGANIZATION = 'LINEAR_ORGANIZATION' + LINEAR_PROJECT = 'LINEAR_PROJECT' + RAMP_FUND = 'RAMP_FUND' + RAMP_ROLE = 'RAMP_ROLE' + WRIKE_USER_TYPE = 'WRIKE_USER_TYPE' + DATABRICKS_CATALOG = 'DATABRICKS_CATALOG' + DATABRICKS_SCHEMA = 'DATABRICKS_SCHEMA' + DATABRICKS_VOLUME = 'DATABRICKS_VOLUME' + DATABRICKS_FUNCTION = 'DATABRICKS_FUNCTION' + DATABRICKS_MODEL = 'DATABRICKS_MODEL' + DATABRICKS_SERVICE = 'DATABRICKS_SERVICE' + DATABRICKS_MCP_SERVER = 'DATABRICKS_MCP_SERVER' + VERCEL_ROLE = 'VERCEL_ROLE' + VERCEL_PROJECT = 'VERCEL_PROJECT' + AXIOM_ROLE = 'AXIOM_ROLE' + AXIOM_CUSTOM_ROLE = 'AXIOM_CUSTOM_ROLE' + RIPPLING_DEPARTMENT = 'RIPPLING_DEPARTMENT' + BOX_ENTERPRISE = 'BOX_ENTERPRISE' + BOX_FOLDER = 'BOX_FOLDER' + SLACK_WORKSPACE = 'SLACK_WORKSPACE' + SLACK_ORGANIZATION = 'SLACK_ORGANIZATION' + ASANA_WORKSPACE = 'ASANA_WORKSPACE' + ASANA_WORKSPACE_GUEST = 'ASANA_WORKSPACE_GUEST' + BITWARDEN_ORGANIZATION = 'BITWARDEN_ORGANIZATION' + CALENDLY_ROLE = 'CALENDLY_ROLE' + CALENDLY_EVENT_TYPE = 'CALENDLY_EVENT_TYPE' + ONELOGIN_APP = 'ONELOGIN_APP' + TRAY_WORKSPACE = 'TRAY_WORKSPACE' + TRAY_ORGANIZATION = 'TRAY_ORGANIZATION' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/opal_security/models/review_campaign_item_decision_info.py b/opal_security/models/review_campaign_item_decision_info.py new file mode 100644 index 0000000..c134d04 --- /dev/null +++ b/opal_security/models/review_campaign_item_decision_info.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.campaign_item_review_decision_enum import CampaignItemReviewDecisionEnum +from opal_security.models.campaign_item_reviewer_assignment_source_enum import CampaignItemReviewerAssignmentSourceEnum +from typing import Optional, Set +from typing_extensions import Self + +class ReviewCampaignItemDecisionInfo(BaseModel): + """ + A single reviewer decision to submit for a campaign item review. Mirrors GraphQL `CampaignItemReviewDecisionInput`. + """ # noqa: E501 + campaign_item_review_id: UUID = Field(description="The ID of the campaign item review to update.") + decision: CampaignItemReviewDecisionEnum + note: Optional[StrictStr] = Field(default=None, description="Optional note from the reviewer for this decision.") + access_level_remote_id: Optional[StrictStr] = Field(default=None, description="Required when `decision` is `CHANGE_ROLE`. The remote ID of the access level to change to. Ignored for other decisions. ") + new_reviewer_user_ids: Optional[List[UUID]] = Field(default=None, description="When `decision` is `REASSIGNED` and `assignment_source` is `MANUAL` or omitted, the user IDs to reassign this review to. ") + assignment_source: Optional[CampaignItemReviewerAssignmentSourceEnum] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["campaign_item_review_id", "decision", "note", "access_level_remote_id", "new_reviewer_user_ids", "assignment_source"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReviewCampaignItemDecisionInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReviewCampaignItemDecisionInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "campaign_item_review_id": obj.get("campaign_item_review_id"), + "decision": obj.get("decision"), + "note": obj.get("note"), + "access_level_remote_id": obj.get("access_level_remote_id"), + "new_reviewer_user_ids": obj.get("new_reviewer_user_ids"), + "assignment_source": obj.get("assignment_source") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/review_campaign_items_info.py b/opal_security/models/review_campaign_items_info.py new file mode 100644 index 0000000..ded1af9 --- /dev/null +++ b/opal_security/models/review_campaign_items_info.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from opal_security.models.review_campaign_item_decision_info import ReviewCampaignItemDecisionInfo +from typing import Optional, Set +from typing_extensions import Self + +class ReviewCampaignItemsInfo(BaseModel): + """ + Input for submitting review decisions on one or more campaign item reviews. + """ # noqa: E501 + decisions: List[ReviewCampaignItemDecisionInfo] = Field(description="The decisions to record. Each targets a single campaign item review.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["decisions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReviewCampaignItemsInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in decisions (list) + _items = [] + if self.decisions: + for _item_decisions in self.decisions: + if _item_decisions: + _items.append(_item_decisions.to_dict()) + _dict['decisions'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReviewCampaignItemsInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "decisions": [ReviewCampaignItemDecisionInfo.from_dict(_item) for _item in obj["decisions"]] if obj.get("decisions") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/review_campaign_items_response.py b/opal_security/models/review_campaign_items_response.py new file mode 100644 index 0000000..4b476bc --- /dev/null +++ b/opal_security/models/review_campaign_items_response.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from opal_security.models.campaign_item_review_result import CampaignItemReviewResult +from typing import Optional, Set +from typing_extensions import Self + +class ReviewCampaignItemsResponse(BaseModel): + """ + Result of submitting campaign item review decisions. + """ # noqa: E501 + reviews: List[CampaignItemReviewResult] = Field(description="Updated reviews in the same order as the request decisions.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["reviews"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReviewCampaignItemsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in reviews (list) + _items = [] + if self.reviews: + for _item_reviews in self.reviews: + if _item_reviews: + _items.append(_item_reviews.to_dict()) + _dict['reviews'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReviewCampaignItemsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reviews": [CampaignItemReviewResult.from_dict(_item) for _item in obj["reviews"]] if obj.get("reviews") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/reviewer_stage.py b/opal_security/models/reviewer_stage.py index 7c1ddf5..beea0fc 100644 --- a/opal_security/models/reviewer_stage.py +++ b/opal_security/models/reviewer_stage.py @@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from uuid import UUID +from opal_security.models.reviewer_stage_escalation import ReviewerStageEscalation from typing import Optional, Set from typing_extensions import Self @@ -30,11 +31,13 @@ class ReviewerStage(BaseModel): """ # noqa: E501 require_manager_approval: StrictBool = Field(description="Whether this reviewer stage should require manager approval.") require_admin_approval: Optional[StrictBool] = Field(default=None, description="Whether this reviewer stage should require admin approval.") - operator: StrictStr = Field(description="The operator of the reviewer stage. Admin and manager approval are also treated as reviewers.") + operator: StrictStr = Field(description="The operator of the reviewer stage. Admin and manager approval are also treated as reviewers. A stage that sets `escalation` must use `OR`; `AND` is rejected there, because the escalation timer joins the stage as an additional reviewer and would otherwise become a required approver that stalls every request until the timeout.") owner_ids: List[UUID] = Field(description="The IDs of owners assigned as reviewers for this stage.") service_user_ids: Optional[List[UUID]] = Field(default=None, description="The IDs of service users assigned as reviewers for this stage.") + escalation: Optional[ReviewerStageEscalation] = None + opal_script_ids: Optional[List[UUID]] = Field(default=None, description="The IDs of OpalScripts assigned as reviewers for this stage. Only `REQUEST_REVIEW` scripts can review; any other script type is rejected.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["require_manager_approval", "require_admin_approval", "operator", "owner_ids", "service_user_ids"] + __properties: ClassVar[List[str]] = ["require_manager_approval", "require_admin_approval", "operator", "owner_ids", "service_user_ids", "escalation", "opal_script_ids"] @field_validator('operator') def operator_validate_enum(cls, value): @@ -84,6 +87,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of escalation + if self.escalation: + _dict['escalation'] = self.escalation.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -105,7 +111,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "require_admin_approval": obj.get("require_admin_approval"), "operator": obj.get("operator"), "owner_ids": obj.get("owner_ids"), - "service_user_ids": obj.get("service_user_ids") + "service_user_ids": obj.get("service_user_ids"), + "escalation": ReviewerStageEscalation.from_dict(obj["escalation"]) if obj.get("escalation") is not None else None, + "opal_script_ids": obj.get("opal_script_ids") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal_security/models/reviewer_stage_escalation.py b/opal_security/models/reviewer_stage_escalation.py new file mode 100644 index 0000000..8aa7ac3 --- /dev/null +++ b/opal_security/models/reviewer_stage_escalation.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from uuid import UUID +from typing import Optional, Set +from typing_extensions import Self + +class ReviewerStageEscalation(BaseModel): + """ + Escalation for a reviewer stage. When set, the request advances to the reviewers named here if nobody responds within delay_minutes. Timely approval by any of the stage's own reviewers resolves the stage without escalating. owner_ids and user_ids name only who to escalate to; the stage's own reviewers are added automatically and must not be repeated here. A stage with owner_ids [X] escalating to Y sets escalation.owner_ids to [Y], and reviewing after escalation is then open to both X and Y. Because the stage's reviewers are unioned in rather than copied, removing someone from the stage also removes them from the escalation. At least one owner or user named here must not already be a reviewer of the stage. + """ # noqa: E501 + delay_minutes: Annotated[int, Field(le=1440, strict=True, ge=1)] = Field(description="How long to wait for a response before escalating, in minutes. Between 1 and 1440 (24 hours).") + owner_ids: Optional[List[UUID]] = Field(default=None, description="The owners to escalate to. The stage's own owner_ids are added automatically and must not be repeated here.") + user_ids: Optional[List[UUID]] = Field(default=None, description="The users to escalate to. The stage's own service_user_ids are added automatically and must not be repeated here.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["delay_minutes", "owner_ids", "user_ids"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReviewerStageEscalation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReviewerStageEscalation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "delay_minutes": obj.get("delay_minutes"), + "owner_ids": obj.get("owner_ids"), + "user_ids": obj.get("user_ids") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/role_assignment.py b/opal_security/models/role_assignment.py new file mode 100644 index 0000000..b7e42f4 --- /dev/null +++ b/opal_security/models/role_assignment.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.entity_type_enum import EntityTypeEnum +from opal_security.models.resource_access_level import ResourceAccessLevel +from typing import Optional, Set +from typing_extensions import Self + +class RoleAssignment(BaseModel): + """ + A role assignment representing access granted to a principal for an entity. + """ # noqa: E501 + id: UUID = Field(description="Unique identifier for the role assignment.") + entity_id: UUID = Field(description="The ID of the entity (resource or group) being accessed.") + entity_type: EntityTypeEnum + principal_id: UUID = Field(description="The ID of the principal being granted access.") + principal_type: EntityTypeEnum + access_level: Optional[ResourceAccessLevel] = Field(default=None, description="The level of access granted. Null when the entity does not define access levels.") + expiration: Optional[datetime] = Field(default=None, description="When this access expires. Null when the grant is indefinite.") + granted_at: Optional[datetime] = Field(default=None, description="When this access was first granted.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "entity_id", "entity_type", "principal_id", "principal_type", "access_level", "expiration", "granted_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RoleAssignment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of access_level + if self.access_level: + _dict['access_level'] = self.access_level.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RoleAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "entity_id": obj.get("entity_id"), + "entity_type": obj.get("entity_type"), + "principal_id": obj.get("principal_id"), + "principal_type": obj.get("principal_type"), + "access_level": ResourceAccessLevel.from_dict(obj["access_level"]) if obj.get("access_level") is not None else None, + "expiration": obj.get("expiration"), + "granted_at": obj.get("granted_at") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/role_assignment_entity_type_enum.py b/opal_security/models/role_assignment_entity_type_enum.py new file mode 100644 index 0000000..178134a --- /dev/null +++ b/opal_security/models/role_assignment_entity_type_enum.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class RoleAssignmentEntityTypeEnum(str, Enum): + """ + Entity type for a role assignment. Entities are the resources or groups access is granted on. + """ + + """ + allowed enum values + """ + GROUP = 'GROUP' + RESOURCE = 'RESOURCE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of RoleAssignmentEntityTypeEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/role_permission_target_type_enum.py b/opal_security/models/role_permission_target_type_enum.py index c97f909..2b781e7 100644 --- a/opal_security/models/role_permission_target_type_enum.py +++ b/opal_security/models/role_permission_target_type_enum.py @@ -34,6 +34,7 @@ class RolePermissionTargetTypeEnum(str, Enum): USER = 'USER' ACCESS_REVIEW = 'ACCESS_REVIEW' OWNER = 'OWNER' + EVENT = 'EVENT' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/opal_security/models/rule_conjunction.py b/opal_security/models/rule_conjunction.py index f00a4ff..4f8e6df 100644 --- a/opal_security/models/rule_conjunction.py +++ b/opal_security/models/rule_conjunction.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated from opal_security.models.rule_disjunction import RuleDisjunction from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class RuleConjunction(BaseModel): """ RuleConjunction """ # noqa: E501 - clauses: Annotated[List[RuleDisjunction], Field(min_length=1)] + clauses: List[RuleDisjunction] = Field(description="Empty only when the access rule has `uses_opal_query` set.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["clauses"] diff --git a/opal_security/models/run_opal_query_request.py b/opal_security/models/run_opal_query_request.py new file mode 100644 index 0000000..8dfbedc --- /dev/null +++ b/opal_security/models/run_opal_query_request.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from opal_security.models.opal_access_query import OpalAccessQuery +from opal_security.models.opal_node_query import OpalNodeQuery +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +RUNOPALQUERYREQUEST_ONE_OF_SCHEMAS = ["OpalAccessQuery", "OpalNodeQuery"] + +class RunOpalQueryRequest(BaseModel): + """ + Request body for an ad-hoc OpalQuery. Set `type` to `NODE` to query entities, or `ACCESS` to query access grants. The fields available in `query` differ by type — refer to each tab for the full schema. + """ + # data type: OpalNodeQuery + oneof_schema_1_validator: Optional[OpalNodeQuery] = None + # data type: OpalAccessQuery + oneof_schema_2_validator: Optional[OpalAccessQuery] = None + actual_instance: Optional[Union[OpalAccessQuery, OpalNodeQuery]] = None + one_of_schemas: Set[str] = { "OpalAccessQuery", "OpalNodeQuery" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = RunOpalQueryRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: OpalNodeQuery + if not isinstance(v, OpalNodeQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `OpalNodeQuery`") + else: + match += 1 + # validate data type: OpalAccessQuery + if not isinstance(v, OpalAccessQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `OpalAccessQuery`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in RunOpalQueryRequest with oneOf schemas: OpalAccessQuery, OpalNodeQuery. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in RunOpalQueryRequest with oneOf schemas: OpalAccessQuery, OpalNodeQuery. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into OpalNodeQuery + try: + instance.actual_instance = OpalNodeQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OpalAccessQuery + try: + instance.actual_instance = OpalAccessQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into RunOpalQueryRequest with oneOf schemas: OpalAccessQuery, OpalNodeQuery. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into RunOpalQueryRequest with oneOf schemas: OpalAccessQuery, OpalNodeQuery. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], OpalAccessQuery, OpalNodeQuery]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/opal_security/models/set_agent_kill_switch_request.py b/opal_security/models/set_agent_kill_switch_request.py new file mode 100644 index 0000000..b55d16e --- /dev/null +++ b/opal_security/models/set_agent_kill_switch_request.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SetAgentKillSwitchRequest(BaseModel): + """ + # SetAgentKillSwitchRequest Object ### Description Turns the agent kill switch on or off. Setting `active` to `true` while it is already on supersedes the current activation rather than extending it: the old row keeps its own reason and window as part of the audit trail, and a new one starts. + """ # noqa: E501 + active: StrictBool = Field(description="True denies agent tool calls for this organization; false lifts the denial.") + duration_minutes: Optional[StrictInt] = Field(default=None, description="How long the denial lasts, from now. Ignored when `active` is false. Capped server-side - a kill switch with no end is how an organization discovers months later that its engineers have been quietly working around it.") + reason: Optional[StrictStr] = Field(default=None, description="Why. Shown verbatim to the developer whose tool call is denied, so write it for them rather than for the audit log - it is the only explanation they get.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["active", "duration_minutes", "reason"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SetAgentKillSwitchRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SetAgentKillSwitchRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "active": obj.get("active"), + "duration_minutes": obj.get("duration_minutes"), + "reason": obj.get("reason") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/sort_direction_enum.py b/opal_security/models/sort_direction_enum.py new file mode 100644 index 0000000..65be240 --- /dev/null +++ b/opal_security/models/sort_direction_enum.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SortDirectionEnum(str, Enum): + """ + Sort direction for viewer campaign items. + """ + + """ + allowed enum values + """ + ASC = 'ASC' + DESC = 'DESC' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SortDirectionEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/stop_campaign_request.py b/opal_security/models/stop_campaign_request.py new file mode 100644 index 0000000..e1e97f0 --- /dev/null +++ b/opal_security/models/stop_campaign_request.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class StopCampaignRequest(BaseModel): + """ + StopCampaignRequest + """ # noqa: E501 + revoke_unreviewed: Optional[StrictBool] = Field(default=False, description="Revoke all unreviewed access grants. Access grants with no reviewer decision will be immediately revoked.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["revoke_unreviewed"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StopCampaignRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StopCampaignRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "revoke_unreviewed": obj.get("revoke_unreviewed") if obj.get("revoke_unreviewed") is not None else False + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/string_match_type.py b/opal_security/models/string_match_type.py index 30af2a4..b90ea56 100644 --- a/opal_security/models/string_match_type.py +++ b/opal_security/models/string_match_type.py @@ -21,7 +21,7 @@ class StringMatchType(str, Enum): """ - How to match a string value against entity names. + How to match a string value against entity names. REGEX matches the value as a case-insensitive regular expression. """ """ @@ -31,6 +31,7 @@ class StringMatchType(str, Enum): EQUALS = 'EQUALS' STARTS_WITH = 'STARTS_WITH' ENDS_WITH = 'ENDS_WITH' + REGEX = 'REGEX' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/opal_security/models/uar_reviewer_assignment_policy_enum.py b/opal_security/models/uar_reviewer_assignment_policy_enum.py index 9577288..89cde6c 100644 --- a/opal_security/models/uar_reviewer_assignment_policy_enum.py +++ b/opal_security/models/uar_reviewer_assignment_policy_enum.py @@ -21,7 +21,7 @@ class UARReviewerAssignmentPolicyEnum(str, Enum): """ - A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. + A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. BY_SELF assigns each item to the reviewed principal themselves. """ """ @@ -33,6 +33,7 @@ class UARReviewerAssignmentPolicyEnum(str, Enum): BY_MANAGER = 'BY_MANAGER' BY_APPROVERS = 'BY_APPROVERS' BY_APPROVERS_ALL = 'BY_APPROVERS_ALL' + BY_SELF = 'BY_SELF' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/opal_security/models/update_app_info.py b/opal_security/models/update_app_info.py new file mode 100644 index 0000000..e21fbb3 --- /dev/null +++ b/opal_security/models/update_app_info.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.update_custom_connector_info import UpdateCustomConnectorInfo +from opal_security.models.visibility_type_enum import VisibilityTypeEnum +from typing import Optional, Set +from typing_extensions import Self + +class UpdateAppInfo(BaseModel): + """ + Information needed to update an app. Currently supports only Push-only apps (`CUSTOM`) and Custom Connector apps (`CUSTOM_CONNECTOR`). + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The updated name of the app.") + description: Optional[StrictStr] = Field(default=None, description="The updated description of the app.") + admin_owner_id: Optional[UUID] = Field(default=None, description="The updated ID of the owner of the app.") + visibility: Optional[VisibilityTypeEnum] = Field(default=None, description="Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`: manage an app's visibility through the sub-endpoint instead of inline on update. Still fully functional and validated on this surface.") + visibility_group_ids: Optional[List[UUID]] = Field(default=None, description="The IDs of groups that can see this app when visibility is `LIMITED`. Must be empty when the effective visibility is `GLOBAL` (either sent explicitly on this request or already stored on the app); the server returns `400` otherwise. Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`.") + import_visibility: Optional[VisibilityTypeEnum] = Field(default=None, description="Deprecated in favor of `PUT /v1/apps/{app_id}/visibility`.") + custom_connector: Optional[UpdateCustomConnectorInfo] = Field(default=None, description="Updates Custom Connector configuration. Only valid for `CUSTOM_CONNECTOR` apps.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "description", "admin_owner_id", "visibility", "visibility_group_ids", "import_visibility", "custom_connector"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateAppInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of custom_connector + if self.custom_connector: + _dict['custom_connector'] = self.custom_connector.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateAppInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "admin_owner_id": obj.get("admin_owner_id"), + "visibility": obj.get("visibility"), + "visibility_group_ids": obj.get("visibility_group_ids"), + "import_visibility": obj.get("import_visibility"), + "custom_connector": UpdateCustomConnectorInfo.from_dict(obj["custom_connector"]) if obj.get("custom_connector") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/update_campaign_configuration_info.py b/opal_security/models/update_campaign_configuration_info.py new file mode 100644 index 0000000..7053453 --- /dev/null +++ b/opal_security/models/update_campaign_configuration_info.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.campaign_group_asset_visibility_policy_enum import CampaignGroupAssetVisibilityPolicyEnum +from opal_security.models.campaign_revoke_on_enum import CampaignRevokeOnEnum +from typing import Optional, Set +from typing_extensions import Self + +class UpdateCampaignConfigurationInfo(BaseModel): + """ + Configuration fields to update on a campaign. All fields are optional; omitted fields are left unchanged. `query` and `reviewer_assignment_policy` are set at create time and cannot be updated here; including either field returns 400. `cron_expression` and `recurring_duration_days` may only be set when the campaign is a template; setting them on a one-off campaign returns 400. `is_template` is immutable and not accepted on update. + """ # noqa: E501 + allow_self_review: Optional[StrictBool] = Field(default=None, description="Whether reviewers can review their own access.") + send_reviewer_assignment_notification: Optional[StrictBool] = Field(default=None, description="Whether to notify reviewers upon assignment.") + allow_reviewer_reassignment: Optional[StrictBool] = Field(default=None, description="Whether reviewers may reassign their reviews to another user.") + allow_reviewers_to_reduce_expiration: Optional[StrictBool] = Field(default=None, description="Whether reviewers can shorten an item's access expiration. They cannot extend it.") + start_date: Optional[datetime] = Field(default=None, description="Scheduled start date of the campaign. May only be updated while the campaign has not started (started_at is null). When set, the date's calendar day in the campaign timezone must be at least tomorrow. ") + end_date: Optional[datetime] = Field(default=None, description="Scheduled end date of the campaign. When set, the date's calendar day in the campaign timezone must be at least tomorrow. ") + timezone: Optional[StrictStr] = Field(default=None, description="IANA timezone used to interpret campaign deadlines (e.g. America/Los_Angeles).") + revoke_on: Optional[CampaignRevokeOnEnum] = None + reminder_schedule: Optional[List[StrictInt]] = Field(default=None, description="Days before end date to send reminder notifications.") + reminder_include_manager: Optional[StrictBool] = Field(default=None, description="Whether to include the reviewer's manager in reminders.") + require_reason_on_denial: Optional[StrictBool] = Field(default=None, description="Whether reviewers must provide a reason when denying (revoking) access.") + auto_stop_when_complete: Optional[StrictBool] = Field(default=None, description="Whether the campaign stops automatically once every review item is complete. Stopping locks further reviews so admins can review the decisions or end the campaign to generate the report.") + hide_ai_suggestions: Optional[StrictBool] = Field(default=None, description="Whether AI suggestions are hidden from reviewers.") + custom_start_message: Optional[StrictStr] = Field(default=None, description="Optional custom message included when notifying reviewers that the campaign started.") + group_asset_visibility_policy: Optional[CampaignGroupAssetVisibilityPolicyEnum] = None + cron_expression: Optional[StrictStr] = Field(default=None, description="Cron expression driving the recurring schedule. Only valid on template campaigns. Pass an empty string to clear the active months (next_scheduled_run is cleared); the campaign remains a template.") + recurring_duration_days: Optional[StrictInt] = Field(default=None, description="Deadline window in days applied to each draft generated from this template. Only valid on template campaigns.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["allow_self_review", "send_reviewer_assignment_notification", "allow_reviewer_reassignment", "allow_reviewers_to_reduce_expiration", "start_date", "end_date", "timezone", "revoke_on", "reminder_schedule", "reminder_include_manager", "require_reason_on_denial", "auto_stop_when_complete", "hide_ai_suggestions", "custom_start_message", "group_asset_visibility_policy", "cron_expression", "recurring_duration_days"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateCampaignConfigurationInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateCampaignConfigurationInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allow_self_review": obj.get("allow_self_review"), + "send_reviewer_assignment_notification": obj.get("send_reviewer_assignment_notification"), + "allow_reviewer_reassignment": obj.get("allow_reviewer_reassignment"), + "allow_reviewers_to_reduce_expiration": obj.get("allow_reviewers_to_reduce_expiration"), + "start_date": obj.get("start_date"), + "end_date": obj.get("end_date"), + "timezone": obj.get("timezone"), + "revoke_on": obj.get("revoke_on"), + "reminder_schedule": obj.get("reminder_schedule"), + "reminder_include_manager": obj.get("reminder_include_manager"), + "require_reason_on_denial": obj.get("require_reason_on_denial"), + "auto_stop_when_complete": obj.get("auto_stop_when_complete"), + "hide_ai_suggestions": obj.get("hide_ai_suggestions"), + "custom_start_message": obj.get("custom_start_message"), + "group_asset_visibility_policy": obj.get("group_asset_visibility_policy"), + "cron_expression": obj.get("cron_expression"), + "recurring_duration_days": obj.get("recurring_duration_days") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/update_campaign_info.py b/opal_security/models/update_campaign_info.py new file mode 100644 index 0000000..ceff325 --- /dev/null +++ b/opal_security/models/update_campaign_info.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.update_campaign_configuration_info import UpdateCampaignConfigurationInfo +from typing import Optional, Set +from typing_extensions import Self + +class UpdateCampaignInfo(BaseModel): + """ + # UpdateCampaignInfo Object ### Description The `UpdateCampaignInfo` object is used to partially update a campaign. Omitted fields are left unchanged. ### Usage Example Use in the `PUT Campaign` endpoint. + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The name of the campaign.") + configuration: Optional[UpdateCampaignConfigurationInfo] = Field(default=None, description="Configuration fields to create or update.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "configuration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateCampaignInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of configuration + if self.configuration: + _dict['configuration'] = self.configuration.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateCampaignInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "configuration": UpdateCampaignConfigurationInfo.from_dict(obj["configuration"]) if obj.get("configuration") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/update_campaign_item_reviewers_info.py b/opal_security/models/update_campaign_item_reviewers_info.py new file mode 100644 index 0000000..d5d8201 --- /dev/null +++ b/opal_security/models/update_campaign_item_reviewers_info.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.campaign_item_reviewer_assignment import CampaignItemReviewerAssignment +from opal_security.models.campaign_item_reviewer_source_removal import CampaignItemReviewerSourceRemoval +from typing import Optional, Set +from typing_extensions import Self + +class UpdateCampaignItemReviewersInfo(BaseModel): + """ + Input for updating campaign item reviewers. + """ # noqa: E501 + to_assign: Optional[List[CampaignItemReviewerAssignment]] = Field(default=None, description="Pairs to assign. Existing pairs are ignored.") + to_unassign: Optional[List[CampaignItemReviewerAssignment]] = Field(default=None, description="Pairs to unassign. Only pending `MANUAL` pairs are removed; missing pairs are skipped. `reviewer_id` is required on each entry. ") + to_remove_sources: Optional[List[CampaignItemReviewerSourceRemoval]] = Field(default=None, description="Remove all pending rows for the given assignment sources.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["to_assign", "to_unassign", "to_remove_sources"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateCampaignItemReviewersInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in to_assign (list) + _items = [] + if self.to_assign: + for _item_to_assign in self.to_assign: + if _item_to_assign: + _items.append(_item_to_assign.to_dict()) + _dict['to_assign'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in to_unassign (list) + _items = [] + if self.to_unassign: + for _item_to_unassign in self.to_unassign: + if _item_to_unassign: + _items.append(_item_to_unassign.to_dict()) + _dict['to_unassign'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in to_remove_sources (list) + _items = [] + if self.to_remove_sources: + for _item_to_remove_sources in self.to_remove_sources: + if _item_to_remove_sources: + _items.append(_item_to_remove_sources.to_dict()) + _dict['to_remove_sources'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateCampaignItemReviewersInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "to_assign": [CampaignItemReviewerAssignment.from_dict(_item) for _item in obj["to_assign"]] if obj.get("to_assign") is not None else None, + "to_unassign": [CampaignItemReviewerAssignment.from_dict(_item) for _item in obj["to_unassign"]] if obj.get("to_unassign") is not None else None, + "to_remove_sources": [CampaignItemReviewerSourceRemoval.from_dict(_item) for _item in obj["to_remove_sources"]] if obj.get("to_remove_sources") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/update_campaign_item_reviewers_result.py b/opal_security/models/update_campaign_item_reviewers_result.py new file mode 100644 index 0000000..8566812 --- /dev/null +++ b/opal_security/models/update_campaign_item_reviewers_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from opal_security.models.campaign_item_review import CampaignItemReview +from opal_security.models.campaign_item_unassigned_preset_message import CampaignItemUnassignedPresetMessage +from typing import Optional, Set +from typing_extensions import Self + +class UpdateCampaignItemReviewersResult(BaseModel): + """ + Result of updating campaign item reviewers. + """ # noqa: E501 + reviews: List[CampaignItemReview] = Field(description="Full review set for every referenced item after the update.") + unassigned_preset_messages: List[CampaignItemUnassignedPresetMessage] = Field(description="Preset assignment messages for items that did not produce a review row.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["reviews", "unassigned_preset_messages"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateCampaignItemReviewersResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in reviews (list) + _items = [] + if self.reviews: + for _item_reviews in self.reviews: + if _item_reviews: + _items.append(_item_reviews.to_dict()) + _dict['reviews'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in unassigned_preset_messages (list) + _items = [] + if self.unassigned_preset_messages: + for _item_unassigned_preset_messages in self.unassigned_preset_messages: + if _item_unassigned_preset_messages: + _items.append(_item_unassigned_preset_messages.to_dict()) + _dict['unassigned_preset_messages'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateCampaignItemReviewersResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reviews": [CampaignItemReview.from_dict(_item) for _item in obj["reviews"]] if obj.get("reviews") is not None else None, + "unassigned_preset_messages": [CampaignItemUnassignedPresetMessage.from_dict(_item) for _item in obj["unassigned_preset_messages"]] if obj.get("unassigned_preset_messages") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/update_configuration_template_info.py b/opal_security/models/update_configuration_template_info.py index 90b83e7..e94358e 100644 --- a/opal_security/models/update_configuration_template_info.py +++ b/opal_security/models/update_configuration_template_info.py @@ -44,10 +44,11 @@ class UpdateConfigurationTemplateInfo(BaseModel): break_glass_user_ids: Optional[List[UUID]] = Field(default=None, description="The IDs of the break glass users linked to the configuration template.") require_mfa_to_approve: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template.") require_mfa_to_connect: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA to connect to resources associated with this configuration template.") + requires_forfeit_reason: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not a reason is required when forfeiting access to resources or groups using this configuration template.") ticket_propagation: Optional[TicketPropagationConfiguration] = None custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent upon request approval for this configuration template.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["configuration_template_id", "name", "admin_owner_id", "visibility", "linked_audit_message_channel_ids", "request_configurations", "request_configuration_list", "member_oncall_schedule_ids", "break_glass_user_ids", "require_mfa_to_approve", "require_mfa_to_connect", "ticket_propagation", "custom_request_notification"] + __properties: ClassVar[List[str]] = ["configuration_template_id", "name", "admin_owner_id", "visibility", "linked_audit_message_channel_ids", "request_configurations", "request_configuration_list", "member_oncall_schedule_ids", "break_glass_user_ids", "require_mfa_to_approve", "require_mfa_to_connect", "requires_forfeit_reason", "ticket_propagation", "custom_request_notification"] model_config = ConfigDict( populate_by_name=True, @@ -134,6 +135,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "break_glass_user_ids": obj.get("break_glass_user_ids"), "require_mfa_to_approve": obj.get("require_mfa_to_approve"), "require_mfa_to_connect": obj.get("require_mfa_to_connect"), + "requires_forfeit_reason": obj.get("requires_forfeit_reason"), "ticket_propagation": TicketPropagationConfiguration.from_dict(obj["ticket_propagation"]) if obj.get("ticket_propagation") is not None else None, "custom_request_notification": obj.get("custom_request_notification") }) diff --git a/opal_security/models/update_custom_connector_info.py b/opal_security/models/update_custom_connector_info.py new file mode 100644 index 0000000..317803b --- /dev/null +++ b/opal_security/models/update_custom_connector_info.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.custom_connector_idp_protocol_enum import CustomConnectorIdpProtocolEnum +from typing import Optional, Set +from typing_extensions import Self + +class UpdateCustomConnectorInfo(BaseModel): + """ + Information needed to update a Custom Connector app. Omitted fields are left unchanged. Provide `signing_secret` only when rotating the secret. + """ # noqa: E501 + identifier: Optional[StrictStr] = Field(default=None, description="The identifier of the Custom Connector.") + base_url: Optional[StrictStr] = Field(default=None, description="The base URL of the Custom Connector.") + signing_secret: Optional[StrictStr] = Field(default=None, description="New signing secret. Write-only; never returned by the API. Omit to leave the existing secret unchanged.") + tls_mode: Optional[StrictBool] = Field(default=None, description="Whether TLS verification is enabled for the Custom Connector.") + tls_ca_cert_content: Optional[StrictStr] = Field(default=None, description="Optional PEM-encoded CA certificate content for TLS.") + supports_groups: Optional[StrictBool] = Field(default=None, description="Whether the Custom Connector supports groups.") + supports_nested_resources: Optional[StrictBool] = Field(default=None, description="Whether the Custom Connector supports nested resources.") + supports_nested_groups: Optional[StrictBool] = Field(default=None, description="Whether the Custom Connector supports nested groups.") + supports_event_ingestion: Optional[StrictBool] = Field(default=None, description="Whether the Custom Connector supports event ingestion.") + supports_idp: Optional[StrictBool] = Field(default=None, description="Whether the Custom Connector can be connected as an upstream user directory.") + idp_protocol: Optional[CustomConnectorIdpProtocolEnum] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "base_url", "signing_secret", "tls_mode", "tls_ca_cert_content", "supports_groups", "supports_nested_resources", "supports_nested_groups", "supports_event_ingestion", "supports_idp", "idp_protocol"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateCustomConnectorInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateCustomConnectorInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "base_url": obj.get("base_url"), + "signing_secret": obj.get("signing_secret"), + "tls_mode": obj.get("tls_mode"), + "tls_ca_cert_content": obj.get("tls_ca_cert_content"), + "supports_groups": obj.get("supports_groups"), + "supports_nested_resources": obj.get("supports_nested_resources"), + "supports_nested_groups": obj.get("supports_nested_groups"), + "supports_event_ingestion": obj.get("supports_event_ingestion"), + "supports_idp": obj.get("supports_idp"), + "idp_protocol": obj.get("idp_protocol") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/update_group_info.py b/opal_security/models/update_group_info.py index 3893c1f..d428930 100644 --- a/opal_security/models/update_group_info.py +++ b/opal_security/models/update_group_info.py @@ -42,9 +42,10 @@ class UpdateGroupInfo(BaseModel): require_support_ticket: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not access requests to the group require an access ticket. Deprecated in favor of `request_configurations`.") folder_id: Optional[UUID] = Field(default=None, description="The ID of the folder that the group is located in.") require_mfa_to_approve: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA for reviewers to approve requests for this group.") + requires_forfeit_reason: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not a reason is required when forfeiting access to this group.") require_mfa_to_request: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA for requesting access to this group. Deprecated in favor of `request_configurations`.") auto_approval: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to automatically approve requests to this group. Deprecated in favor of `request_configurations`.") - configuration_template_id: Optional[UUID] = Field(default=None, description="The ID of the associated configuration template.") + configuration_template_id: Optional[UUID] = Field(default=None, description="Deprecated. Use `PUT /groups/{group_id}/configuration-template` instead; that endpoint exposes attach, re-point, and detach as a single idempotent REST sub-resource and is the Terraform-friendly surface for managing this linkage. This field remains honored on the main PUT for now: set to a UUID to attach or re-point, set to `null` to unlink (forks the template into a private configuration that preserves the current settings), omit to leave linkage unchanged. Scheduled for removal in a future major version.") request_template_id: Optional[UUID] = Field(default=None, description="The ID of the associated request template. Deprecated in favor of `request_configurations`.") is_requestable: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to allow access requests to this group. Deprecated in favor of `request_configurations`.") group_leader_user_ids: Optional[List[UUID]] = Field(default=None, description="A list of User IDs for the group leaders of the group") @@ -52,9 +53,12 @@ class UpdateGroupInfo(BaseModel): request_configurations: Optional[List[RequestConfiguration]] = Field(default=None, description="The request configuration list of the configuration template. If not provided, the default request configuration will be used.") request_configuration_list: Optional[CreateRequestConfigurationInfoList] = Field(default=None, description="The request configuration list of the configuration template. If not provided, the default request configuration will be used. Deprecated in favor of `request_configurations`.") custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent to the requester when the request is approved.") + max_direct_users_allowed: Optional[StrictInt] = Field(default=None, description="The maximum number of direct users allowed for this group at once. Set to null to remove the limit.") risk_sensitivity_override: Optional[RiskSensitivityEnum] = None + match_remote_name: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not the group's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged.") + match_remote_description: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not the group's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["group_id", "name", "description", "admin_owner_id", "max_duration", "recommended_duration", "require_manager_approval", "require_support_ticket", "folder_id", "require_mfa_to_approve", "require_mfa_to_request", "auto_approval", "configuration_template_id", "request_template_id", "is_requestable", "group_leader_user_ids", "extensions_duration_in_minutes", "request_configurations", "request_configuration_list", "custom_request_notification", "risk_sensitivity_override"] + __properties: ClassVar[List[str]] = ["group_id", "name", "description", "admin_owner_id", "max_duration", "recommended_duration", "require_manager_approval", "require_support_ticket", "folder_id", "require_mfa_to_approve", "requires_forfeit_reason", "require_mfa_to_request", "auto_approval", "configuration_template_id", "request_template_id", "is_requestable", "group_leader_user_ids", "extensions_duration_in_minutes", "request_configurations", "request_configuration_list", "custom_request_notification", "max_direct_users_allowed", "risk_sensitivity_override", "match_remote_name", "match_remote_description"] model_config = ConfigDict( populate_by_name=True, @@ -134,6 +138,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "require_support_ticket": obj.get("require_support_ticket"), "folder_id": obj.get("folder_id"), "require_mfa_to_approve": obj.get("require_mfa_to_approve"), + "requires_forfeit_reason": obj.get("requires_forfeit_reason"), "require_mfa_to_request": obj.get("require_mfa_to_request"), "auto_approval": obj.get("auto_approval"), "configuration_template_id": obj.get("configuration_template_id"), @@ -144,7 +149,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "request_configurations": [RequestConfiguration.from_dict(_item) for _item in obj["request_configurations"]] if obj.get("request_configurations") is not None else None, "request_configuration_list": CreateRequestConfigurationInfoList.from_dict(obj["request_configuration_list"]) if obj.get("request_configuration_list") is not None else None, "custom_request_notification": obj.get("custom_request_notification"), - "risk_sensitivity_override": obj.get("risk_sensitivity_override") + "max_direct_users_allowed": obj.get("max_direct_users_allowed"), + "risk_sensitivity_override": obj.get("risk_sensitivity_override"), + "match_remote_name": obj.get("match_remote_name"), + "match_remote_description": obj.get("match_remote_description") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal_security/models/update_group_user_request.py b/opal_security/models/update_group_user_request.py index 0d13b8e..9ad14f1 100644 --- a/opal_security/models/update_group_user_request.py +++ b/opal_security/models/update_group_user_request.py @@ -28,7 +28,7 @@ class UpdateGroupUserRequest(BaseModel): """ UpdateGroupUserRequest """ # noqa: E501 - duration_minutes: Annotated[int, Field(le=525960, strict=True)] = Field(description="The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite, or a negative value to revoke access.") + duration_minutes: Annotated[int, Field(le=153722867, strict=True)] = Field(description="The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite, or a negative value to revoke access.") access_level_remote_id: Optional[StrictStr] = Field(default=None, description="The updated remote ID of the access level granted to this user.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["duration_minutes", "access_level_remote_id"] diff --git a/opal_security/models/update_opal_script_info.py b/opal_security/models/update_opal_script_info.py new file mode 100644 index 0000000..fe35bc3 --- /dev/null +++ b/opal_security/models/update_opal_script_info.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateOpalScriptInfo(BaseModel): + """ + Information for updating an OpalScript. Omitted fields are left unchanged. + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The name of the OpalScript.") + script: Optional[StrictStr] = Field(default=None, description="The source of the OpalScript. A new version is recorded only when the source differs from the current one.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "script"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateOpalScriptInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateOpalScriptInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "script": obj.get("script") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/update_paladin_info.py b/opal_security/models/update_paladin_info.py new file mode 100644 index 0000000..1163947 --- /dev/null +++ b/opal_security/models/update_paladin_info.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.paladin_connector import PaladinConnector +from typing import Optional, Set +from typing_extensions import Self + +class UpdatePaladinInfo(BaseModel): + """ + Information for updating a Paladin. + """ # noqa: E501 + name: StrictStr = Field(description="The name of the Paladin.") + monitor_mode: Optional[StrictBool] = Field(default=None, description="When true, the Paladin reasons about requests but takes no action. If omitted, the existing value is preserved.") + admin_view_only: Optional[StrictBool] = Field(default=None, description="When true, recommendations are visible only to admins. Only meaningful when monitor_mode is true. If omitted, the existing value is preserved.") + enabled_connectors: Optional[List[PaladinConnector]] = Field(default=None, description="The connectors the Paladin is allowed to use. If omitted, the existing connectors are preserved.") + instructions: Optional[StrictStr] = Field(default=None, description="The free-form instructions that guide the Paladin's decisions. If omitted, the existing instructions are preserved.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "monitor_mode", "admin_view_only", "enabled_connectors", "instructions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdatePaladinInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdatePaladinInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "monitor_mode": obj.get("monitor_mode"), + "admin_view_only": obj.get("admin_view_only"), + "enabled_connectors": obj.get("enabled_connectors"), + "instructions": obj.get("instructions") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/update_request_template_info.py b/opal_security/models/update_request_template_info.py new file mode 100644 index 0000000..389ff38 --- /dev/null +++ b/opal_security/models/update_request_template_info.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.request_template_custom_field_input import RequestTemplateCustomFieldInput +from typing import Optional, Set +from typing_extensions import Self + +class UpdateRequestTemplateInfo(BaseModel): + """ + Information for updating a request template. Omitted properties are left unchanged, but `custom_fields` replaces the template's fields wholesale when provided. + """ # noqa: E501 + request_template_id: UUID = Field(description="The ID of the request template to update.") + name: Optional[StrictStr] = Field(default=None, description="The new name of the request template.") + custom_fields: Optional[List[RequestTemplateCustomFieldInput]] = Field(default=None, description="The complete set of fields for the template. Any field not included is removed.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["request_template_id", "name", "custom_fields"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateRequestTemplateInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) + _items = [] + if self.custom_fields: + for _item_custom_fields in self.custom_fields: + if _item_custom_fields: + _items.append(_item_custom_fields.to_dict()) + _dict['custom_fields'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateRequestTemplateInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "request_template_id": obj.get("request_template_id"), + "name": obj.get("name"), + "custom_fields": [RequestTemplateCustomFieldInput.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/update_resource_custom_access_level_info.py b/opal_security/models/update_resource_custom_access_level_info.py new file mode 100644 index 0000000..b828f59 --- /dev/null +++ b/opal_security/models/update_resource_custom_access_level_info.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateResourceCustomAccessLevelInfo(BaseModel): + """ + Info for updating a custom access level. + """ # noqa: E501 + access_level_name: Optional[StrictStr] = Field(default=None, description="The new human-readable name.") + policy: Optional[StrictStr] = Field(default=None, description="The new policy document.") + requestable_by_default: Optional[StrictBool] = Field(default=None, description="Whether the role is requestable.") + stackable_sensitivity_index: Optional[StrictInt] = Field(default=None, description="The new sensitivity index.") + clear_stackable_sensitivity_index: Optional[StrictBool] = Field(default=None, description="Set to true to remove from the hierarchy.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["access_level_name", "policy", "requestable_by_default", "stackable_sensitivity_index", "clear_stackable_sensitivity_index"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateResourceCustomAccessLevelInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateResourceCustomAccessLevelInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "access_level_name": obj.get("access_level_name"), + "policy": obj.get("policy"), + "requestable_by_default": obj.get("requestable_by_default"), + "stackable_sensitivity_index": obj.get("stackable_sensitivity_index"), + "clear_stackable_sensitivity_index": obj.get("clear_stackable_sensitivity_index") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/update_resource_info.py b/opal_security/models/update_resource_info.py index 6c46b86..ad1fa27 100644 --- a/opal_security/models/update_resource_info.py +++ b/opal_security/models/update_resource_info.py @@ -43,13 +43,17 @@ class UpdateResourceInfo(BaseModel): require_support_ticket: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not access requests to the resource require an access ticket. Deprecated in favor of `request_configurations`.") folder_id: Optional[UUID] = Field(default=None, description="The ID of the folder that the resource is located in.") require_mfa_to_approve: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA for reviewers to approve requests for this resource.") + requires_forfeit_reason: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not a reason is required when forfeiting access to this resource.") require_mfa_to_request: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA for requesting access to this resource. Deprecated in favor of `request_configurations`.") require_mfa_to_connect: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA to connect to this resource.") auto_approval: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to automatically approve requests to this resource. Deprecated in favor of `request_configurations`.") ticket_propagation: Optional[TicketPropagationConfiguration] = None custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent upon request approval.") + max_direct_users_allowed: Optional[StrictInt] = Field(default=None, description="The maximum number of direct users allowed for this resource at once. Set to null to remove the limit.") risk_sensitivity_override: Optional[RiskSensitivityEnum] = None - configuration_template_id: Optional[UUID] = Field(default=None, description="The ID of the associated configuration template.") + match_remote_name: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not the resource's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged.") + match_remote_description: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not the resource's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged.") + configuration_template_id: Optional[UUID] = Field(default=None, description="Deprecated. Use `PUT /resources/{resource_id}/configuration-template` instead; that endpoint exposes attach, re-point, and detach as a single idempotent REST sub-resource and is the Terraform-friendly surface for managing this linkage. This field remains honored on the main PUT for now: set to a UUID to attach or re-point, set to `null` to unlink (forks the template into a private configuration that preserves the current settings), omit to leave linkage unchanged. Scheduled for removal in a future major version.") request_template_id: Optional[UUID] = Field(default=None, description="The ID of the associated request template. Deprecated in favor of `request_configurations`.") is_requestable: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to allow access requests to this resource. Deprecated in favor of `request_configurations`.") extensions_duration_in_minutes: Optional[StrictInt] = Field(default=None, description="The duration for which access can be extended (in minutes). Deprecated, set the extension duration in the request_configuration you want it to apply to.") @@ -57,7 +61,7 @@ class UpdateResourceInfo(BaseModel): request_configurations: Optional[List[RequestConfiguration]] = Field(default=None, description="A list of configurations for requests to this resource. If not provided, the default request configuration will be used.") request_configuration_list: Optional[CreateRequestConfigurationInfoList] = Field(default=None, description="A list of configurations for requests to this resource. If not provided, the default request configuration will be used. Deprecated in favor of `request_configurations`.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["resource_id", "name", "description", "admin_owner_id", "max_duration", "recommended_duration", "require_manager_approval", "require_support_ticket", "folder_id", "require_mfa_to_approve", "require_mfa_to_request", "require_mfa_to_connect", "auto_approval", "ticket_propagation", "custom_request_notification", "risk_sensitivity_override", "configuration_template_id", "request_template_id", "is_requestable", "extensions_duration_in_minutes", "parent_resource_id", "request_configurations", "request_configuration_list"] + __properties: ClassVar[List[str]] = ["resource_id", "name", "description", "admin_owner_id", "max_duration", "recommended_duration", "require_manager_approval", "require_support_ticket", "folder_id", "require_mfa_to_approve", "requires_forfeit_reason", "require_mfa_to_request", "require_mfa_to_connect", "auto_approval", "ticket_propagation", "custom_request_notification", "max_direct_users_allowed", "risk_sensitivity_override", "match_remote_name", "match_remote_description", "configuration_template_id", "request_template_id", "is_requestable", "extensions_duration_in_minutes", "parent_resource_id", "request_configurations", "request_configuration_list"] model_config = ConfigDict( populate_by_name=True, @@ -140,12 +144,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "require_support_ticket": obj.get("require_support_ticket"), "folder_id": obj.get("folder_id"), "require_mfa_to_approve": obj.get("require_mfa_to_approve"), + "requires_forfeit_reason": obj.get("requires_forfeit_reason"), "require_mfa_to_request": obj.get("require_mfa_to_request"), "require_mfa_to_connect": obj.get("require_mfa_to_connect"), "auto_approval": obj.get("auto_approval"), "ticket_propagation": TicketPropagationConfiguration.from_dict(obj["ticket_propagation"]) if obj.get("ticket_propagation") is not None else None, "custom_request_notification": obj.get("custom_request_notification"), + "max_direct_users_allowed": obj.get("max_direct_users_allowed"), "risk_sensitivity_override": obj.get("risk_sensitivity_override"), + "match_remote_name": obj.get("match_remote_name"), + "match_remote_description": obj.get("match_remote_description"), "configuration_template_id": obj.get("configuration_template_id"), "request_template_id": obj.get("request_template_id"), "is_requestable": obj.get("is_requestable"), diff --git a/opal_security/models/update_resource_user_request.py b/opal_security/models/update_resource_user_request.py index cef9218..587fbb7 100644 --- a/opal_security/models/update_resource_user_request.py +++ b/opal_security/models/update_resource_user_request.py @@ -28,7 +28,7 @@ class UpdateResourceUserRequest(BaseModel): """ UpdateResourceUserRequest """ # noqa: E501 - duration_minutes: Annotated[int, Field(le=525960, strict=True)] = Field(description="The updated duration for which the resource can be accessed (in minutes). Use 0 for indefinite.") + duration_minutes: Annotated[int, Field(le=153722867, strict=True)] = Field(description="The updated duration for which the resource can be accessed (in minutes). Use 0 for indefinite.") access_level_remote_id: Optional[StrictStr] = Field(default=None, description="The updated remote ID of the access level granted to this user.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["duration_minutes", "access_level_remote_id"] diff --git a/opal_security/models/update_user_info.py b/opal_security/models/update_user_info.py new file mode 100644 index 0000000..3eec4b3 --- /dev/null +++ b/opal_security/models/update_user_info.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from typing import Optional, Set +from typing_extensions import Self + +class UpdateUserInfo(BaseModel): + """ + The user fields to update. + """ # noqa: E501 + manager_id: Optional[UUID] = Field(default=None, description="The user's manager ID. Set to null to remove the manager.") + position: Optional[StrictStr] = Field(default=None, description="The user's position.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["manager_id", "position"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateUserInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateUserInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "manager_id": obj.get("manager_id"), + "position": obj.get("position") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/user.py b/opal_security/models/user.py index 8552d74..8267d51 100644 --- a/opal_security/models/user.py +++ b/opal_security/models/user.py @@ -35,9 +35,10 @@ class User(BaseModel): first_name: StrictStr = Field(description="The first name of the user.") last_name: StrictStr = Field(description="The last name of the user.") position: StrictStr = Field(description="The user's position.") + manager_id: Optional[UUID] = Field(default=None, description="The ID of the user's manager. Null if the user has no manager.") hr_idp_status: Optional[UserHrIdpStatusEnum] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["user_id", "email", "full_name", "first_name", "last_name", "position", "hr_idp_status"] + __properties: ClassVar[List[str]] = ["user_id", "email", "full_name", "first_name", "last_name", "position", "manager_id", "hr_idp_status"] model_config = ConfigDict( populate_by_name=True, @@ -103,6 +104,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "first_name": obj.get("first_name"), "last_name": obj.get("last_name"), "position": obj.get("position"), + "manager_id": obj.get("manager_id"), "hr_idp_status": obj.get("hr_idp_status") }) # store additional fields in additional_properties diff --git a/opal_security/models/user_access.py b/opal_security/models/user_access.py new file mode 100644 index 0000000..96ba55e --- /dev/null +++ b/opal_security/models/user_access.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.propagation_status import PropagationStatus +from opal_security.models.user_access_entity_type_enum import UserAccessEntityTypeEnum +from opal_security.models.user_access_level import UserAccessLevel +from typing import Optional, Set +from typing_extensions import Self + +class UserAccess(BaseModel): + """ + # User Access Object ### Description The `UserAccess` object represents a user's access to a single resource or group at one access level, either directly or indirectly (for example, through group membership). ### Usage Example Fetch from the `GET /users/{user_id}/access` endpoint. + """ # noqa: E501 + entity_type: UserAccessEntityTypeEnum + entity_id: UUID = Field(description="The ID of the resource or group.") + entity_name: StrictStr = Field(description="The name of the resource or group.") + description: StrictStr = Field(description="The description of the resource or group.") + access_level: UserAccessLevel + expiration_date: Optional[datetime] = Field(default=None, description="The day and time the user's access will expire. If the user has more than one way to access the entity, this is the latest expiration. Null if the access does not expire.") + has_direct_access: StrictBool = Field(description="The user has direct access to this entity (vs. indirectly, like through a group).") + num_access_paths: StrictInt = Field(description="The number of ways in which the user has access to this entity (directly and indirectly).") + propagation_status: Optional[PropagationStatus] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["entity_type", "entity_id", "entity_name", "description", "access_level", "expiration_date", "has_direct_access", "num_access_paths", "propagation_status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserAccess from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of access_level + if self.access_level: + _dict['access_level'] = self.access_level.to_dict() + # override the default output from pydantic by calling `to_dict()` of propagation_status + if self.propagation_status: + _dict['propagation_status'] = self.propagation_status.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserAccess from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "entity_type": obj.get("entity_type"), + "entity_id": obj.get("entity_id"), + "entity_name": obj.get("entity_name"), + "description": obj.get("description"), + "access_level": UserAccessLevel.from_dict(obj["access_level"]) if obj.get("access_level") is not None else None, + "expiration_date": obj.get("expiration_date"), + "has_direct_access": obj.get("has_direct_access"), + "num_access_paths": obj.get("num_access_paths"), + "propagation_status": PropagationStatus.from_dict(obj["propagation_status"]) if obj.get("propagation_status") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/user_access_entity_type_enum.py b/opal_security/models/user_access_entity_type_enum.py new file mode 100644 index 0000000..48aa0b5 --- /dev/null +++ b/opal_security/models/user_access_entity_type_enum.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class UserAccessEntityTypeEnum(str, Enum): + """ + The type of entity a user has access to. + """ + + """ + allowed enum values + """ + GROUP = 'GROUP' + RESOURCE = 'RESOURCE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of UserAccessEntityTypeEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/user_access_level.py b/opal_security/models/user_access_level.py new file mode 100644 index 0000000..d8a11c6 --- /dev/null +++ b/opal_security/models/user_access_level.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UserAccessLevel(BaseModel): + """ + The level of access the user has to a resource or group. The \"default\" access level is an object whose fields are all empty strings. + """ # noqa: E501 + access_level_name: StrictStr = Field(description="The human-readable name of the access level.") + access_level_remote_id: StrictStr = Field(description="The machine-readable identifier of the access level.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["access_level_name", "access_level_remote_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserAccessLevel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserAccessLevel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "access_level_name": obj.get("access_level_name"), + "access_level_remote_id": obj.get("access_level_remote_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/user_access_list.py b/opal_security/models/user_access_list.py new file mode 100644 index 0000000..639c0c3 --- /dev/null +++ b/opal_security/models/user_access_list.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal_security.models.user_access import UserAccess +from typing import Optional, Set +from typing_extensions import Self + +class UserAccessList(BaseModel): + """ + A user's access to resources and groups, or one page of it if `page_size` was set. + """ # noqa: E501 + results: List[UserAccess] + next: Optional[StrictStr] = Field(default=None, description="The cursor with which to continue pagination if additional result pages exist.") + previous: Optional[StrictStr] = Field(default=None, description="The cursor used to obtain the current result page.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "next", "previous"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserAccessList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserAccessList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [UserAccess.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "next": obj.get("next"), + "previous": obj.get("previous") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/user_attribute_selector.py b/opal_security/models/user_attribute_selector.py index 3b30b16..247db14 100644 --- a/opal_security/models/user_attribute_selector.py +++ b/opal_security/models/user_attribute_selector.py @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class UserAttributeSelector(BaseModel): UserAttributeSelector """ # noqa: E501 attribute: StrictStr - values: List[StrictStr] + values: List[StrictStr] = Field(description="Values to match; a user matches if their attribute equals any of them. For HR_IDP_STATUS, use HrIdpStatus values, or UNSET for users with no IDP status (shown as \"Inactive\"). UNSET must be the last value.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["attribute", "values"] diff --git a/opal_security/models/user_product_role_enum.py b/opal_security/models/user_product_role_enum.py new file mode 100644 index 0000000..7e34173 --- /dev/null +++ b/opal_security/models/user_product_role_enum.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class UserProductRoleEnum(str, Enum): + """ + The product role assigned to a user. + """ + + """ + allowed enum values + """ + MEMBER = 'MEMBER' + ADMIN = 'ADMIN' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of UserProductRoleEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/viewer_campaign_item.py b/opal_security/models/viewer_campaign_item.py new file mode 100644 index 0000000..cc24574 --- /dev/null +++ b/opal_security/models/viewer_campaign_item.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID +from opal_security.models.entity_type_enum import EntityTypeEnum +from opal_security.models.viewer_campaign_item_review_decision_enum import ViewerCampaignItemReviewDecisionEnum +from typing import Optional, Set +from typing_extensions import Self + +class ViewerCampaignItem(BaseModel): + """ + A campaign review item assigned to the current viewer, matching GraphQL `ViewerCampaignItem`. + """ # noqa: E501 + campaign_item_review_id: UUID = Field(description="The ID of the campaign item review.") + decision: Optional[ViewerCampaignItemReviewDecisionEnum] = Field(default=None, description="The reviewer's decision. Null when undecided.") + note: Optional[StrictStr] = Field(default=None, description="Optional note from the reviewer.") + decided_at: Optional[datetime] = Field(default=None, description="When the decision was finalized.") + pending_decision: Optional[ViewerCampaignItemReviewDecisionEnum] = Field(default=None, description="Pending decision staged by the viewer, if any.") + pending_note: Optional[StrictStr] = Field(default=None, description="Pending note attached to the reviewer's pending decision.") + updated_access_level_remote_id: Optional[StrictStr] = Field(default=None, description="Target access level remote ID when decision is CHANGE_ROLE.") + pending_updated_access_level_remote_id: Optional[StrictStr] = Field(default=None, description="Pending target access level remote ID when decision is CHANGE_ROLE.") + updated_duration_in_minutes: Optional[StrictInt] = Field(default=None, description="Built-in duration in minutes when decision is REDUCE_EXPIRATION.") + pending_updated_duration_in_minutes: Optional[StrictInt] = Field(default=None, description="Staged built-in duration in minutes when the pending decision is REDUCE_EXPIRATION.") + reassigned_to_reviewer_ids: Optional[List[UUID]] = Field(default=None, description="User IDs this review was reassigned to.") + principal_id: UUID = Field(description="Principal ID from the role assignment.") + principal_type: EntityTypeEnum + entity_id: UUID = Field(description="Entity ID from the role assignment.") + entity_type: EntityTypeEnum + access_level_name: Optional[StrictStr] = Field(default=None, description="Denormalized access level name.") + access_level_remote_id: Optional[StrictStr] = Field(default=None, description="Access level remote ID from the role assignment.") + granted_at: datetime = Field(description="When the access was originally granted.") + expires_at: Optional[datetime] = Field(default=None, description="When the access expires, if set.") + role_assignment_id: UUID = Field(description="ID of the underlying role assignment.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["campaign_item_review_id", "decision", "note", "decided_at", "pending_decision", "pending_note", "updated_access_level_remote_id", "pending_updated_access_level_remote_id", "updated_duration_in_minutes", "pending_updated_duration_in_minutes", "reassigned_to_reviewer_ids", "principal_id", "principal_type", "entity_id", "entity_type", "access_level_name", "access_level_remote_id", "granted_at", "expires_at", "role_assignment_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ViewerCampaignItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ViewerCampaignItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "campaign_item_review_id": obj.get("campaign_item_review_id"), + "decision": obj.get("decision"), + "note": obj.get("note"), + "decided_at": obj.get("decided_at"), + "pending_decision": obj.get("pending_decision"), + "pending_note": obj.get("pending_note"), + "updated_access_level_remote_id": obj.get("updated_access_level_remote_id"), + "pending_updated_access_level_remote_id": obj.get("pending_updated_access_level_remote_id"), + "updated_duration_in_minutes": obj.get("updated_duration_in_minutes"), + "pending_updated_duration_in_minutes": obj.get("pending_updated_duration_in_minutes"), + "reassigned_to_reviewer_ids": obj.get("reassigned_to_reviewer_ids"), + "principal_id": obj.get("principal_id"), + "principal_type": obj.get("principal_type"), + "entity_id": obj.get("entity_id"), + "entity_type": obj.get("entity_type"), + "access_level_name": obj.get("access_level_name"), + "access_level_remote_id": obj.get("access_level_remote_id"), + "granted_at": obj.get("granted_at"), + "expires_at": obj.get("expires_at"), + "role_assignment_id": obj.get("role_assignment_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal_security/models/viewer_campaign_item_review_decision_enum.py b/opal_security/models/viewer_campaign_item_review_decision_enum.py new file mode 100644 index 0000000..25ee304 --- /dev/null +++ b/opal_security/models/viewer_campaign_item_review_decision_enum.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ViewerCampaignItemReviewDecisionEnum(str, Enum): + """ + Decision recorded on a campaign item review row. + """ + + """ + allowed enum values + """ + APPROVED = 'APPROVED' + REVOKED = 'REVOKED' + CHANGE_ROLE = 'CHANGE_ROLE' + REDUCE_EXPIRATION = 'REDUCE_EXPIRATION' + ADMIN_REVOKED = 'ADMIN_REVOKED' + NO_ACTION = 'NO_ACTION' + REASSIGNED = 'REASSIGNED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ViewerCampaignItemReviewDecisionEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/viewer_campaign_item_sort_field_enum.py b/opal_security/models/viewer_campaign_item_sort_field_enum.py new file mode 100644 index 0000000..350f005 --- /dev/null +++ b/opal_security/models/viewer_campaign_item_sort_field_enum.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ViewerCampaignItemSortFieldEnum(str, Enum): + """ + Sort field for viewer campaign items. + """ + + """ + allowed enum values + """ + PRINCIPAL_NAME = 'PRINCIPAL_NAME' + ENTITY_NAME = 'ENTITY_NAME' + EXPIRATION = 'EXPIRATION' + LAST_USED = 'LAST_USED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ViewerCampaignItemSortFieldEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal_security/models/viewer_campaign_item_status_enum.py b/opal_security/models/viewer_campaign_item_status_enum.py new file mode 100644 index 0000000..5b9c0cf --- /dev/null +++ b/opal_security/models/viewer_campaign_item_status_enum.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ViewerCampaignItemStatusEnum(str, Enum): + """ + Decision status for a viewer campaign item. + """ + + """ + allowed enum values + """ + APPROVED = 'APPROVED' + REVOKED = 'REVOKED' + CHANGE_ROLE = 'CHANGE_ROLE' + REDUCE_EXPIRATION = 'REDUCE_EXPIRATION' + NO_ACTION = 'NO_ACTION' + PENDING = 'PENDING' + REASSIGNED = 'REASSIGNED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ViewerCampaignItemStatusEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/test/test_add_role_assignment_input.py b/test/test_add_role_assignment_input.py new file mode 100644 index 0000000..df3f67e --- /dev/null +++ b/test/test_add_role_assignment_input.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.add_role_assignment_input import AddRoleAssignmentInput + +class TestAddRoleAssignmentInput(unittest.TestCase): + """AddRoleAssignmentInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddRoleAssignmentInput: + """Test AddRoleAssignmentInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AddRoleAssignmentInput` + """ + model = AddRoleAssignmentInput() + if include_optional: + return AddRoleAssignmentInput( + entity_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3', + entity_type = 'GROUP', + principal_id = '29827fb8-f2dd-4e80-9576-28e31e9934ac', + principal_type = 'GROUP', + access_level_remote_id = '', + duration_minutes = 0 + ) + else: + return AddRoleAssignmentInput( + entity_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3', + entity_type = 'GROUP', + principal_id = '29827fb8-f2dd-4e80-9576-28e31e9934ac', + principal_type = 'GROUP', + ) + """ + + def testAddRoleAssignmentInput(self): + """Test AddRoleAssignmentInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_role_assignments_entry.py b/test/test_add_role_assignments_entry.py new file mode 100644 index 0000000..0cdfbf5 --- /dev/null +++ b/test/test_add_role_assignments_entry.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.add_role_assignments_entry import AddRoleAssignmentsEntry + +class TestAddRoleAssignmentsEntry(unittest.TestCase): + """AddRoleAssignmentsEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddRoleAssignmentsEntry: + """Test AddRoleAssignmentsEntry + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AddRoleAssignmentsEntry` + """ + model = AddRoleAssignmentsEntry() + if include_optional: + return AddRoleAssignmentsEntry( + role_assignment = opal_security.models.role_assignment.RoleAssignment( + id = '', + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + access_level = null, + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + granted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ) + else: + return AddRoleAssignmentsEntry( + role_assignment = opal_security.models.role_assignment.RoleAssignment( + id = '', + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + access_level = null, + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + granted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + ) + """ + + def testAddRoleAssignmentsEntry(self): + """Test AddRoleAssignmentsEntry""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_role_assignments_request.py b/test/test_add_role_assignments_request.py new file mode 100644 index 0000000..9fa2931 --- /dev/null +++ b/test/test_add_role_assignments_request.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.add_role_assignments_request import AddRoleAssignmentsRequest + +class TestAddRoleAssignmentsRequest(unittest.TestCase): + """AddRoleAssignmentsRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddRoleAssignmentsRequest: + """Test AddRoleAssignmentsRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AddRoleAssignmentsRequest` + """ + model = AddRoleAssignmentsRequest() + if include_optional: + return AddRoleAssignmentsRequest( + role_assignments = [ + opal_security.models.add_role_assignment_input.AddRoleAssignmentInput( + entity_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3', + entity_type = null, + principal_id = '29827fb8-f2dd-4e80-9576-28e31e9934ac', + principal_type = null, + access_level_remote_id = '', + duration_minutes = 0, ) + ] + ) + else: + return AddRoleAssignmentsRequest( + role_assignments = [ + opal_security.models.add_role_assignment_input.AddRoleAssignmentInput( + entity_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3', + entity_type = null, + principal_id = '29827fb8-f2dd-4e80-9576-28e31e9934ac', + principal_type = null, + access_level_remote_id = '', + duration_minutes = 0, ) + ], + ) + """ + + def testAddRoleAssignmentsRequest(self): + """Test AddRoleAssignmentsRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_role_assignments_response.py b/test/test_add_role_assignments_response.py new file mode 100644 index 0000000..40aaa66 --- /dev/null +++ b/test/test_add_role_assignments_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.add_role_assignments_response import AddRoleAssignmentsResponse + +class TestAddRoleAssignmentsResponse(unittest.TestCase): + """AddRoleAssignmentsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddRoleAssignmentsResponse: + """Test AddRoleAssignmentsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AddRoleAssignmentsResponse` + """ + model = AddRoleAssignmentsResponse() + if include_optional: + return AddRoleAssignmentsResponse( + task_ids = [ + '' + ], + entries = [ + opal_security.models.add_role_assignments_entry.AddRoleAssignmentsEntry( + role_assignment = opal_security.models.role_assignment.RoleAssignment( + id = '', + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + access_level = null, + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + granted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), ) + ] + ) + else: + return AddRoleAssignmentsResponse( + task_ids = [ + '' + ], + entries = [ + opal_security.models.add_role_assignments_entry.AddRoleAssignmentsEntry( + role_assignment = opal_security.models.role_assignment.RoleAssignment( + id = '', + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + access_level = null, + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + granted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), ) + ], + ) + """ + + def testAddRoleAssignmentsResponse(self): + """Test AddRoleAssignmentsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_activity_api.py b/test/test_agent_activity_api.py new file mode 100644 index 0000000..5d0b34f --- /dev/null +++ b/test/test_agent_activity_api.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.api.agent_activity_api import AgentActivityApi + + +class TestAgentActivityApi(unittest.TestCase): + """AgentActivityApi unit test stubs""" + + def setUp(self) -> None: + self.api = AgentActivityApi() + + def tearDown(self) -> None: + pass + + def test_anthropic_inference_hook(self) -> None: + """Test case for anthropic_inference_hook + + Anthropic inference hook verdict + """ + pass + + def test_get_agent_activity_client_settings(self) -> None: + """Test case for get_agent_activity_client_settings + + Get agent activity client settings + """ + pass + + def test_get_agent_kill_switch(self) -> None: + """Test case for get_agent_kill_switch + + Get the agent kill switch + """ + pass + + def test_report_agent_activity(self) -> None: + """Test case for report_agent_activity + + Report agent activity + """ + pass + + def test_report_mcp_config(self) -> None: + """Test case for report_mcp_config + + Report MCP server configuration + """ + pass + + def test_set_agent_kill_switch(self) -> None: + """Test case for set_agent_kill_switch + + Set the agent kill switch + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_activity_client_setting.py b/test/test_agent_activity_client_setting.py new file mode 100644 index 0000000..4661e19 --- /dev/null +++ b/test/test_agent_activity_client_setting.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.agent_activity_client_setting import AgentActivityClientSetting + +class TestAgentActivityClientSetting(unittest.TestCase): + """AgentActivityClientSetting unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentActivityClientSetting: + """Test AgentActivityClientSetting + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentActivityClientSetting` + """ + model = AgentActivityClientSetting() + if include_optional: + return AgentActivityClientSetting( + reports_tool_calls = True, + conversation_content = 'always' + ) + else: + return AgentActivityClientSetting( + reports_tool_calls = True, + ) + """ + + def testAgentActivityClientSetting(self): + """Test AgentActivityClientSetting""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_activity_client_settings.py b/test/test_agent_activity_client_settings.py new file mode 100644 index 0000000..d70a44f --- /dev/null +++ b/test/test_agent_activity_client_settings.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.agent_activity_client_settings import AgentActivityClientSettings + +class TestAgentActivityClientSettings(unittest.TestCase): + """AgentActivityClientSettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentActivityClientSettings: + """Test AgentActivityClientSettings + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentActivityClientSettings` + """ + model = AgentActivityClientSettings() + if include_optional: + return AgentActivityClientSettings( + batch_wait_seconds = 1.337, + max_events_per_request = 56, + max_bytes_per_request = 56, + max_requests_per_second = 1.337, + burst_requests = 56, + cache_seconds = 56, + clients = { + 'key' : opal_security.models.agent_activity_client_setting.AgentActivityClientSetting( + reports_tool_calls = True, + conversation_content = 'always', ) + } + ) + else: + return AgentActivityClientSettings( + batch_wait_seconds = 1.337, + max_events_per_request = 56, + max_bytes_per_request = 56, + max_requests_per_second = 1.337, + burst_requests = 56, + cache_seconds = 56, + clients = { + 'key' : opal_security.models.agent_activity_client_setting.AgentActivityClientSetting( + reports_tool_calls = True, + conversation_content = 'always', ) + }, + ) + """ + + def testAgentActivityClientSettings(self): + """Test AgentActivityClientSettings""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_activity_content_report.py b/test/test_agent_activity_content_report.py new file mode 100644 index 0000000..06d8bc8 --- /dev/null +++ b/test/test_agent_activity_content_report.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.agent_activity_content_report import AgentActivityContentReport + +class TestAgentActivityContentReport(unittest.TestCase): + """AgentActivityContentReport unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentActivityContentReport: + """Test AgentActivityContentReport + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentActivityContentReport` + """ + model = AgentActivityContentReport() + if include_optional: + return AgentActivityContentReport( + assistant_text = '', + thinking = '', + images = opal_security.models.agent_activity_images.AgentActivityImages( + count = 56, + bytes = 56, ), + truncated = { + 'key' : 56 + } + ) + else: + return AgentActivityContentReport( + ) + """ + + def testAgentActivityContentReport(self): + """Test AgentActivityContentReport""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_activity_event.py b/test/test_agent_activity_event.py new file mode 100644 index 0000000..49d0538 --- /dev/null +++ b/test/test_agent_activity_event.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.agent_activity_event import AgentActivityEvent + +class TestAgentActivityEvent(unittest.TestCase): + """AgentActivityEvent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentActivityEvent: + """Test AgentActivityEvent + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentActivityEvent` + """ + model = AgentActivityEvent() + if include_optional: + return AgentActivityEvent( + hook_event_name = '', + tool_input = { }, + session_id = '', + prompt_id = '', + turn_id = '', + model = '', + cursor_version = '', + agent_id = '', + agent_type = '', + permission_mode = '', + actor_email = '', + opal_reported = opal_security.models.agent_activity_opal_reported.AgentActivityOpalReported( + configured_email = '', + claude_account_email = '', + codex_account_email = '', + codex_auth_mode = '', + chatgpt_account_email = '', + cursor_account_email = '', + client = '', + git_email = '', + os_user = '', + hostname = '', ), + duration_ms = None, + transcript_path = '', + tool_name = '', + mcp_server = opal_security.models.agent_activity_mcp_server.AgentActivityMcpServer( + name = '', + source = '', ), + opal_mcp_server = opal_security.models.agent_activity_opal_mcp_server.AgentActivityOpalMcpServer( + url = '', + transport = '', + command_hash = '', + scope = '', ), + tool_use_id = '', + opal_event_id = '', + cwd = '', + timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + prompt = None, + tool_response = None, + last_assistant_message = None, + opal_content = opal_security.models.agent_activity_content_report.AgentActivityContentReport( + assistant_text = '', + thinking = '', + images = opal_security.models.agent_activity_images.AgentActivityImages( + count = 56, + bytes = 56, ), + truncated = { + 'key' : 56 + }, ) + ) + else: + return AgentActivityEvent( + hook_event_name = '', + ) + """ + + def testAgentActivityEvent(self): + """Test AgentActivityEvent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_activity_images.py b/test/test_agent_activity_images.py new file mode 100644 index 0000000..a0d9669 --- /dev/null +++ b/test/test_agent_activity_images.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.agent_activity_images import AgentActivityImages + +class TestAgentActivityImages(unittest.TestCase): + """AgentActivityImages unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentActivityImages: + """Test AgentActivityImages + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentActivityImages` + """ + model = AgentActivityImages() + if include_optional: + return AgentActivityImages( + count = 56, + bytes = 56 + ) + else: + return AgentActivityImages( + ) + """ + + def testAgentActivityImages(self): + """Test AgentActivityImages""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_activity_ingest_request.py b/test/test_agent_activity_ingest_request.py new file mode 100644 index 0000000..cbf238a --- /dev/null +++ b/test/test_agent_activity_ingest_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.agent_activity_ingest_request import AgentActivityIngestRequest + +class TestAgentActivityIngestRequest(unittest.TestCase): + """AgentActivityIngestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentActivityIngestRequest: + """Test AgentActivityIngestRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentActivityIngestRequest` + """ + model = AgentActivityIngestRequest() + if include_optional: + return AgentActivityIngestRequest( + events = [ + { + 'key' : null + } + ] + ) + else: + return AgentActivityIngestRequest( + ) + """ + + def testAgentActivityIngestRequest(self): + """Test AgentActivityIngestRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_activity_ingest_result.py b/test/test_agent_activity_ingest_result.py new file mode 100644 index 0000000..3664861 --- /dev/null +++ b/test/test_agent_activity_ingest_result.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.agent_activity_ingest_result import AgentActivityIngestResult + +class TestAgentActivityIngestResult(unittest.TestCase): + """AgentActivityIngestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentActivityIngestResult: + """Test AgentActivityIngestResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentActivityIngestResult` + """ + model = AgentActivityIngestResult() + if include_optional: + return AgentActivityIngestResult( + received = 56, + stored = 56, + attributed = 56, + unattributed = 56 + ) + else: + return AgentActivityIngestResult( + received = 56, + stored = 56, + attributed = 56, + unattributed = 56, + ) + """ + + def testAgentActivityIngestResult(self): + """Test AgentActivityIngestResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_activity_mcp_server.py b/test/test_agent_activity_mcp_server.py new file mode 100644 index 0000000..a1d5e6c --- /dev/null +++ b/test/test_agent_activity_mcp_server.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.agent_activity_mcp_server import AgentActivityMcpServer + +class TestAgentActivityMcpServer(unittest.TestCase): + """AgentActivityMcpServer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentActivityMcpServer: + """Test AgentActivityMcpServer + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentActivityMcpServer` + """ + model = AgentActivityMcpServer() + if include_optional: + return AgentActivityMcpServer( + name = '', + source = '' + ) + else: + return AgentActivityMcpServer( + ) + """ + + def testAgentActivityMcpServer(self): + """Test AgentActivityMcpServer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_activity_opal_mcp_server.py b/test/test_agent_activity_opal_mcp_server.py new file mode 100644 index 0000000..7a25a2c --- /dev/null +++ b/test/test_agent_activity_opal_mcp_server.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.agent_activity_opal_mcp_server import AgentActivityOpalMcpServer + +class TestAgentActivityOpalMcpServer(unittest.TestCase): + """AgentActivityOpalMcpServer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentActivityOpalMcpServer: + """Test AgentActivityOpalMcpServer + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentActivityOpalMcpServer` + """ + model = AgentActivityOpalMcpServer() + if include_optional: + return AgentActivityOpalMcpServer( + url = '', + transport = '', + command_hash = '', + scope = '' + ) + else: + return AgentActivityOpalMcpServer( + ) + """ + + def testAgentActivityOpalMcpServer(self): + """Test AgentActivityOpalMcpServer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_activity_opal_reported.py b/test/test_agent_activity_opal_reported.py new file mode 100644 index 0000000..8adb513 --- /dev/null +++ b/test/test_agent_activity_opal_reported.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.agent_activity_opal_reported import AgentActivityOpalReported + +class TestAgentActivityOpalReported(unittest.TestCase): + """AgentActivityOpalReported unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentActivityOpalReported: + """Test AgentActivityOpalReported + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentActivityOpalReported` + """ + model = AgentActivityOpalReported() + if include_optional: + return AgentActivityOpalReported( + configured_email = '', + claude_account_email = '', + codex_account_email = '', + codex_auth_mode = '', + chatgpt_account_email = '', + cursor_account_email = '', + client = '', + git_email = '', + os_user = '', + hostname = '' + ) + else: + return AgentActivityOpalReported( + ) + """ + + def testAgentActivityOpalReported(self): + """Test AgentActivityOpalReported""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_kill_switch.py b/test/test_agent_kill_switch.py new file mode 100644 index 0000000..ff12960 --- /dev/null +++ b/test/test_agent_kill_switch.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.agent_kill_switch import AgentKillSwitch + +class TestAgentKillSwitch(unittest.TestCase): + """AgentKillSwitch unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentKillSwitch: + """Test AgentKillSwitch + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentKillSwitch` + """ + model = AgentKillSwitch() + if include_optional: + return AgentKillSwitch( + active = True, + activated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + activated_by_user_id = '', + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deactivated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + reason = '' + ) + else: + return AgentKillSwitch( + active = True, + ) + """ + + def testAgentKillSwitch(self): + """Test AgentKillSwitch""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_anthropic_inference_hook_verdict.py b/test/test_anthropic_inference_hook_verdict.py new file mode 100644 index 0000000..02a1aaa --- /dev/null +++ b/test/test_anthropic_inference_hook_verdict.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.anthropic_inference_hook_verdict import AnthropicInferenceHookVerdict + +class TestAnthropicInferenceHookVerdict(unittest.TestCase): + """AnthropicInferenceHookVerdict unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnthropicInferenceHookVerdict: + """Test AnthropicInferenceHookVerdict + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnthropicInferenceHookVerdict` + """ + model = AnthropicInferenceHookVerdict() + if include_optional: + return AnthropicInferenceHookVerdict( + action = 'allow', + deny_reason = '', + reference_id = '' + ) + else: + return AnthropicInferenceHookVerdict( + action = 'allow', + ) + """ + + def testAnthropicInferenceHookVerdict(self): + """Test AnthropicInferenceHookVerdict""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_app_visibility_info.py b/test/test_app_visibility_info.py new file mode 100644 index 0000000..f17ee6b --- /dev/null +++ b/test/test_app_visibility_info.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.app_visibility_info import AppVisibilityInfo + +class TestAppVisibilityInfo(unittest.TestCase): + """AppVisibilityInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AppVisibilityInfo: + """Test AppVisibilityInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AppVisibilityInfo` + """ + model = AppVisibilityInfo() + if include_optional: + return AppVisibilityInfo( + visibility = 'GLOBAL', + visibility_group_ids = [ + '' + ], + import_visibility = 'GLOBAL' + ) + else: + return AppVisibilityInfo( + visibility = 'GLOBAL', + ) + """ + + def testAppVisibilityInfo(self): + """Test AppVisibilityInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign.py b/test/test_campaign.py new file mode 100644 index 0000000..19b85a1 --- /dev/null +++ b/test/test_campaign.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign import Campaign + +class TestCampaign(unittest.TestCase): + """Campaign unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Campaign: + """Test Campaign + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Campaign` + """ + model = Campaign() + if include_optional: + return Campaign( + campaign_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + name = 'Q3 Access Review', + status = 'ONGOING', + is_template = False, + created_at = '2026-07-01T00:00:00.000+00:00', + updated_at = '2026-07-01T00:00:00.000+00:00', + created_by_user_id = '32acc112-21ff-4669-91c2-21e27683eaa1', + configuration = {configuration_id=39a4d283-ca87-4a8a-bdbb-df212eca5fdb, created_at=2026-07-01T00:00:00.000+00:00, updated_at=2026-07-01T00:00:00.000+00:00, reviewer_assignment_policy=MANUALLY, allow_self_review=false, send_reviewer_assignment_notification=true, allow_reviewer_reassignment=false, end_date=2026-09-30T00:00:00.000+00:00, timezone=America/Los_Angeles, revoke_on=END, reminder_schedule=[7, 3, 1], reminder_include_manager=true, require_reason_on_denial=false, auto_stop_when_complete=false, hide_ai_suggestions=false, group_asset_visibility_policy=STRICT, is_template=false}, + started_at = '2026-07-02T00:00:00.000+00:00', + started_by_user_id = '32acc112-21ff-4669-91c2-21e27683eaa1', + stopped_at = '2026-07-10T00:00:00.000+00:00', + stopped_by_user_id = '32acc112-21ff-4669-91c2-21e27683eaa1', + ended_at = '2026-07-14T00:00:00.000+00:00', + ended_by_user_id = '32acc112-21ff-4669-91c2-21e27683eaa1' + ) + else: + return Campaign( + campaign_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + name = 'Q3 Access Review', + status = 'ONGOING', + is_template = False, + created_at = '2026-07-01T00:00:00.000+00:00', + updated_at = '2026-07-01T00:00:00.000+00:00', + created_by_user_id = '32acc112-21ff-4669-91c2-21e27683eaa1', + ) + """ + + def testCampaign(self): + """Test Campaign""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign_configuration.py b/test/test_campaign_configuration.py new file mode 100644 index 0000000..9bf28b4 --- /dev/null +++ b/test/test_campaign_configuration.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign_configuration import CampaignConfiguration + +class TestCampaignConfiguration(unittest.TestCase): + """CampaignConfiguration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CampaignConfiguration: + """Test CampaignConfiguration + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CampaignConfiguration` + """ + model = CampaignConfiguration() + if include_optional: + return CampaignConfiguration( + configuration_id = '39a4d283-ca87-4a8a-bdbb-df212eca5fdb', + created_at = '2026-07-01T00:00:00.000+00:00', + updated_at = '2026-07-01T00:00:00.000+00:00', + query = opal_security.models.opal_access_path_query_body.OpalAccessPathQueryBody( + principal_filter = opal_security.models.access_entity_filters.AccessEntityFilters( + entity_types = [ + 'RESOURCE' + ], + entity_item_types = [ + 'OPAL_ROLE' + ], + entity_name = opal_security.models.entity_name_filter.EntityNameFilter( + string_match_type = 'CONTAINS', + string = 'engineering', ), + entity_description = opal_security.models.entity_description_filter.EntityDescriptionFilter( + string = 'production', + not = True, ), + entity_tag = opal_security.models.entity_tag_filter.EntityTagFilter( + key = 'team', + value = 'platform', + connection_id = '', ), + entity_tag_key = opal_security.models.entity_tag_key_filter.EntityTagKeyFilter( + keys = [Critical], ), + hr_idp_status = opal_security.models.idp_status_filter.IdpStatusFilter( + statuses = [ + 'ACTIVE' + ], + not = True, ), + entity_admin_owner = opal_security.models.entity_admin_filter.EntityAdminFilter( + owner_ids = [ + '' + ], + not = True, ), + entity_ids = [ + '' + ], + imported_from_app = [ + '' + ], + role_remote_ids = [ + '' + ], + role_names = [ + '' + ], + all_of = [ + opal_security.models.access_entity_filters.AccessEntityFilters( + any_of = [ + + ], + not = opal_security.models.not.not(), ) + ], + any_of = [ + + ], + not = opal_security.models.not.not(), ), + entitlement_filter = , + principal_access_filters = null, + entitlement_access_filters = null, + access_level_remote_ids = [ + '' + ], + access_level_names = [ + '' + ], + edge_filter = opal_security.models.opal_access_path_edge_filter.OpalAccessPathEdgeFilter( + direct_only = True, + access_duration_type = 'EXPIRING_ONLY', ), ), + reviewer_assignment_policy = 'MANUALLY', + allow_self_review = False, + send_reviewer_assignment_notification = True, + allow_reviewer_reassignment = False, + allow_reviewers_to_reduce_expiration = False, + start_date = '2026-07-02T00:00:00.000+00:00', + end_date = '2026-09-30T00:00:00.000+00:00', + timezone = 'America/Los_Angeles', + revoke_on = 'END', + reminder_schedule = [7, 3, 1], + reminder_include_manager = True, + require_reason_on_denial = False, + auto_stop_when_complete = False, + hide_ai_suggestions = False, + custom_start_message = 'Please complete your reviews by Friday.', + group_asset_visibility_policy = 'STRICT', + is_template = False, + cron_expression = '0 9 1 * *', + next_scheduled_run = '2026-08-01T16:00:00.000+00:00', + last_scheduled_run = '2026-07-01T16:00:00.000+00:00', + recurring_duration_days = 14 + ) + else: + return CampaignConfiguration( + configuration_id = '39a4d283-ca87-4a8a-bdbb-df212eca5fdb', + created_at = '2026-07-01T00:00:00.000+00:00', + updated_at = '2026-07-01T00:00:00.000+00:00', + reviewer_assignment_policy = 'MANUALLY', + allow_self_review = False, + send_reviewer_assignment_notification = True, + allow_reviewer_reassignment = False, + allow_reviewers_to_reduce_expiration = False, + timezone = 'America/Los_Angeles', + revoke_on = 'END', + reminder_include_manager = True, + require_reason_on_denial = False, + auto_stop_when_complete = False, + hide_ai_suggestions = False, + group_asset_visibility_policy = 'STRICT', + is_template = False, + ) + """ + + def testCampaignConfiguration(self): + """Test CampaignConfiguration""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign_group_asset_visibility_policy_enum.py b/test/test_campaign_group_asset_visibility_policy_enum.py new file mode 100644 index 0000000..e7fe747 --- /dev/null +++ b/test/test_campaign_group_asset_visibility_policy_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign_group_asset_visibility_policy_enum import CampaignGroupAssetVisibilityPolicyEnum + +class TestCampaignGroupAssetVisibilityPolicyEnum(unittest.TestCase): + """CampaignGroupAssetVisibilityPolicyEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCampaignGroupAssetVisibilityPolicyEnum(self): + """Test CampaignGroupAssetVisibilityPolicyEnum""" + # inst = CampaignGroupAssetVisibilityPolicyEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign_item.py b/test/test_campaign_item.py new file mode 100644 index 0000000..af5a528 --- /dev/null +++ b/test/test_campaign_item.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign_item import CampaignItem + +class TestCampaignItem(unittest.TestCase): + """CampaignItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CampaignItem: + """Test CampaignItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CampaignItem` + """ + model = CampaignItem() + if include_optional: + return CampaignItem( + campaign_item_id = '', + campaign_id = '', + target_type = 'ROLE_ASSIGNMENT', + role_assignment_id = '', + status = 'PENDING', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_target_deleted = True, + principal_id = '', + principal_type = 'GROUP', + entity_id = '', + entity_type = 'GROUP', + access_level = {access_level_name=AdminRole, access_level_remote_id=arn:aws:iam::590304332660:role/AdministratorAccess}, + access_level_name = '', + reviews = [ + opal_security.models.campaign_item_review.CampaignItemReview( + campaign_item_review_id = '', + campaign_item_id = '', + reviewer_user_id = '', + assignment_source = 'MANUAL', + decision = null, + note = '', + updated_access_level_remote_id = '', + updated_duration_in_minutes = 56, + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + resolution_message = '', ) + ], + admin_override = opal_security.models.campaign_item_admin_override.CampaignItemAdminOverride( + actor_user_id = '', + decision = 'APPROVED', + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ) + else: + return CampaignItem( + campaign_item_id = '', + campaign_id = '', + target_type = 'ROLE_ASSIGNMENT', + role_assignment_id = '', + status = 'PENDING', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_target_deleted = True, + reviews = [ + opal_security.models.campaign_item_review.CampaignItemReview( + campaign_item_review_id = '', + campaign_item_id = '', + reviewer_user_id = '', + assignment_source = 'MANUAL', + decision = null, + note = '', + updated_access_level_remote_id = '', + updated_duration_in_minutes = 56, + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + resolution_message = '', ) + ], + ) + """ + + def testCampaignItem(self): + """Test CampaignItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign_item_admin_override.py b/test/test_campaign_item_admin_override.py new file mode 100644 index 0000000..dd5b36a --- /dev/null +++ b/test/test_campaign_item_admin_override.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign_item_admin_override import CampaignItemAdminOverride + +class TestCampaignItemAdminOverride(unittest.TestCase): + """CampaignItemAdminOverride unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CampaignItemAdminOverride: + """Test CampaignItemAdminOverride + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CampaignItemAdminOverride` + """ + model = CampaignItemAdminOverride() + if include_optional: + return CampaignItemAdminOverride( + actor_user_id = '', + decision = 'APPROVED', + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return CampaignItemAdminOverride( + actor_user_id = '', + decision = 'APPROVED', + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testCampaignItemAdminOverride(self): + """Test CampaignItemAdminOverride""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign_item_review.py b/test/test_campaign_item_review.py new file mode 100644 index 0000000..e202db1 --- /dev/null +++ b/test/test_campaign_item_review.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign_item_review import CampaignItemReview + +class TestCampaignItemReview(unittest.TestCase): + """CampaignItemReview unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CampaignItemReview: + """Test CampaignItemReview + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CampaignItemReview` + """ + model = CampaignItemReview() + if include_optional: + return CampaignItemReview( + campaign_item_review_id = '', + campaign_item_id = '', + reviewer_user_id = '', + assignment_source = 'MANUAL', + decision = 'APPROVED', + note = '', + updated_access_level_remote_id = '', + updated_duration_in_minutes = 56, + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + resolution_message = '' + ) + else: + return CampaignItemReview( + campaign_item_review_id = '', + campaign_item_id = '', + reviewer_user_id = '', + assignment_source = 'MANUAL', + ) + """ + + def testCampaignItemReview(self): + """Test CampaignItemReview""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign_item_review_decision_enum.py b/test/test_campaign_item_review_decision_enum.py new file mode 100644 index 0000000..513a9c5 --- /dev/null +++ b/test/test_campaign_item_review_decision_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign_item_review_decision_enum import CampaignItemReviewDecisionEnum + +class TestCampaignItemReviewDecisionEnum(unittest.TestCase): + """CampaignItemReviewDecisionEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCampaignItemReviewDecisionEnum(self): + """Test CampaignItemReviewDecisionEnum""" + # inst = CampaignItemReviewDecisionEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign_item_review_result.py b/test/test_campaign_item_review_result.py new file mode 100644 index 0000000..4e9bb50 --- /dev/null +++ b/test/test_campaign_item_review_result.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign_item_review_result import CampaignItemReviewResult + +class TestCampaignItemReviewResult(unittest.TestCase): + """CampaignItemReviewResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CampaignItemReviewResult: + """Test CampaignItemReviewResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CampaignItemReviewResult` + """ + model = CampaignItemReviewResult() + if include_optional: + return CampaignItemReviewResult( + campaign_item_review_id = '4b8f2c1a-9d3e-4f6a-8b1c-2e5d7a9f0c3b', + decision = 'APPROVED', + note = '', + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_access_level_remote_id = '', + reassigned_to_reviewer_ids = [ + '' + ] + ) + else: + return CampaignItemReviewResult( + campaign_item_review_id = '4b8f2c1a-9d3e-4f6a-8b1c-2e5d7a9f0c3b', + ) + """ + + def testCampaignItemReviewResult(self): + """Test CampaignItemReviewResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign_item_reviewer_assignment.py b/test/test_campaign_item_reviewer_assignment.py new file mode 100644 index 0000000..88527a7 --- /dev/null +++ b/test/test_campaign_item_reviewer_assignment.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign_item_reviewer_assignment import CampaignItemReviewerAssignment + +class TestCampaignItemReviewerAssignment(unittest.TestCase): + """CampaignItemReviewerAssignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CampaignItemReviewerAssignment: + """Test CampaignItemReviewerAssignment + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CampaignItemReviewerAssignment` + """ + model = CampaignItemReviewerAssignment() + if include_optional: + return CampaignItemReviewerAssignment( + campaign_item_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + reviewer_id = '32acc112-21ff-4669-91c2-21e27683eaa1', + assignment_source = 'MANUAL' + ) + else: + return CampaignItemReviewerAssignment( + campaign_item_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + ) + """ + + def testCampaignItemReviewerAssignment(self): + """Test CampaignItemReviewerAssignment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign_item_reviewer_assignment_source_enum.py b/test/test_campaign_item_reviewer_assignment_source_enum.py new file mode 100644 index 0000000..3d73ba3 --- /dev/null +++ b/test/test_campaign_item_reviewer_assignment_source_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign_item_reviewer_assignment_source_enum import CampaignItemReviewerAssignmentSourceEnum + +class TestCampaignItemReviewerAssignmentSourceEnum(unittest.TestCase): + """CampaignItemReviewerAssignmentSourceEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCampaignItemReviewerAssignmentSourceEnum(self): + """Test CampaignItemReviewerAssignmentSourceEnum""" + # inst = CampaignItemReviewerAssignmentSourceEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign_item_reviewer_source_removal.py b/test/test_campaign_item_reviewer_source_removal.py new file mode 100644 index 0000000..11bbdba --- /dev/null +++ b/test/test_campaign_item_reviewer_source_removal.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign_item_reviewer_source_removal import CampaignItemReviewerSourceRemoval + +class TestCampaignItemReviewerSourceRemoval(unittest.TestCase): + """CampaignItemReviewerSourceRemoval unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CampaignItemReviewerSourceRemoval: + """Test CampaignItemReviewerSourceRemoval + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CampaignItemReviewerSourceRemoval` + """ + model = CampaignItemReviewerSourceRemoval() + if include_optional: + return CampaignItemReviewerSourceRemoval( + campaign_item_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + assignment_source = 'MANUAL' + ) + else: + return CampaignItemReviewerSourceRemoval( + campaign_item_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + assignment_source = 'MANUAL', + ) + """ + + def testCampaignItemReviewerSourceRemoval(self): + """Test CampaignItemReviewerSourceRemoval""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign_item_status_enum.py b/test/test_campaign_item_status_enum.py new file mode 100644 index 0000000..ba750c4 --- /dev/null +++ b/test/test_campaign_item_status_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign_item_status_enum import CampaignItemStatusEnum + +class TestCampaignItemStatusEnum(unittest.TestCase): + """CampaignItemStatusEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCampaignItemStatusEnum(self): + """Test CampaignItemStatusEnum""" + # inst = CampaignItemStatusEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign_item_target_type_enum.py b/test/test_campaign_item_target_type_enum.py new file mode 100644 index 0000000..8bc15a8 --- /dev/null +++ b/test/test_campaign_item_target_type_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign_item_target_type_enum import CampaignItemTargetTypeEnum + +class TestCampaignItemTargetTypeEnum(unittest.TestCase): + """CampaignItemTargetTypeEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCampaignItemTargetTypeEnum(self): + """Test CampaignItemTargetTypeEnum""" + # inst = CampaignItemTargetTypeEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign_item_unassigned_preset_message.py b/test/test_campaign_item_unassigned_preset_message.py new file mode 100644 index 0000000..465f029 --- /dev/null +++ b/test/test_campaign_item_unassigned_preset_message.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign_item_unassigned_preset_message import CampaignItemUnassignedPresetMessage + +class TestCampaignItemUnassignedPresetMessage(unittest.TestCase): + """CampaignItemUnassignedPresetMessage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CampaignItemUnassignedPresetMessage: + """Test CampaignItemUnassignedPresetMessage + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CampaignItemUnassignedPresetMessage` + """ + model = CampaignItemUnassignedPresetMessage() + if include_optional: + return CampaignItemUnassignedPresetMessage( + campaign_item_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + assignment_source = 'MANUAL', + message = '' + ) + else: + return CampaignItemUnassignedPresetMessage( + campaign_item_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + assignment_source = 'MANUAL', + message = '', + ) + """ + + def testCampaignItemUnassignedPresetMessage(self): + """Test CampaignItemUnassignedPresetMessage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign_revoke_on_enum.py b/test/test_campaign_revoke_on_enum.py new file mode 100644 index 0000000..cdde5a0 --- /dev/null +++ b/test/test_campaign_revoke_on_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign_revoke_on_enum import CampaignRevokeOnEnum + +class TestCampaignRevokeOnEnum(unittest.TestCase): + """CampaignRevokeOnEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCampaignRevokeOnEnum(self): + """Test CampaignRevokeOnEnum""" + # inst = CampaignRevokeOnEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaign_status_enum.py b/test/test_campaign_status_enum.py new file mode 100644 index 0000000..d2b1c42 --- /dev/null +++ b/test/test_campaign_status_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.campaign_status_enum import CampaignStatusEnum + +class TestCampaignStatusEnum(unittest.TestCase): + """CampaignStatusEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCampaignStatusEnum(self): + """Test CampaignStatusEnum""" + # inst = CampaignStatusEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_campaigns_api.py b/test/test_campaigns_api.py new file mode 100644 index 0000000..ae56d2f --- /dev/null +++ b/test/test_campaigns_api.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.api.campaigns_api import CampaignsApi + + +class TestCampaignsApi(unittest.TestCase): + """CampaignsApi unit test stubs""" + + def setUp(self) -> None: + self.api = CampaignsApi() + + def tearDown(self) -> None: + pass + + def test_create_campaign(self) -> None: + """Test case for create_campaign + + """ + pass + + def test_end_campaign(self) -> None: + """Test case for end_campaign + + End campaign + """ + pass + + def test_get_campaign(self) -> None: + """Test case for get_campaign + + Get campaign by ID + """ + pass + + def test_get_campaign_items(self) -> None: + """Test case for get_campaign_items + + List campaign items + """ + pass + + def test_get_campaign_viewer_items(self) -> None: + """Test case for get_campaign_viewer_items + + List viewer campaign items + """ + pass + + def test_get_campaigns(self) -> None: + """Test case for get_campaigns + + """ + pass + + def test_review_campaign_items(self) -> None: + """Test case for review_campaign_items + + Submit campaign item review decisions + """ + pass + + def test_start_campaign(self) -> None: + """Test case for start_campaign + + Start campaign + """ + pass + + def test_stop_campaign(self) -> None: + """Test case for stop_campaign + + Stop campaign + """ + pass + + def test_update_campaign(self) -> None: + """Test case for update_campaign + + Update campaign + """ + pass + + def test_update_campaign_item_reviewers(self) -> None: + """Test case for update_campaign_item_reviewers + + Update campaign item reviewers + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cancel_request_request.py b/test/test_cancel_request_request.py new file mode 100644 index 0000000..09446b5 --- /dev/null +++ b/test/test_cancel_request_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.cancel_request_request import CancelRequestRequest + +class TestCancelRequestRequest(unittest.TestCase): + """CancelRequestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CancelRequestRequest: + """Test CancelRequestRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CancelRequestRequest` + """ + model = CancelRequestRequest() + if include_optional: + return CancelRequestRequest( + acting_user_id = '' + ) + else: + return CancelRequestRequest( + ) + """ + + def testCancelRequestRequest(self): + """Test CancelRequestRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_app_info.py b/test/test_create_app_info.py new file mode 100644 index 0000000..18d82b0 --- /dev/null +++ b/test/test_create_app_info.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.create_app_info import CreateAppInfo + +class TestCreateAppInfo(unittest.TestCase): + """CreateAppInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateAppInfo: + """Test CreateAppInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateAppInfo` + """ + model = CreateAppInfo() + if include_optional: + return CreateAppInfo( + name = 'My Push-only App', + description = 'Bookkeeping app for internal tools.', + admin_owner_id = '7c86c85d-0651-43e2-a748-d69d658418e8', + app_type = 'OKTA_DIRECTORY', + visibility = 'GLOBAL', + visibility_group_ids = [ + '' + ], + import_visibility = 'GLOBAL', + custom_connector = opal_security.models.create_custom_connector_info.CreateCustomConnectorInfo( + identifier = 'my-connector', + base_url = 'https://my-connector.example.com', + signing_secret = '', + tls_mode = True, + tls_ca_cert_content = '', + supports_groups = True, + supports_nested_resources = True, + supports_nested_groups = True, + supports_event_ingestion = True, + supports_idp = True, + idp_protocol = 'OPAL', ) + ) + else: + return CreateAppInfo( + name = 'My Push-only App', + description = 'Bookkeeping app for internal tools.', + admin_owner_id = '7c86c85d-0651-43e2-a748-d69d658418e8', + app_type = 'OKTA_DIRECTORY', + ) + """ + + def testCreateAppInfo(self): + """Test CreateAppInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_campaign_configuration_info.py b/test/test_create_campaign_configuration_info.py new file mode 100644 index 0000000..828ac85 --- /dev/null +++ b/test/test_create_campaign_configuration_info.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.create_campaign_configuration_info import CreateCampaignConfigurationInfo + +class TestCreateCampaignConfigurationInfo(unittest.TestCase): + """CreateCampaignConfigurationInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateCampaignConfigurationInfo: + """Test CreateCampaignConfigurationInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateCampaignConfigurationInfo` + """ + model = CreateCampaignConfigurationInfo() + if include_optional: + return CreateCampaignConfigurationInfo( + query = opal_security.models.opal_access_path_query_body.OpalAccessPathQueryBody( + principal_filter = opal_security.models.access_entity_filters.AccessEntityFilters( + entity_types = [ + 'RESOURCE' + ], + entity_item_types = [ + 'OPAL_ROLE' + ], + entity_name = opal_security.models.entity_name_filter.EntityNameFilter( + string_match_type = 'CONTAINS', + string = 'engineering', ), + entity_description = opal_security.models.entity_description_filter.EntityDescriptionFilter( + string = 'production', + not = True, ), + entity_tag = opal_security.models.entity_tag_filter.EntityTagFilter( + key = 'team', + value = 'platform', + connection_id = '', ), + entity_tag_key = opal_security.models.entity_tag_key_filter.EntityTagKeyFilter( + keys = [Critical], ), + hr_idp_status = opal_security.models.idp_status_filter.IdpStatusFilter( + statuses = [ + 'ACTIVE' + ], + not = True, ), + entity_admin_owner = opal_security.models.entity_admin_filter.EntityAdminFilter( + owner_ids = [ + '' + ], + not = True, ), + entity_ids = [ + '' + ], + imported_from_app = [ + '' + ], + role_remote_ids = [ + '' + ], + role_names = [ + '' + ], + all_of = [ + opal_security.models.access_entity_filters.AccessEntityFilters( + any_of = [ + + ], + not = opal_security.models.not.not(), ) + ], + any_of = [ + + ], + not = opal_security.models.not.not(), ), + entitlement_filter = , + principal_access_filters = null, + entitlement_access_filters = null, + access_level_remote_ids = [ + '' + ], + access_level_names = [ + '' + ], + edge_filter = opal_security.models.opal_access_path_edge_filter.OpalAccessPathEdgeFilter( + direct_only = True, + access_duration_type = 'EXPIRING_ONLY', ), ), + reviewer_assignment_policy = 'MANUALLY', + allow_self_review = False, + send_reviewer_assignment_notification = True, + allow_reviewer_reassignment = False, + allow_reviewers_to_reduce_expiration = False, + start_date = '2026-07-02T00:00:00.000+00:00', + end_date = '2026-09-30T00:00:00.000+00:00', + timezone = 'America/Los_Angeles', + revoke_on = 'END', + reminder_schedule = [7, 3, 1], + reminder_include_manager = True, + require_reason_on_denial = False, + auto_stop_when_complete = False, + hide_ai_suggestions = False, + custom_start_message = 'Please complete your reviews by Friday.', + group_asset_visibility_policy = 'STRICT', + is_template = False, + cron_expression = '0 9 1 * *', + recurring_duration_days = 14, + excluded_role_assignment_ids = [ + '' + ] + ) + else: + return CreateCampaignConfigurationInfo( + query = opal_security.models.opal_access_path_query_body.OpalAccessPathQueryBody( + principal_filter = opal_security.models.access_entity_filters.AccessEntityFilters( + entity_types = [ + 'RESOURCE' + ], + entity_item_types = [ + 'OPAL_ROLE' + ], + entity_name = opal_security.models.entity_name_filter.EntityNameFilter( + string_match_type = 'CONTAINS', + string = 'engineering', ), + entity_description = opal_security.models.entity_description_filter.EntityDescriptionFilter( + string = 'production', + not = True, ), + entity_tag = opal_security.models.entity_tag_filter.EntityTagFilter( + key = 'team', + value = 'platform', + connection_id = '', ), + entity_tag_key = opal_security.models.entity_tag_key_filter.EntityTagKeyFilter( + keys = [Critical], ), + hr_idp_status = opal_security.models.idp_status_filter.IdpStatusFilter( + statuses = [ + 'ACTIVE' + ], + not = True, ), + entity_admin_owner = opal_security.models.entity_admin_filter.EntityAdminFilter( + owner_ids = [ + '' + ], + not = True, ), + entity_ids = [ + '' + ], + imported_from_app = [ + '' + ], + role_remote_ids = [ + '' + ], + role_names = [ + '' + ], + all_of = [ + opal_security.models.access_entity_filters.AccessEntityFilters( + any_of = [ + + ], + not = opal_security.models.not.not(), ) + ], + any_of = [ + + ], + not = opal_security.models.not.not(), ), + entitlement_filter = , + principal_access_filters = null, + entitlement_access_filters = null, + access_level_remote_ids = [ + '' + ], + access_level_names = [ + '' + ], + edge_filter = opal_security.models.opal_access_path_edge_filter.OpalAccessPathEdgeFilter( + direct_only = True, + access_duration_type = 'EXPIRING_ONLY', ), ), + ) + """ + + def testCreateCampaignConfigurationInfo(self): + """Test CreateCampaignConfigurationInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_campaign_info.py b/test/test_create_campaign_info.py new file mode 100644 index 0000000..661b7ca --- /dev/null +++ b/test/test_create_campaign_info.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.create_campaign_info import CreateCampaignInfo + +class TestCreateCampaignInfo(unittest.TestCase): + """CreateCampaignInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateCampaignInfo: + """Test CreateCampaignInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateCampaignInfo` + """ + model = CreateCampaignInfo() + if include_optional: + return CreateCampaignInfo( + name = 'Q3 Access Review', + configuration = {query={principalFilter={entityTypes=[USER]}}, end_date=2026-09-30T00:00:00.000+00:00, timezone=America/Los_Angeles, allow_self_review=false} + ) + else: + return CreateCampaignInfo( + name = 'Q3 Access Review', + configuration = {query={principalFilter={entityTypes=[USER]}}, end_date=2026-09-30T00:00:00.000+00:00, timezone=America/Los_Angeles, allow_self_review=false}, + ) + """ + + def testCreateCampaignInfo(self): + """Test CreateCampaignInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_custom_connector_info.py b/test/test_create_custom_connector_info.py new file mode 100644 index 0000000..7d27b79 --- /dev/null +++ b/test/test_create_custom_connector_info.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.create_custom_connector_info import CreateCustomConnectorInfo + +class TestCreateCustomConnectorInfo(unittest.TestCase): + """CreateCustomConnectorInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateCustomConnectorInfo: + """Test CreateCustomConnectorInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateCustomConnectorInfo` + """ + model = CreateCustomConnectorInfo() + if include_optional: + return CreateCustomConnectorInfo( + identifier = 'my-connector', + base_url = 'https://my-connector.example.com', + signing_secret = '', + tls_mode = True, + tls_ca_cert_content = '', + supports_groups = True, + supports_nested_resources = True, + supports_nested_groups = True, + supports_event_ingestion = True, + supports_idp = True, + idp_protocol = 'OPAL' + ) + else: + return CreateCustomConnectorInfo( + identifier = 'my-connector', + base_url = 'https://my-connector.example.com', + signing_secret = '', + ) + """ + + def testCreateCustomConnectorInfo(self): + """Test CreateCustomConnectorInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_opal_script_info.py b/test/test_create_opal_script_info.py new file mode 100644 index 0000000..9f50887 --- /dev/null +++ b/test/test_create_opal_script_info.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.create_opal_script_info import CreateOpalScriptInfo + +class TestCreateOpalScriptInfo(unittest.TestCase): + """CreateOpalScriptInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateOpalScriptInfo: + """Test CreateOpalScriptInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateOpalScriptInfo` + """ + model = CreateOpalScriptInfo() + if include_optional: + return CreateOpalScriptInfo( + name = 'MFA check', + script_type = 'REQUEST_REVIEW', + script = '', + owner_id = '7c86c85d-0651-43e2-a748-d69d658418e8' + ) + else: + return CreateOpalScriptInfo( + name = 'MFA check', + script_type = 'REQUEST_REVIEW', + script = '', + ) + """ + + def testCreateOpalScriptInfo(self): + """Test CreateOpalScriptInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_paladin_context_source_info.py b/test/test_create_paladin_context_source_info.py new file mode 100644 index 0000000..56a81bf --- /dev/null +++ b/test/test_create_paladin_context_source_info.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.create_paladin_context_source_info import CreatePaladinContextSourceInfo + +class TestCreatePaladinContextSourceInfo(unittest.TestCase): + """CreatePaladinContextSourceInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreatePaladinContextSourceInfo: + """Test CreatePaladinContextSourceInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreatePaladinContextSourceInfo` + """ + model = CreatePaladinContextSourceInfo() + if include_optional: + return CreatePaladinContextSourceInfo( + source_kind = 'SLACK_CHANNEL', + third_party_provider = 'SLACK', + remote_id = '', + name = '', + url = '' + ) + else: + return CreatePaladinContextSourceInfo( + source_kind = 'SLACK_CHANNEL', + third_party_provider = 'SLACK', + remote_id = '', + ) + """ + + def testCreatePaladinContextSourceInfo(self): + """Test CreatePaladinContextSourceInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_paladin_info.py b/test/test_create_paladin_info.py new file mode 100644 index 0000000..44bcb8a --- /dev/null +++ b/test/test_create_paladin_info.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.create_paladin_info import CreatePaladinInfo + +class TestCreatePaladinInfo(unittest.TestCase): + """CreatePaladinInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreatePaladinInfo: + """Test CreatePaladinInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreatePaladinInfo` + """ + model = CreatePaladinInfo() + if include_optional: + return CreatePaladinInfo( + name = 'paladin-agent-1', + owner_id = '7c86c85d-0651-43e2-a748-d69d658418e8', + monitor_mode = True, + admin_view_only = True, + enabled_connectors = [ + 'NOTION' + ], + instructions = '' + ) + else: + return CreatePaladinInfo( + name = 'paladin-agent-1', + owner_id = '7c86c85d-0651-43e2-a748-d69d658418e8', + ) + """ + + def testCreatePaladinInfo(self): + """Test CreatePaladinInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_request_template_info.py b/test/test_create_request_template_info.py new file mode 100644 index 0000000..b5eeec3 --- /dev/null +++ b/test/test_create_request_template_info.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.create_request_template_info import CreateRequestTemplateInfo + +class TestCreateRequestTemplateInfo(unittest.TestCase): + """CreateRequestTemplateInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateRequestTemplateInfo: + """Test CreateRequestTemplateInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateRequestTemplateInfo` + """ + model = CreateRequestTemplateInfo() + if include_optional: + return CreateRequestTemplateInfo( + name = 'Production access questions', + custom_fields = [ + opal_security.models.request_template_custom_field_input.RequestTemplateCustomFieldInput( + name = 'Why do you need this access?', + description = '', + type = 'SHORT_TEXT', + required = True, + metadata = opal_security.models.request_template_custom_field_metadata.RequestTemplateCustomFieldMetadata( + callout_data = opal_security.models.request_template_custom_field_callout_metadata.RequestTemplateCustomFieldCalloutMetadata( + severity = 'WARNING', + text = 'This role grants access to production customer data.', ), + multi_choice_data = opal_security.models.request_template_custom_field_multi_choice_metadata.RequestTemplateCustomFieldMultiChoiceMetadata( + options = [Incident response, Scheduled maintenance], ), ), ) + ] + ) + else: + return CreateRequestTemplateInfo( + name = 'Production access questions', + ) + """ + + def testCreateRequestTemplateInfo(self): + """Test CreateRequestTemplateInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_resource_custom_access_level_info.py b/test/test_create_resource_custom_access_level_info.py new file mode 100644 index 0000000..c02831d --- /dev/null +++ b/test/test_create_resource_custom_access_level_info.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.create_resource_custom_access_level_info import CreateResourceCustomAccessLevelInfo + +class TestCreateResourceCustomAccessLevelInfo(unittest.TestCase): + """CreateResourceCustomAccessLevelInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateResourceCustomAccessLevelInfo: + """Test CreateResourceCustomAccessLevelInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateResourceCustomAccessLevelInfo` + """ + model = CreateResourceCustomAccessLevelInfo() + if include_optional: + return CreateResourceCustomAccessLevelInfo( + access_level = {access_level_name=AdminRole, access_level_remote_id=arn:aws:iam::590304332660:role/AdministratorAccess}, + policy = '', + requestable_by_default = True, + stackable_sensitivity_index = 56 + ) + else: + return CreateResourceCustomAccessLevelInfo( + access_level = {access_level_name=AdminRole, access_level_remote_id=arn:aws:iam::590304332660:role/AdministratorAccess}, + ) + """ + + def testCreateResourceCustomAccessLevelInfo(self): + """Test CreateResourceCustomAccessLevelInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_service_user_request.py b/test/test_create_service_user_request.py new file mode 100644 index 0000000..97477dd --- /dev/null +++ b/test/test_create_service_user_request.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.create_service_user_request import CreateServiceUserRequest + +class TestCreateServiceUserRequest(unittest.TestCase): + """CreateServiceUserRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateServiceUserRequest: + """Test CreateServiceUserRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateServiceUserRequest` + """ + model = CreateServiceUserRequest() + if include_optional: + return CreateServiceUserRequest( + name = 'paladin-prod', + owner_id = '7c86c85d-0651-43e2-a748-d69d658418e8' + ) + else: + return CreateServiceUserRequest( + name = 'paladin-prod', + owner_id = '7c86c85d-0651-43e2-a748-d69d658418e8', + ) + """ + + def testCreateServiceUserRequest(self): + """Test CreateServiceUserRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_token_info.py b/test/test_create_token_info.py new file mode 100644 index 0000000..ac07237 --- /dev/null +++ b/test/test_create_token_info.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.create_token_info import CreateTokenInfo + +class TestCreateTokenInfo(unittest.TestCase): + """CreateTokenInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateTokenInfo: + """Test CreateTokenInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateTokenInfo` + """ + model = CreateTokenInfo() + if include_optional: + return CreateTokenInfo( + token_label = 'My API Token', + access_level = 'READ_ONLY', + user_id = 'd4a7d928-783e-4599-8ec6-088d635a5bcc', + expires_at = '2023-01-23T04:56:07.000+00:00' + ) + else: + return CreateTokenInfo( + token_label = 'My API Token', + access_level = 'READ_ONLY', + ) + """ + + def testCreateTokenInfo(self): + """Test CreateTokenInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_token_response.py b/test/test_create_token_response.py new file mode 100644 index 0000000..182e5ca --- /dev/null +++ b/test/test_create_token_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.create_token_response import CreateTokenResponse + +class TestCreateTokenResponse(unittest.TestCase): + """CreateTokenResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateTokenResponse: + """Test CreateTokenResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateTokenResponse` + """ + model = CreateTokenResponse() + if include_optional: + return CreateTokenResponse( + token = {token_id=f454d283-ca87-4a8a-bdbb-df212eca5353, created_at=2022-01-23T04:56:07.000+00:00, token_preview=ab123, token_label=My API Token, creator_user_id=d4a7d928-783e-4599-8ec6-088d635a5bcc, user_id=d4a7d928-783e-4599-8ec6-088d635a5bcc, access_level=READ_ONLY}, + signed_token = 'opal_pat_abc123...' + ) + else: + return CreateTokenResponse( + token = {token_id=f454d283-ca87-4a8a-bdbb-df212eca5353, created_at=2022-01-23T04:56:07.000+00:00, token_preview=ab123, token_label=My API Token, creator_user_id=d4a7d928-783e-4599-8ec6-088d635a5bcc, user_id=d4a7d928-783e-4599-8ec6-088d635a5bcc, access_level=READ_ONLY}, + signed_token = 'opal_pat_abc123...', + ) + """ + + def testCreateTokenResponse(self): + """Test CreateTokenResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_custom_connector_app_config.py b/test/test_custom_connector_app_config.py new file mode 100644 index 0000000..69f9653 --- /dev/null +++ b/test/test_custom_connector_app_config.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.custom_connector_app_config import CustomConnectorAppConfig + +class TestCustomConnectorAppConfig(unittest.TestCase): + """CustomConnectorAppConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CustomConnectorAppConfig: + """Test CustomConnectorAppConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CustomConnectorAppConfig` + """ + model = CustomConnectorAppConfig() + if include_optional: + return CustomConnectorAppConfig( + identifier = 'my-connector', + base_url = 'https://my-connector.example.com', + tls_mode = True, + tls_ca_cert_content = '', + supports_groups = True, + supports_nested_resources = True, + supports_nested_groups = True, + supports_event_ingestion = True, + supports_idp = True, + idp_protocol = 'OPAL' + ) + else: + return CustomConnectorAppConfig( + identifier = 'my-connector', + base_url = 'https://my-connector.example.com', + tls_mode = True, + supports_groups = True, + supports_nested_resources = True, + supports_nested_groups = True, + supports_event_ingestion = True, + supports_idp = True, + idp_protocol = 'OPAL', + ) + """ + + def testCustomConnectorAppConfig(self): + """Test CustomConnectorAppConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_custom_connector_idp_protocol_enum.py b/test/test_custom_connector_idp_protocol_enum.py new file mode 100644 index 0000000..ea8f027 --- /dev/null +++ b/test/test_custom_connector_idp_protocol_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.custom_connector_idp_protocol_enum import CustomConnectorIdpProtocolEnum + +class TestCustomConnectorIdpProtocolEnum(unittest.TestCase): + """CustomConnectorIdpProtocolEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCustomConnectorIdpProtocolEnum(self): + """Test CustomConnectorIdpProtocolEnum""" + # inst = CustomConnectorIdpProtocolEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_entity_admin_filter.py b/test/test_entity_admin_filter.py new file mode 100644 index 0000000..cb116f0 --- /dev/null +++ b/test/test_entity_admin_filter.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.entity_admin_filter import EntityAdminFilter + +class TestEntityAdminFilter(unittest.TestCase): + """EntityAdminFilter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EntityAdminFilter: + """Test EntityAdminFilter + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EntityAdminFilter` + """ + model = EntityAdminFilter() + if include_optional: + return EntityAdminFilter( + owner_ids = [ + '' + ], + var_not = True + ) + else: + return EntityAdminFilter( + owner_ids = [ + '' + ], + ) + """ + + def testEntityAdminFilter(self): + """Test EntityAdminFilter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_entity_description_filter.py b/test/test_entity_description_filter.py new file mode 100644 index 0000000..c35658c --- /dev/null +++ b/test/test_entity_description_filter.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.entity_description_filter import EntityDescriptionFilter + +class TestEntityDescriptionFilter(unittest.TestCase): + """EntityDescriptionFilter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EntityDescriptionFilter: + """Test EntityDescriptionFilter + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EntityDescriptionFilter` + """ + model = EntityDescriptionFilter() + if include_optional: + return EntityDescriptionFilter( + string = 'production', + var_not = True + ) + else: + return EntityDescriptionFilter( + string = 'production', + ) + """ + + def testEntityDescriptionFilter(self): + """Test EntityDescriptionFilter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_entity_tag_key_filter.py b/test/test_entity_tag_key_filter.py new file mode 100644 index 0000000..97c7bf3 --- /dev/null +++ b/test/test_entity_tag_key_filter.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.entity_tag_key_filter import EntityTagKeyFilter + +class TestEntityTagKeyFilter(unittest.TestCase): + """EntityTagKeyFilter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EntityTagKeyFilter: + """Test EntityTagKeyFilter + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EntityTagKeyFilter` + """ + model = EntityTagKeyFilter() + if include_optional: + return EntityTagKeyFilter( + keys = [Critical] + ) + else: + return EntityTagKeyFilter( + keys = [Critical], + ) + """ + + def testEntityTagKeyFilter(self): + """Test EntityTagKeyFilter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_escalate_request200_response.py b/test/test_escalate_request200_response.py new file mode 100644 index 0000000..79f9ca5 --- /dev/null +++ b/test/test_escalate_request200_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.escalate_request200_response import EscalateRequest200Response + +class TestEscalateRequest200Response(unittest.TestCase): + """EscalateRequest200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EscalateRequest200Response: + """Test EscalateRequest200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EscalateRequest200Response` + """ + model = EscalateRequest200Response() + if include_optional: + return EscalateRequest200Response( + success = True + ) + else: + return EscalateRequest200Response( + success = True, + ) + """ + + def testEscalateRequest200Response(self): + """Test EscalateRequest200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_access_level_list.py b/test/test_group_access_level_list.py new file mode 100644 index 0000000..a48a840 --- /dev/null +++ b/test/test_group_access_level_list.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_access_level_list import GroupAccessLevelList + +class TestGroupAccessLevelList(unittest.TestCase): + """GroupAccessLevelList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupAccessLevelList: + """Test GroupAccessLevelList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupAccessLevelList` + """ + model = GroupAccessLevelList() + if include_optional: + return GroupAccessLevelList( + results = [ + {access_level_name=Developer, access_level_remote_id=20} + ] + ) + else: + return GroupAccessLevelList( + ) + """ + + def testGroupAccessLevelList(self): + """Test GroupAccessLevelList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_configuration_template.py b/test/test_group_configuration_template.py new file mode 100644 index 0000000..40c29dd --- /dev/null +++ b/test/test_group_configuration_template.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_configuration_template import GroupConfigurationTemplate + +class TestGroupConfigurationTemplate(unittest.TestCase): + """GroupConfigurationTemplate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupConfigurationTemplate: + """Test GroupConfigurationTemplate + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupConfigurationTemplate` + """ + model = GroupConfigurationTemplate() + if include_optional: + return GroupConfigurationTemplate( + configuration_template_id = '06851574-e50d-40ca-8c78-f72ae6ab4304' + ) + else: + return GroupConfigurationTemplate( + configuration_template_id = '06851574-e50d-40ca-8c78-f72ae6ab4304', + ) + """ + + def testGroupConfigurationTemplate(self): + """Test GroupConfigurationTemplate""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_member_group.py b/test/test_group_member_group.py new file mode 100644 index 0000000..c8cb7a7 --- /dev/null +++ b/test/test_group_member_group.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_member_group import GroupMemberGroup + +class TestGroupMemberGroup(unittest.TestCase): + """GroupMemberGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupMemberGroup: + """Test GroupMemberGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupMemberGroup` + """ + model = GroupMemberGroup() + if include_optional: + return GroupMemberGroup( + member_group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353' + ) + else: + return GroupMemberGroup( + member_group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + ) + """ + + def testGroupMemberGroup(self): + """Test GroupMemberGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_member_group_list.py b/test/test_group_member_group_list.py new file mode 100644 index 0000000..1b11ca3 --- /dev/null +++ b/test/test_group_member_group_list.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_member_group_list import GroupMemberGroupList + +class TestGroupMemberGroupList(unittest.TestCase): + """GroupMemberGroupList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupMemberGroupList: + """Test GroupMemberGroupList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupMemberGroupList` + """ + model = GroupMemberGroupList() + if include_optional: + return GroupMemberGroupList( + member_groups = [ + {member_group_id=f454d283-ca87-4a8a-bdbb-df212eca5353} + ] + ) + else: + return GroupMemberGroupList( + member_groups = [ + {member_group_id=f454d283-ca87-4a8a-bdbb-df212eca5353} + ], + ) + """ + + def testGroupMemberGroupList(self): + """Test GroupMemberGroupList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_activecampaign_group.py b/test/test_group_remote_info_activecampaign_group.py new file mode 100644 index 0000000..4601e32 --- /dev/null +++ b/test/test_group_remote_info_activecampaign_group.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_activecampaign_group import GroupRemoteInfoActivecampaignGroup + +class TestGroupRemoteInfoActivecampaignGroup(unittest.TestCase): + """GroupRemoteInfoActivecampaignGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoActivecampaignGroup: + """Test GroupRemoteInfoActivecampaignGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoActivecampaignGroup` + """ + model = GroupRemoteInfoActivecampaignGroup() + if include_optional: + return GroupRemoteInfoActivecampaignGroup( + group_id = '' + ) + else: + return GroupRemoteInfoActivecampaignGroup( + group_id = '', + ) + """ + + def testGroupRemoteInfoActivecampaignGroup(self): + """Test GroupRemoteInfoActivecampaignGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_aha_team.py b/test/test_group_remote_info_aha_team.py new file mode 100644 index 0000000..b2ab0c2 --- /dev/null +++ b/test/test_group_remote_info_aha_team.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_aha_team import GroupRemoteInfoAhaTeam + +class TestGroupRemoteInfoAhaTeam(unittest.TestCase): + """GroupRemoteInfoAhaTeam unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoAhaTeam: + """Test GroupRemoteInfoAhaTeam + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoAhaTeam` + """ + model = GroupRemoteInfoAhaTeam() + if include_optional: + return GroupRemoteInfoAhaTeam( + group_id = '' + ) + else: + return GroupRemoteInfoAhaTeam( + group_id = '', + ) + """ + + def testGroupRemoteInfoAhaTeam(self): + """Test GroupRemoteInfoAhaTeam""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_asana_team.py b/test/test_group_remote_info_asana_team.py new file mode 100644 index 0000000..6385449 --- /dev/null +++ b/test/test_group_remote_info_asana_team.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_asana_team import GroupRemoteInfoAsanaTeam + +class TestGroupRemoteInfoAsanaTeam(unittest.TestCase): + """GroupRemoteInfoAsanaTeam unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoAsanaTeam: + """Test GroupRemoteInfoAsanaTeam + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoAsanaTeam` + """ + model = GroupRemoteInfoAsanaTeam() + if include_optional: + return GroupRemoteInfoAsanaTeam( + team_gid = '', + workspace_gid = '' + ) + else: + return GroupRemoteInfoAsanaTeam( + team_gid = '', + ) + """ + + def testGroupRemoteInfoAsanaTeam(self): + """Test GroupRemoteInfoAsanaTeam""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_axiom_group.py b/test/test_group_remote_info_axiom_group.py new file mode 100644 index 0000000..ae83d8b --- /dev/null +++ b/test/test_group_remote_info_axiom_group.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_axiom_group import GroupRemoteInfoAxiomGroup + +class TestGroupRemoteInfoAxiomGroup(unittest.TestCase): + """GroupRemoteInfoAxiomGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoAxiomGroup: + """Test GroupRemoteInfoAxiomGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoAxiomGroup` + """ + model = GroupRemoteInfoAxiomGroup() + if include_optional: + return GroupRemoteInfoAxiomGroup( + group_id = 'grp_0123456789abcdef' + ) + else: + return GroupRemoteInfoAxiomGroup( + group_id = 'grp_0123456789abcdef', + ) + """ + + def testGroupRemoteInfoAxiomGroup(self): + """Test GroupRemoteInfoAxiomGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_bitwarden_group.py b/test/test_group_remote_info_bitwarden_group.py new file mode 100644 index 0000000..f4ddfe2 --- /dev/null +++ b/test/test_group_remote_info_bitwarden_group.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_bitwarden_group import GroupRemoteInfoBitwardenGroup + +class TestGroupRemoteInfoBitwardenGroup(unittest.TestCase): + """GroupRemoteInfoBitwardenGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoBitwardenGroup: + """Test GroupRemoteInfoBitwardenGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoBitwardenGroup` + """ + model = GroupRemoteInfoBitwardenGroup() + if include_optional: + return GroupRemoteInfoBitwardenGroup( + group_id = '' + ) + else: + return GroupRemoteInfoBitwardenGroup( + group_id = '', + ) + """ + + def testGroupRemoteInfoBitwardenGroup(self): + """Test GroupRemoteInfoBitwardenGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_box_group.py b/test/test_group_remote_info_box_group.py new file mode 100644 index 0000000..94b845d --- /dev/null +++ b/test/test_group_remote_info_box_group.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_box_group import GroupRemoteInfoBoxGroup + +class TestGroupRemoteInfoBoxGroup(unittest.TestCase): + """GroupRemoteInfoBoxGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoBoxGroup: + """Test GroupRemoteInfoBoxGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoBoxGroup` + """ + model = GroupRemoteInfoBoxGroup() + if include_optional: + return GroupRemoteInfoBoxGroup( + group_id = '' + ) + else: + return GroupRemoteInfoBoxGroup( + group_id = '', + ) + """ + + def testGroupRemoteInfoBoxGroup(self): + """Test GroupRemoteInfoBoxGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_calendly_group.py b/test/test_group_remote_info_calendly_group.py new file mode 100644 index 0000000..b2e6369 --- /dev/null +++ b/test/test_group_remote_info_calendly_group.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_calendly_group import GroupRemoteInfoCalendlyGroup + +class TestGroupRemoteInfoCalendlyGroup(unittest.TestCase): + """GroupRemoteInfoCalendlyGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoCalendlyGroup: + """Test GroupRemoteInfoCalendlyGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoCalendlyGroup` + """ + model = GroupRemoteInfoCalendlyGroup() + if include_optional: + return GroupRemoteInfoCalendlyGroup( + group_id = '' + ) + else: + return GroupRemoteInfoCalendlyGroup( + group_id = '', + ) + """ + + def testGroupRemoteInfoCalendlyGroup(self): + """Test GroupRemoteInfoCalendlyGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_confluence_group.py b/test/test_group_remote_info_confluence_group.py new file mode 100644 index 0000000..854c469 --- /dev/null +++ b/test/test_group_remote_info_confluence_group.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_confluence_group import GroupRemoteInfoConfluenceGroup + +class TestGroupRemoteInfoConfluenceGroup(unittest.TestCase): + """GroupRemoteInfoConfluenceGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoConfluenceGroup: + """Test GroupRemoteInfoConfluenceGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoConfluenceGroup` + """ + model = GroupRemoteInfoConfluenceGroup() + if include_optional: + return GroupRemoteInfoConfluenceGroup( + group_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' + ) + else: + return GroupRemoteInfoConfluenceGroup( + group_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', + ) + """ + + def testGroupRemoteInfoConfluenceGroup(self): + """Test GroupRemoteInfoConfluenceGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_cursor_group.py b/test/test_group_remote_info_cursor_group.py new file mode 100644 index 0000000..f0d263b --- /dev/null +++ b/test/test_group_remote_info_cursor_group.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_cursor_group import GroupRemoteInfoCursorGroup + +class TestGroupRemoteInfoCursorGroup(unittest.TestCase): + """GroupRemoteInfoCursorGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoCursorGroup: + """Test GroupRemoteInfoCursorGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoCursorGroup` + """ + model = GroupRemoteInfoCursorGroup() + if include_optional: + return GroupRemoteInfoCursorGroup( + group_id = 'grp_01k2ja2000e0080000000000n2' + ) + else: + return GroupRemoteInfoCursorGroup( + group_id = 'grp_01k2ja2000e0080000000000n2', + ) + """ + + def testGroupRemoteInfoCursorGroup(self): + """Test GroupRemoteInfoCursorGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_datadog_on_call_schedule.py b/test/test_group_remote_info_datadog_on_call_schedule.py new file mode 100644 index 0000000..e9ffb4b --- /dev/null +++ b/test/test_group_remote_info_datadog_on_call_schedule.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_datadog_on_call_schedule import GroupRemoteInfoDatadogOnCallSchedule + +class TestGroupRemoteInfoDatadogOnCallSchedule(unittest.TestCase): + """GroupRemoteInfoDatadogOnCallSchedule unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoDatadogOnCallSchedule: + """Test GroupRemoteInfoDatadogOnCallSchedule + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoDatadogOnCallSchedule` + """ + model = GroupRemoteInfoDatadogOnCallSchedule() + if include_optional: + return GroupRemoteInfoDatadogOnCallSchedule( + schedule_id = '3653d3c6-0c75-11ea-ad28-fb5701eabc7d' + ) + else: + return GroupRemoteInfoDatadogOnCallSchedule( + schedule_id = '3653d3c6-0c75-11ea-ad28-fb5701eabc7d', + ) + """ + + def testGroupRemoteInfoDatadogOnCallSchedule(self): + """Test GroupRemoteInfoDatadogOnCallSchedule""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_docusign_group.py b/test/test_group_remote_info_docusign_group.py new file mode 100644 index 0000000..c577373 --- /dev/null +++ b/test/test_group_remote_info_docusign_group.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_docusign_group import GroupRemoteInfoDocusignGroup + +class TestGroupRemoteInfoDocusignGroup(unittest.TestCase): + """GroupRemoteInfoDocusignGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoDocusignGroup: + """Test GroupRemoteInfoDocusignGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoDocusignGroup` + """ + model = GroupRemoteInfoDocusignGroup() + if include_optional: + return GroupRemoteInfoDocusignGroup( + group_id = '12345' + ) + else: + return GroupRemoteInfoDocusignGroup( + group_id = '12345', + ) + """ + + def testGroupRemoteInfoDocusignGroup(self): + """Test GroupRemoteInfoDocusignGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_docusign_signing_group.py b/test/test_group_remote_info_docusign_signing_group.py new file mode 100644 index 0000000..f3112b1 --- /dev/null +++ b/test/test_group_remote_info_docusign_signing_group.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_docusign_signing_group import GroupRemoteInfoDocusignSigningGroup + +class TestGroupRemoteInfoDocusignSigningGroup(unittest.TestCase): + """GroupRemoteInfoDocusignSigningGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoDocusignSigningGroup: + """Test GroupRemoteInfoDocusignSigningGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoDocusignSigningGroup` + """ + model = GroupRemoteInfoDocusignSigningGroup() + if include_optional: + return GroupRemoteInfoDocusignSigningGroup( + signing_group_id = '12345' + ) + else: + return GroupRemoteInfoDocusignSigningGroup( + signing_group_id = '12345', + ) + """ + + def testGroupRemoteInfoDocusignSigningGroup(self): + """Test GroupRemoteInfoDocusignSigningGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_jira_group.py b/test/test_group_remote_info_jira_group.py new file mode 100644 index 0000000..281b878 --- /dev/null +++ b/test/test_group_remote_info_jira_group.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_jira_group import GroupRemoteInfoJiraGroup + +class TestGroupRemoteInfoJiraGroup(unittest.TestCase): + """GroupRemoteInfoJiraGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoJiraGroup: + """Test GroupRemoteInfoJiraGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoJiraGroup` + """ + model = GroupRemoteInfoJiraGroup() + if include_optional: + return GroupRemoteInfoJiraGroup( + group_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' + ) + else: + return GroupRemoteInfoJiraGroup( + group_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', + ) + """ + + def testGroupRemoteInfoJiraGroup(self): + """Test GroupRemoteInfoJiraGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_linear_team.py b/test/test_group_remote_info_linear_team.py new file mode 100644 index 0000000..a05baff --- /dev/null +++ b/test/test_group_remote_info_linear_team.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_linear_team import GroupRemoteInfoLinearTeam + +class TestGroupRemoteInfoLinearTeam(unittest.TestCase): + """GroupRemoteInfoLinearTeam unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoLinearTeam: + """Test GroupRemoteInfoLinearTeam + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoLinearTeam` + """ + model = GroupRemoteInfoLinearTeam() + if include_optional: + return GroupRemoteInfoLinearTeam( + team_id = '8caed98e-1234-5678-9abc-def012345678' + ) + else: + return GroupRemoteInfoLinearTeam( + team_id = '8caed98e-1234-5678-9abc-def012345678', + ) + """ + + def testGroupRemoteInfoLinearTeam(self): + """Test GroupRemoteInfoLinearTeam""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_onelogin_group.py b/test/test_group_remote_info_onelogin_group.py new file mode 100644 index 0000000..495b904 --- /dev/null +++ b/test/test_group_remote_info_onelogin_group.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_onelogin_group import GroupRemoteInfoOneloginGroup + +class TestGroupRemoteInfoOneloginGroup(unittest.TestCase): + """GroupRemoteInfoOneloginGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoOneloginGroup: + """Test GroupRemoteInfoOneloginGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoOneloginGroup` + """ + model = GroupRemoteInfoOneloginGroup() + if include_optional: + return GroupRemoteInfoOneloginGroup( + group_id = '' + ) + else: + return GroupRemoteInfoOneloginGroup( + group_id = '', + ) + """ + + def testGroupRemoteInfoOneloginGroup(self): + """Test GroupRemoteInfoOneloginGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_onelogin_role.py b/test/test_group_remote_info_onelogin_role.py new file mode 100644 index 0000000..b00a8f5 --- /dev/null +++ b/test/test_group_remote_info_onelogin_role.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_onelogin_role import GroupRemoteInfoOneloginRole + +class TestGroupRemoteInfoOneloginRole(unittest.TestCase): + """GroupRemoteInfoOneloginRole unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoOneloginRole: + """Test GroupRemoteInfoOneloginRole + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoOneloginRole` + """ + model = GroupRemoteInfoOneloginRole() + if include_optional: + return GroupRemoteInfoOneloginRole( + group_id = '' + ) + else: + return GroupRemoteInfoOneloginRole( + group_id = '', + ) + """ + + def testGroupRemoteInfoOneloginRole(self): + """Test GroupRemoteInfoOneloginRole""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_ramp_department.py b/test/test_group_remote_info_ramp_department.py new file mode 100644 index 0000000..a58445f --- /dev/null +++ b/test/test_group_remote_info_ramp_department.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_ramp_department import GroupRemoteInfoRampDepartment + +class TestGroupRemoteInfoRampDepartment(unittest.TestCase): + """GroupRemoteInfoRampDepartment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoRampDepartment: + """Test GroupRemoteInfoRampDepartment + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoRampDepartment` + """ + model = GroupRemoteInfoRampDepartment() + if include_optional: + return GroupRemoteInfoRampDepartment( + department_id = '2d68eb67-f6eb-4284-8683-7d530c77a5a6' + ) + else: + return GroupRemoteInfoRampDepartment( + department_id = '2d68eb67-f6eb-4284-8683-7d530c77a5a6', + ) + """ + + def testGroupRemoteInfoRampDepartment(self): + """Test GroupRemoteInfoRampDepartment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_ramp_location.py b/test/test_group_remote_info_ramp_location.py new file mode 100644 index 0000000..c589a1c --- /dev/null +++ b/test/test_group_remote_info_ramp_location.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_ramp_location import GroupRemoteInfoRampLocation + +class TestGroupRemoteInfoRampLocation(unittest.TestCase): + """GroupRemoteInfoRampLocation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoRampLocation: + """Test GroupRemoteInfoRampLocation + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoRampLocation` + """ + model = GroupRemoteInfoRampLocation() + if include_optional: + return GroupRemoteInfoRampLocation( + location_id = 'f4efe11c-221f-4b49-a1e4-33eaf96a49ee' + ) + else: + return GroupRemoteInfoRampLocation( + location_id = 'f4efe11c-221f-4b49-a1e4-33eaf96a49ee', + ) + """ + + def testGroupRemoteInfoRampLocation(self): + """Test GroupRemoteInfoRampLocation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_rippling_supergroup.py b/test/test_group_remote_info_rippling_supergroup.py new file mode 100644 index 0000000..da25c7d --- /dev/null +++ b/test/test_group_remote_info_rippling_supergroup.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_rippling_supergroup import GroupRemoteInfoRipplingSupergroup + +class TestGroupRemoteInfoRipplingSupergroup(unittest.TestCase): + """GroupRemoteInfoRipplingSupergroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoRipplingSupergroup: + """Test GroupRemoteInfoRipplingSupergroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoRipplingSupergroup` + """ + model = GroupRemoteInfoRipplingSupergroup() + if include_optional: + return GroupRemoteInfoRipplingSupergroup( + supergroup_id = '8caed98e-1234-5678-9abc-def012345678' + ) + else: + return GroupRemoteInfoRipplingSupergroup( + supergroup_id = '8caed98e-1234-5678-9abc-def012345678', + ) + """ + + def testGroupRemoteInfoRipplingSupergroup(self): + """Test GroupRemoteInfoRipplingSupergroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_rippling_team.py b/test/test_group_remote_info_rippling_team.py new file mode 100644 index 0000000..a36e82b --- /dev/null +++ b/test/test_group_remote_info_rippling_team.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_rippling_team import GroupRemoteInfoRipplingTeam + +class TestGroupRemoteInfoRipplingTeam(unittest.TestCase): + """GroupRemoteInfoRipplingTeam unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoRipplingTeam: + """Test GroupRemoteInfoRipplingTeam + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoRipplingTeam` + """ + model = GroupRemoteInfoRipplingTeam() + if include_optional: + return GroupRemoteInfoRipplingTeam( + team_id = '8caed98e-1234-5678-9abc-def012345678' + ) + else: + return GroupRemoteInfoRipplingTeam( + team_id = '8caed98e-1234-5678-9abc-def012345678', + ) + """ + + def testGroupRemoteInfoRipplingTeam(self): + """Test GroupRemoteInfoRipplingTeam""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_square_job.py b/test/test_group_remote_info_square_job.py new file mode 100644 index 0000000..e09f244 --- /dev/null +++ b/test/test_group_remote_info_square_job.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_square_job import GroupRemoteInfoSquareJob + +class TestGroupRemoteInfoSquareJob(unittest.TestCase): + """GroupRemoteInfoSquareJob unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoSquareJob: + """Test GroupRemoteInfoSquareJob + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoSquareJob` + """ + model = GroupRemoteInfoSquareJob() + if include_optional: + return GroupRemoteInfoSquareJob( + group_id = '' + ) + else: + return GroupRemoteInfoSquareJob( + group_id = '', + ) + """ + + def testGroupRemoteInfoSquareJob(self): + """Test GroupRemoteInfoSquareJob""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_square_location.py b/test/test_group_remote_info_square_location.py new file mode 100644 index 0000000..97d7204 --- /dev/null +++ b/test/test_group_remote_info_square_location.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_square_location import GroupRemoteInfoSquareLocation + +class TestGroupRemoteInfoSquareLocation(unittest.TestCase): + """GroupRemoteInfoSquareLocation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoSquareLocation: + """Test GroupRemoteInfoSquareLocation + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoSquareLocation` + """ + model = GroupRemoteInfoSquareLocation() + if include_optional: + return GroupRemoteInfoSquareLocation( + group_id = '' + ) + else: + return GroupRemoteInfoSquareLocation( + group_id = '', + ) + """ + + def testGroupRemoteInfoSquareLocation(self): + """Test GroupRemoteInfoSquareLocation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_tableau_group.py b/test/test_group_remote_info_tableau_group.py new file mode 100644 index 0000000..0e8a204 --- /dev/null +++ b/test/test_group_remote_info_tableau_group.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_tableau_group import GroupRemoteInfoTableauGroup + +class TestGroupRemoteInfoTableauGroup(unittest.TestCase): + """GroupRemoteInfoTableauGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoTableauGroup: + """Test GroupRemoteInfoTableauGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoTableauGroup` + """ + model = GroupRemoteInfoTableauGroup() + if include_optional: + return GroupRemoteInfoTableauGroup( + group_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' + ) + else: + return GroupRemoteInfoTableauGroup( + group_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', + ) + """ + + def testGroupRemoteInfoTableauGroup(self): + """Test GroupRemoteInfoTableauGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_wrike_group.py b/test/test_group_remote_info_wrike_group.py new file mode 100644 index 0000000..e4adec2 --- /dev/null +++ b/test/test_group_remote_info_wrike_group.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_wrike_group import GroupRemoteInfoWrikeGroup + +class TestGroupRemoteInfoWrikeGroup(unittest.TestCase): + """GroupRemoteInfoWrikeGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoWrikeGroup: + """Test GroupRemoteInfoWrikeGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoWrikeGroup` + """ + model = GroupRemoteInfoWrikeGroup() + if include_optional: + return GroupRemoteInfoWrikeGroup( + group_id = 'KX7ZHLVG' + ) + else: + return GroupRemoteInfoWrikeGroup( + group_id = 'KX7ZHLVG', + ) + """ + + def testGroupRemoteInfoWrikeGroup(self): + """Test GroupRemoteInfoWrikeGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_remote_info_zoom_group.py b/test/test_group_remote_info_zoom_group.py new file mode 100644 index 0000000..7277031 --- /dev/null +++ b/test/test_group_remote_info_zoom_group.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.group_remote_info_zoom_group import GroupRemoteInfoZoomGroup + +class TestGroupRemoteInfoZoomGroup(unittest.TestCase): + """GroupRemoteInfoZoomGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupRemoteInfoZoomGroup: + """Test GroupRemoteInfoZoomGroup + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupRemoteInfoZoomGroup` + """ + model = GroupRemoteInfoZoomGroup() + if include_optional: + return GroupRemoteInfoZoomGroup( + group_id = 'SoBVexyrQjqCkcxjpBWi6w' + ) + else: + return GroupRemoteInfoZoomGroup( + group_id = 'SoBVexyrQjqCkcxjpBWi6w', + ) + """ + + def testGroupRemoteInfoZoomGroup(self): + """Test GroupRemoteInfoZoomGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_idp_status_filter.py b/test/test_idp_status_filter.py new file mode 100644 index 0000000..5ee962a --- /dev/null +++ b/test/test_idp_status_filter.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.idp_status_filter import IdpStatusFilter + +class TestIdpStatusFilter(unittest.TestCase): + """IdpStatusFilter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IdpStatusFilter: + """Test IdpStatusFilter + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IdpStatusFilter` + """ + model = IdpStatusFilter() + if include_optional: + return IdpStatusFilter( + statuses = [ + 'ACTIVE' + ], + var_not = True + ) + else: + return IdpStatusFilter( + ) + """ + + def testIdpStatusFilter(self): + """Test IdpStatusFilter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invite_user_info.py b/test/test_invite_user_info.py new file mode 100644 index 0000000..6306555 --- /dev/null +++ b/test/test_invite_user_info.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.invite_user_info import InviteUserInfo + +class TestInviteUserInfo(unittest.TestCase): + """InviteUserInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteUserInfo: + """Test InviteUserInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InviteUserInfo` + """ + model = InviteUserInfo() + if include_optional: + return InviteUserInfo( + email = '', + first_name = '', + last_name = '', + role = 'MEMBER' + ) + else: + return InviteUserInfo( + email = '', + first_name = '', + last_name = '', + role = 'MEMBER', + ) + """ + + def testInviteUserInfo(self): + """Test InviteUserInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mcp_config_permission.py b/test/test_mcp_config_permission.py new file mode 100644 index 0000000..df418e1 --- /dev/null +++ b/test/test_mcp_config_permission.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.mcp_config_permission import McpConfigPermission + +class TestMcpConfigPermission(unittest.TestCase): + """McpConfigPermission unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> McpConfigPermission: + """Test McpConfigPermission + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `McpConfigPermission` + """ + model = McpConfigPermission() + if include_optional: + return McpConfigPermission( + source = '', + kind = '', + value = '' + ) + else: + return McpConfigPermission( + kind = '', + value = '', + ) + """ + + def testMcpConfigPermission(self): + """Test McpConfigPermission""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mcp_config_plugin.py b/test/test_mcp_config_plugin.py new file mode 100644 index 0000000..c759626 --- /dev/null +++ b/test/test_mcp_config_plugin.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.mcp_config_plugin import McpConfigPlugin + +class TestMcpConfigPlugin(unittest.TestCase): + """McpConfigPlugin unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> McpConfigPlugin: + """Test McpConfigPlugin + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `McpConfigPlugin` + """ + model = McpConfigPlugin() + if include_optional: + return McpConfigPlugin( + name = '', + marketplace = '', + version = '', + scope = '' + ) + else: + return McpConfigPlugin( + name = '', + ) + """ + + def testMcpConfigPlugin(self): + """Test McpConfigPlugin""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mcp_config_report.py b/test/test_mcp_config_report.py new file mode 100644 index 0000000..00b93db --- /dev/null +++ b/test/test_mcp_config_report.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.mcp_config_report import McpConfigReport + +class TestMcpConfigReport(unittest.TestCase): + """McpConfigReport unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> McpConfigReport: + """Test McpConfigReport + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `McpConfigReport` + """ + model = McpConfigReport() + if include_optional: + return McpConfigReport( + servers = [ + { } + ], + reporter = { }, + plugins = [ + { } + ], + skills = [ + { } + ], + subagents = [ + { } + ], + permissions = [ + { } + ] + ) + else: + return McpConfigReport( + servers = [ + { } + ], + ) + """ + + def testMcpConfigReport(self): + """Test McpConfigReport""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mcp_config_report_result.py b/test/test_mcp_config_report_result.py new file mode 100644 index 0000000..f85d597 --- /dev/null +++ b/test/test_mcp_config_report_result.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.mcp_config_report_result import McpConfigReportResult + +class TestMcpConfigReportResult(unittest.TestCase): + """McpConfigReportResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> McpConfigReportResult: + """Test McpConfigReportResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `McpConfigReportResult` + """ + model = McpConfigReportResult() + if include_optional: + return McpConfigReportResult( + received = 56, + recorded = 56 + ) + else: + return McpConfigReportResult( + received = 56, + recorded = 56, + ) + """ + + def testMcpConfigReportResult(self): + """Test McpConfigReportResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mcp_config_reporter.py b/test/test_mcp_config_reporter.py new file mode 100644 index 0000000..787e7ea --- /dev/null +++ b/test/test_mcp_config_reporter.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.mcp_config_reporter import McpConfigReporter + +class TestMcpConfigReporter(unittest.TestCase): + """McpConfigReporter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> McpConfigReporter: + """Test McpConfigReporter + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `McpConfigReporter` + """ + model = McpConfigReporter() + if include_optional: + return McpConfigReporter( + configured_email = '', + claude_account_email = '', + git_email = '', + os_user = '' + ) + else: + return McpConfigReporter( + ) + """ + + def testMcpConfigReporter(self): + """Test McpConfigReporter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mcp_config_server.py b/test/test_mcp_config_server.py new file mode 100644 index 0000000..3353f23 --- /dev/null +++ b/test/test_mcp_config_server.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.mcp_config_server import McpConfigServer + +class TestMcpConfigServer(unittest.TestCase): + """McpConfigServer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> McpConfigServer: + """Test McpConfigServer + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `McpConfigServer` + """ + model = McpConfigServer() + if include_optional: + return McpConfigServer( + name = '', + scope = '', + transport = '', + url = '', + command_hash = '' + ) + else: + return McpConfigServer( + name = '', + ) + """ + + def testMcpConfigServer(self): + """Test McpConfigServer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mcp_config_skill.py b/test/test_mcp_config_skill.py new file mode 100644 index 0000000..9297b7b --- /dev/null +++ b/test/test_mcp_config_skill.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.mcp_config_skill import McpConfigSkill + +class TestMcpConfigSkill(unittest.TestCase): + """McpConfigSkill unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> McpConfigSkill: + """Test McpConfigSkill + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `McpConfigSkill` + """ + model = McpConfigSkill() + if include_optional: + return McpConfigSkill( + name = '', + source = '' + ) + else: + return McpConfigSkill( + name = '', + ) + """ + + def testMcpConfigSkill(self): + """Test McpConfigSkill""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mcp_config_subagent.py b/test/test_mcp_config_subagent.py new file mode 100644 index 0000000..f6ba17a --- /dev/null +++ b/test/test_mcp_config_subagent.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.mcp_config_subagent import McpConfigSubagent + +class TestMcpConfigSubagent(unittest.TestCase): + """McpConfigSubagent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> McpConfigSubagent: + """Test McpConfigSubagent + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `McpConfigSubagent` + """ + model = McpConfigSubagent() + if include_optional: + return McpConfigSubagent( + name = '', + scope = '', + tools = [ + '' + ] + ) + else: + return McpConfigSubagent( + name = '', + ) + """ + + def testMcpConfigSubagent(self): + """Test McpConfigSubagent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_name_match_type.py b/test/test_name_match_type.py new file mode 100644 index 0000000..83d0341 --- /dev/null +++ b/test/test_name_match_type.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.name_match_type import NameMatchType + +class TestNameMatchType(unittest.TestCase): + """NameMatchType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNameMatchType(self): + """Test NameMatchType""" + # inst = NameMatchType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_opal_access_path_detail.py b/test/test_opal_access_path_detail.py new file mode 100644 index 0000000..99b96f2 --- /dev/null +++ b/test/test_opal_access_path_detail.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.opal_access_path_detail import OpalAccessPathDetail + +class TestOpalAccessPathDetail(unittest.TestCase): + """OpalAccessPathDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpalAccessPathDetail: + """Test OpalAccessPathDetail + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpalAccessPathDetail` + """ + model = OpalAccessPathDetail() + if include_optional: + return OpalAccessPathDetail( + path = [ + '' + ], + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return OpalAccessPathDetail( + path = [ + '' + ], + ) + """ + + def testOpalAccessPathDetail(self): + """Test OpalAccessPathDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_opal_access_path_edge_filter.py b/test/test_opal_access_path_edge_filter.py new file mode 100644 index 0000000..0a4b6cb --- /dev/null +++ b/test/test_opal_access_path_edge_filter.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.opal_access_path_edge_filter import OpalAccessPathEdgeFilter + +class TestOpalAccessPathEdgeFilter(unittest.TestCase): + """OpalAccessPathEdgeFilter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpalAccessPathEdgeFilter: + """Test OpalAccessPathEdgeFilter + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpalAccessPathEdgeFilter` + """ + model = OpalAccessPathEdgeFilter() + if include_optional: + return OpalAccessPathEdgeFilter( + direct_only = True, + access_duration_type = 'EXPIRING_ONLY' + ) + else: + return OpalAccessPathEdgeFilter( + ) + """ + + def testOpalAccessPathEdgeFilter(self): + """Test OpalAccessPathEdgeFilter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_opal_access_path_query_body.py b/test/test_opal_access_path_query_body.py new file mode 100644 index 0000000..117d3bb --- /dev/null +++ b/test/test_opal_access_path_query_body.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.opal_access_path_query_body import OpalAccessPathQueryBody + +class TestOpalAccessPathQueryBody(unittest.TestCase): + """OpalAccessPathQueryBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpalAccessPathQueryBody: + """Test OpalAccessPathQueryBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpalAccessPathQueryBody` + """ + model = OpalAccessPathQueryBody() + if include_optional: + return OpalAccessPathQueryBody( + principal_filter = opal_security.models.access_entity_filters.AccessEntityFilters( + entity_types = [ + 'RESOURCE' + ], + entity_item_types = [ + 'OPAL_ROLE' + ], + entity_name = opal_security.models.entity_name_filter.EntityNameFilter( + string_match_type = 'CONTAINS', + string = 'engineering', ), + entity_description = opal_security.models.entity_description_filter.EntityDescriptionFilter( + string = 'production', + not = True, ), + entity_tag = opal_security.models.entity_tag_filter.EntityTagFilter( + key = 'team', + value = 'platform', + connection_id = '', ), + entity_tag_key = opal_security.models.entity_tag_key_filter.EntityTagKeyFilter( + keys = [Critical], ), + hr_idp_status = opal_security.models.idp_status_filter.IdpStatusFilter( + statuses = [ + 'ACTIVE' + ], + not = True, ), + entity_admin_owner = opal_security.models.entity_admin_filter.EntityAdminFilter( + owner_ids = [ + '' + ], + not = True, ), + entity_ids = [ + '' + ], + imported_from_app = [ + '' + ], + role_remote_ids = [ + '' + ], + role_names = [ + '' + ], + all_of = [ + opal_security.models.access_entity_filters.AccessEntityFilters( + any_of = [ + + ], + not = opal_security.models.not.not(), ) + ], + any_of = [ + + ], + not = opal_security.models.not.not(), ), + entitlement_filter = opal_security.models.access_entity_filters.AccessEntityFilters( + entity_types = [ + 'RESOURCE' + ], + entity_item_types = [ + 'OPAL_ROLE' + ], + entity_name = opal_security.models.entity_name_filter.EntityNameFilter( + string_match_type = 'CONTAINS', + string = 'engineering', ), + entity_description = opal_security.models.entity_description_filter.EntityDescriptionFilter( + string = 'production', + not = True, ), + entity_tag = opal_security.models.entity_tag_filter.EntityTagFilter( + key = 'team', + value = 'platform', + connection_id = '', ), + entity_tag_key = opal_security.models.entity_tag_key_filter.EntityTagKeyFilter( + keys = [Critical], ), + hr_idp_status = opal_security.models.idp_status_filter.IdpStatusFilter( + statuses = [ + 'ACTIVE' + ], + not = True, ), + entity_admin_owner = opal_security.models.entity_admin_filter.EntityAdminFilter( + owner_ids = [ + '' + ], + not = True, ), + entity_ids = [ + '' + ], + imported_from_app = [ + '' + ], + role_remote_ids = [ + '' + ], + role_names = [ + '' + ], + all_of = [ + opal_security.models.access_entity_filters.AccessEntityFilters( + any_of = [ + + ], + not = opal_security.models.not.not(), ) + ], + any_of = [ + + ], + not = opal_security.models.not.not(), ), + principal_access_filters = opal_security.models.access_relationship_filters.AccessRelationshipFilters( + is_accessible_by = null, + has_access_to = null, ), + entitlement_access_filters = opal_security.models.access_relationship_filters.AccessRelationshipFilters( + is_accessible_by = null, + has_access_to = null, ), + access_level_remote_ids = [ + '' + ], + access_level_names = [ + '' + ], + edge_filter = opal_security.models.opal_access_path_edge_filter.OpalAccessPathEdgeFilter( + direct_only = True, + access_duration_type = 'EXPIRING_ONLY', ) + ) + else: + return OpalAccessPathQueryBody( + ) + """ + + def testOpalAccessPathQueryBody(self): + """Test OpalAccessPathQueryBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_opal_access_query.py b/test/test_opal_access_query.py new file mode 100644 index 0000000..7c56a25 --- /dev/null +++ b/test/test_opal_access_query.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.opal_access_query import OpalAccessQuery + +class TestOpalAccessQuery(unittest.TestCase): + """OpalAccessQuery unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpalAccessQuery: + """Test OpalAccessQuery + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpalAccessQuery` + """ + model = OpalAccessQuery() + if include_optional: + return OpalAccessQuery( + type = 'ACCESS', + query = opal_security.models.opal_access_path_query_body.OpalAccessPathQueryBody( + principal_filter = opal_security.models.access_entity_filters.AccessEntityFilters( + entity_types = [ + 'RESOURCE' + ], + entity_item_types = [ + 'OPAL_ROLE' + ], + entity_name = opal_security.models.entity_name_filter.EntityNameFilter( + string_match_type = 'CONTAINS', + string = 'engineering', ), + entity_description = opal_security.models.entity_description_filter.EntityDescriptionFilter( + string = 'production', + not = True, ), + entity_tag = opal_security.models.entity_tag_filter.EntityTagFilter( + key = 'team', + value = 'platform', + connection_id = '', ), + entity_tag_key = opal_security.models.entity_tag_key_filter.EntityTagKeyFilter( + keys = [Critical], ), + hr_idp_status = opal_security.models.idp_status_filter.IdpStatusFilter( + statuses = [ + 'ACTIVE' + ], + not = True, ), + entity_admin_owner = opal_security.models.entity_admin_filter.EntityAdminFilter( + owner_ids = [ + '' + ], + not = True, ), + entity_ids = [ + '' + ], + imported_from_app = [ + '' + ], + role_remote_ids = [ + '' + ], + role_names = [ + '' + ], + all_of = [ + opal_security.models.access_entity_filters.AccessEntityFilters( + any_of = [ + + ], + not = opal_security.models.not.not(), ) + ], + any_of = [ + + ], + not = opal_security.models.not.not(), ), + entitlement_filter = , + principal_access_filters = null, + entitlement_access_filters = null, + access_level_remote_ids = [ + '' + ], + access_level_names = [ + '' + ], + edge_filter = opal_security.models.opal_access_path_edge_filter.OpalAccessPathEdgeFilter( + direct_only = True, + access_duration_type = 'EXPIRING_ONLY', ), ), + first = 200, + after = '' + ) + else: + return OpalAccessQuery( + type = 'ACCESS', + ) + """ + + def testOpalAccessQuery(self): + """Test OpalAccessQuery""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_opal_access_query_results.py b/test/test_opal_access_query_results.py new file mode 100644 index 0000000..a1f1413 --- /dev/null +++ b/test/test_opal_access_query_results.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.opal_access_query_results import OpalAccessQueryResults + +class TestOpalAccessQueryResults(unittest.TestCase): + """OpalAccessQueryResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpalAccessQueryResults: + """Test OpalAccessQueryResults + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpalAccessQueryResults` + """ + model = OpalAccessQueryResults() + if include_optional: + return OpalAccessQueryResults( + type = 'ACCESS', + edges = [ + opal_security.models.opal_access_result_edge.OpalAccessResultEdge( + node = opal_security.models.opal_access_result_node.OpalAccessResultNode( + principal_id = '', + entitlement_id = '', + access_level_remote_id = '', + access_level_name = '', + effective_expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_direct = True, + paths = [ + opal_security.models.opal_access_path_detail.OpalAccessPathDetail( + path = [ + '' + ], + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], ), + cursor = '', ) + ], + page_info = opal_security.models.page_info.PageInfo( + has_next_page = True, + end_cursor = '', + has_previous_page = True, + start_cursor = '', ) + ) + else: + return OpalAccessQueryResults( + type = 'ACCESS', + edges = [ + opal_security.models.opal_access_result_edge.OpalAccessResultEdge( + node = opal_security.models.opal_access_result_node.OpalAccessResultNode( + principal_id = '', + entitlement_id = '', + access_level_remote_id = '', + access_level_name = '', + effective_expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_direct = True, + paths = [ + opal_security.models.opal_access_path_detail.OpalAccessPathDetail( + path = [ + '' + ], + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], ), + cursor = '', ) + ], + page_info = opal_security.models.page_info.PageInfo( + has_next_page = True, + end_cursor = '', + has_previous_page = True, + start_cursor = '', ), + ) + """ + + def testOpalAccessQueryResults(self): + """Test OpalAccessQueryResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_opal_access_result_edge.py b/test/test_opal_access_result_edge.py new file mode 100644 index 0000000..476952b --- /dev/null +++ b/test/test_opal_access_result_edge.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.opal_access_result_edge import OpalAccessResultEdge + +class TestOpalAccessResultEdge(unittest.TestCase): + """OpalAccessResultEdge unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpalAccessResultEdge: + """Test OpalAccessResultEdge + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpalAccessResultEdge` + """ + model = OpalAccessResultEdge() + if include_optional: + return OpalAccessResultEdge( + node = opal_security.models.opal_access_result_node.OpalAccessResultNode( + principal_id = '', + entitlement_id = '', + access_level_remote_id = '', + access_level_name = '', + effective_expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_direct = True, + paths = [ + opal_security.models.opal_access_path_detail.OpalAccessPathDetail( + path = [ + '' + ], + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], ), + cursor = '' + ) + else: + return OpalAccessResultEdge( + node = opal_security.models.opal_access_result_node.OpalAccessResultNode( + principal_id = '', + entitlement_id = '', + access_level_remote_id = '', + access_level_name = '', + effective_expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_direct = True, + paths = [ + opal_security.models.opal_access_path_detail.OpalAccessPathDetail( + path = [ + '' + ], + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], ), + cursor = '', + ) + """ + + def testOpalAccessResultEdge(self): + """Test OpalAccessResultEdge""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_opal_access_result_node.py b/test/test_opal_access_result_node.py new file mode 100644 index 0000000..a5f4009 --- /dev/null +++ b/test/test_opal_access_result_node.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.opal_access_result_node import OpalAccessResultNode + +class TestOpalAccessResultNode(unittest.TestCase): + """OpalAccessResultNode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpalAccessResultNode: + """Test OpalAccessResultNode + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpalAccessResultNode` + """ + model = OpalAccessResultNode() + if include_optional: + return OpalAccessResultNode( + principal_id = '', + entitlement_id = '', + access_level_remote_id = '', + access_level_name = '', + effective_expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_direct = True, + paths = [ + opal_security.models.opal_access_path_detail.OpalAccessPathDetail( + path = [ + '' + ], + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return OpalAccessResultNode( + principal_id = '', + entitlement_id = '', + is_direct = True, + paths = [ + opal_security.models.opal_access_path_detail.OpalAccessPathDetail( + path = [ + '' + ], + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + ) + """ + + def testOpalAccessResultNode(self): + """Test OpalAccessResultNode""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_opal_query_results.py b/test/test_opal_query_results.py new file mode 100644 index 0000000..7c09dcd --- /dev/null +++ b/test/test_opal_query_results.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.opal_query_results import OpalQueryResults + +class TestOpalQueryResults(unittest.TestCase): + """OpalQueryResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpalQueryResults: + """Test OpalQueryResults + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpalQueryResults` + """ + model = OpalQueryResults() + if include_optional: + return OpalQueryResults( + type = 'NODE', + edges = [ + opal_security.models.opal_access_result_edge.OpalAccessResultEdge( + node = opal_security.models.opal_access_result_node.OpalAccessResultNode( + principal_id = '', + entitlement_id = '', + access_level_remote_id = '', + access_level_name = '', + effective_expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_direct = True, + paths = [ + opal_security.models.opal_access_path_detail.OpalAccessPathDetail( + path = [ + '' + ], + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], ), + cursor = '', ) + ], + page_info = opal_security.models.page_info.PageInfo( + has_next_page = True, + end_cursor = '', + has_previous_page = True, + start_cursor = '', ) + ) + else: + return OpalQueryResults( + type = 'NODE', + edges = [ + opal_security.models.opal_access_result_edge.OpalAccessResultEdge( + node = opal_security.models.opal_access_result_node.OpalAccessResultNode( + principal_id = '', + entitlement_id = '', + access_level_remote_id = '', + access_level_name = '', + effective_expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_direct = True, + paths = [ + opal_security.models.opal_access_path_detail.OpalAccessPathDetail( + path = [ + '' + ], + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], ), + cursor = '', ) + ], + page_info = opal_security.models.page_info.PageInfo( + has_next_page = True, + end_cursor = '', + has_previous_page = True, + start_cursor = '', ), + ) + """ + + def testOpalQueryResults(self): + """Test OpalQueryResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_opal_script.py b/test/test_opal_script.py new file mode 100644 index 0000000..2b64336 --- /dev/null +++ b/test/test_opal_script.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.opal_script import OpalScript + +class TestOpalScript(unittest.TestCase): + """OpalScript unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpalScript: + """Test OpalScript + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpalScript` + """ + model = OpalScript() + if include_optional: + return OpalScript( + opal_script_id = '32acc112-21ff-4669-91c2-21e27683eaa1', + name = 'MFA check', + script_type = 'REQUEST_REVIEW', + script = '', + version = 3, + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return OpalScript( + opal_script_id = '32acc112-21ff-4669-91c2-21e27683eaa1', + name = 'MFA check', + script_type = 'REQUEST_REVIEW', + script = '', + version = 3, + ) + """ + + def testOpalScript(self): + """Test OpalScript""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_opal_script_list.py b/test/test_opal_script_list.py new file mode 100644 index 0000000..4ebd901 --- /dev/null +++ b/test/test_opal_script_list.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.opal_script_list import OpalScriptList + +class TestOpalScriptList(unittest.TestCase): + """OpalScriptList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpalScriptList: + """Test OpalScriptList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpalScriptList` + """ + model = OpalScriptList() + if include_optional: + return OpalScriptList( + results = [ + {opal_script_id=32acc112-21ff-4669-91c2-21e27683eaa1, name=MFA check, script_type=REQUEST_REVIEW, version=3} + ] + ) + else: + return OpalScriptList( + results = [ + {opal_script_id=32acc112-21ff-4669-91c2-21e27683eaa1, name=MFA check, script_type=REQUEST_REVIEW, version=3} + ], + ) + """ + + def testOpalScriptList(self): + """Test OpalScriptList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_opal_script_type_enum.py b/test/test_opal_script_type_enum.py new file mode 100644 index 0000000..6c829ac --- /dev/null +++ b/test/test_opal_script_type_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.opal_script_type_enum import OpalScriptTypeEnum + +class TestOpalScriptTypeEnum(unittest.TestCase): + """OpalScriptTypeEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOpalScriptTypeEnum(self): + """Test OpalScriptTypeEnum""" + # inst = OpalScriptTypeEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_opal_scripts_api.py b/test/test_opal_scripts_api.py new file mode 100644 index 0000000..41b9164 --- /dev/null +++ b/test/test_opal_scripts_api.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.api.opal_scripts_api import OpalScriptsApi + + +class TestOpalScriptsApi(unittest.TestCase): + """OpalScriptsApi unit test stubs""" + + def setUp(self) -> None: + self.api = OpalScriptsApi() + + def tearDown(self) -> None: + pass + + def test_create_opal_script(self) -> None: + """Test case for create_opal_script + + Create OpalScript + """ + pass + + def test_delete_opal_script(self) -> None: + """Test case for delete_opal_script + + Delete OpalScript + """ + pass + + def test_get_opal_script(self) -> None: + """Test case for get_opal_script + + Get OpalScript by ID + """ + pass + + def test_get_opal_script_from_name(self) -> None: + """Test case for get_opal_script_from_name + + Get OpalScript by name + """ + pass + + def test_get_opal_scripts(self) -> None: + """Test case for get_opal_scripts + + List OpalScripts + """ + pass + + def test_update_opal_script(self) -> None: + """Test case for update_opal_script + + Update OpalScript + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paginated_campaign_items_list.py b/test/test_paginated_campaign_items_list.py new file mode 100644 index 0000000..ad2686b --- /dev/null +++ b/test/test_paginated_campaign_items_list.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.paginated_campaign_items_list import PaginatedCampaignItemsList + +class TestPaginatedCampaignItemsList(unittest.TestCase): + """PaginatedCampaignItemsList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginatedCampaignItemsList: + """Test PaginatedCampaignItemsList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginatedCampaignItemsList` + """ + model = PaginatedCampaignItemsList() + if include_optional: + return PaginatedCampaignItemsList( + next = '', + previous = '', + results = [ + opal_security.models.campaign_item.CampaignItem( + campaign_item_id = '', + campaign_id = '', + target_type = 'ROLE_ASSIGNMENT', + role_assignment_id = '', + status = 'PENDING', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_target_deleted = True, + principal_id = '', + principal_type = null, + entity_id = '', + entity_type = null, + access_level = null, + access_level_name = '', + reviews = [ + opal_security.models.campaign_item_review.CampaignItemReview( + campaign_item_review_id = '', + campaign_item_id = '', + reviewer_user_id = '', + assignment_source = 'MANUAL', + decision = null, + note = '', + updated_access_level_remote_id = '', + updated_duration_in_minutes = 56, + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + resolution_message = '', ) + ], + admin_override = null, ) + ], + total_count = 56 + ) + else: + return PaginatedCampaignItemsList( + results = [ + opal_security.models.campaign_item.CampaignItem( + campaign_item_id = '', + campaign_id = '', + target_type = 'ROLE_ASSIGNMENT', + role_assignment_id = '', + status = 'PENDING', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_target_deleted = True, + principal_id = '', + principal_type = null, + entity_id = '', + entity_type = null, + access_level = null, + access_level_name = '', + reviews = [ + opal_security.models.campaign_item_review.CampaignItemReview( + campaign_item_review_id = '', + campaign_item_id = '', + reviewer_user_id = '', + assignment_source = 'MANUAL', + decision = null, + note = '', + updated_access_level_remote_id = '', + updated_duration_in_minutes = 56, + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + resolution_message = '', ) + ], + admin_override = null, ) + ], + total_count = 56, + ) + """ + + def testPaginatedCampaignItemsList(self): + """Test PaginatedCampaignItemsList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paginated_campaigns_list.py b/test/test_paginated_campaigns_list.py new file mode 100644 index 0000000..8ef400e --- /dev/null +++ b/test/test_paginated_campaigns_list.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.paginated_campaigns_list import PaginatedCampaignsList + +class TestPaginatedCampaignsList(unittest.TestCase): + """PaginatedCampaignsList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginatedCampaignsList: + """Test PaginatedCampaignsList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginatedCampaignsList` + """ + model = PaginatedCampaignsList() + if include_optional: + return PaginatedCampaignsList( + next = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw', + previous = 'cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ', + results = [ + {campaign_id=f454d283-ca87-4a8a-bdbb-df212eca5353, name=Q3 Access Review, status=DRAFT, is_template=false, created_at=2026-07-01T00:00:00.000+00:00, updated_at=2026-07-01T00:00:00.000+00:00, created_by_user_id=32acc112-21ff-4669-91c2-21e27683eaa1} + ] + ) + else: + return PaginatedCampaignsList( + results = [ + {campaign_id=f454d283-ca87-4a8a-bdbb-df212eca5353, name=Q3 Access Review, status=DRAFT, is_template=false, created_at=2026-07-01T00:00:00.000+00:00, updated_at=2026-07-01T00:00:00.000+00:00, created_by_user_id=32acc112-21ff-4669-91c2-21e27683eaa1} + ], + ) + """ + + def testPaginatedCampaignsList(self): + """Test PaginatedCampaignsList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paginated_request_template_list.py b/test/test_paginated_request_template_list.py new file mode 100644 index 0000000..d6e2546 --- /dev/null +++ b/test/test_paginated_request_template_list.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.paginated_request_template_list import PaginatedRequestTemplateList + +class TestPaginatedRequestTemplateList(unittest.TestCase): + """PaginatedRequestTemplateList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginatedRequestTemplateList: + """Test PaginatedRequestTemplateList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginatedRequestTemplateList` + """ + model = PaginatedRequestTemplateList() + if include_optional: + return PaginatedRequestTemplateList( + next = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzAyMTMlMkIwMCUzQTAw', + previous = 'cj0xJnA9MjAyMS0wMS0wNSswMyUzQTI0JTNBNTMuNDMwMjEz', + results = [ + opal_security.models.request_template.RequestTemplate( + request_template_id = '7c86c85d-0651-43e2-a748-d69d658418e8', + name = 'Production access questions', + custom_fields = [ + opal_security.models.request_template_custom_field.RequestTemplateCustomField( + name = 'Why do you need this access?', + description = '', + type = 'SHORT_TEXT', + required = True, + metadata = opal_security.models.request_template_custom_field_metadata.RequestTemplateCustomFieldMetadata( + callout_data = opal_security.models.request_template_custom_field_callout_metadata.RequestTemplateCustomFieldCalloutMetadata( + severity = 'WARNING', + text = 'This role grants access to production customer data.', ), + multi_choice_data = opal_security.models.request_template_custom_field_multi_choice_metadata.RequestTemplateCustomFieldMultiChoiceMetadata( + options = [Incident response, Scheduled maintenance], ), ), ) + ], ) + ] + ) + else: + return PaginatedRequestTemplateList( + ) + """ + + def testPaginatedRequestTemplateList(self): + """Test PaginatedRequestTemplateList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paginated_role_assignments_list.py b/test/test_paginated_role_assignments_list.py new file mode 100644 index 0000000..f7465eb --- /dev/null +++ b/test/test_paginated_role_assignments_list.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.paginated_role_assignments_list import PaginatedRoleAssignmentsList + +class TestPaginatedRoleAssignmentsList(unittest.TestCase): + """PaginatedRoleAssignmentsList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginatedRoleAssignmentsList: + """Test PaginatedRoleAssignmentsList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginatedRoleAssignmentsList` + """ + model = PaginatedRoleAssignmentsList() + if include_optional: + return PaginatedRoleAssignmentsList( + next = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw', + previous = 'cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ', + results = [ + opal_security.models.role_assignment.RoleAssignment( + id = '', + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + access_level = null, + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + granted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return PaginatedRoleAssignmentsList( + results = [ + opal_security.models.role_assignment.RoleAssignment( + id = '', + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + access_level = null, + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + granted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + ) + """ + + def testPaginatedRoleAssignmentsList(self): + """Test PaginatedRoleAssignmentsList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paginated_viewer_campaign_items_list.py b/test/test_paginated_viewer_campaign_items_list.py new file mode 100644 index 0000000..5f1da5d --- /dev/null +++ b/test/test_paginated_viewer_campaign_items_list.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.paginated_viewer_campaign_items_list import PaginatedViewerCampaignItemsList + +class TestPaginatedViewerCampaignItemsList(unittest.TestCase): + """PaginatedViewerCampaignItemsList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginatedViewerCampaignItemsList: + """Test PaginatedViewerCampaignItemsList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginatedViewerCampaignItemsList` + """ + model = PaginatedViewerCampaignItemsList() + if include_optional: + return PaginatedViewerCampaignItemsList( + next = '', + previous = '', + results = [ + opal_security.models.viewer_campaign_item.ViewerCampaignItem( + campaign_item_review_id = '', + decision = null, + note = '', + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + pending_decision = null, + pending_note = '', + updated_access_level_remote_id = '', + pending_updated_access_level_remote_id = '', + updated_duration_in_minutes = 56, + pending_updated_duration_in_minutes = 56, + reassigned_to_reviewer_ids = [ + '' + ], + principal_id = '', + principal_type = 'GROUP', + entity_id = '', + entity_type = 'GROUP', + access_level_name = '', + access_level_remote_id = '', + granted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + role_assignment_id = '', ) + ], + total_count = 56 + ) + else: + return PaginatedViewerCampaignItemsList( + results = [ + opal_security.models.viewer_campaign_item.ViewerCampaignItem( + campaign_item_review_id = '', + decision = null, + note = '', + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + pending_decision = null, + pending_note = '', + updated_access_level_remote_id = '', + pending_updated_access_level_remote_id = '', + updated_duration_in_minutes = 56, + pending_updated_duration_in_minutes = 56, + reassigned_to_reviewer_ids = [ + '' + ], + principal_id = '', + principal_type = 'GROUP', + entity_id = '', + entity_type = 'GROUP', + access_level_name = '', + access_level_remote_id = '', + granted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + role_assignment_id = '', ) + ], + total_count = 56, + ) + """ + + def testPaginatedViewerCampaignItemsList(self): + """Test PaginatedViewerCampaignItemsList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paladin.py b/test/test_paladin.py new file mode 100644 index 0000000..b67d437 --- /dev/null +++ b/test/test_paladin.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.paladin import Paladin + +class TestPaladin(unittest.TestCase): + """Paladin unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Paladin: + """Test Paladin + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Paladin` + """ + model = Paladin() + if include_optional: + return Paladin( + paladin_id = '32acc112-21ff-4669-91c2-21e27683eaa1', + name = 'paladin-agent-1', + owner_id = '7c86c85d-0651-43e2-a748-d69d658418e8', + monitor_mode = True, + admin_view_only = True, + enabled_connectors = [ + 'NOTION' + ], + instructions = 'Approve read-only access; escalate anything that grants write access.' + ) + else: + return Paladin( + paladin_id = '32acc112-21ff-4669-91c2-21e27683eaa1', + name = 'paladin-agent-1', + owner_id = '7c86c85d-0651-43e2-a748-d69d658418e8', + monitor_mode = True, + admin_view_only = True, + enabled_connectors = [ + 'NOTION' + ], + instructions = 'Approve read-only access; escalate anything that grants write access.', + ) + """ + + def testPaladin(self): + """Test Paladin""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paladin_api.py b/test/test_paladin_api.py new file mode 100644 index 0000000..4f81371 --- /dev/null +++ b/test/test_paladin_api.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.api.paladin_api import PaladinApi + + +class TestPaladinApi(unittest.TestCase): + """PaladinApi unit test stubs""" + + def setUp(self) -> None: + self.api = PaladinApi() + + def tearDown(self) -> None: + pass + + def test_create_paladin(self) -> None: + """Test case for create_paladin + + Create Paladin + """ + pass + + def test_create_paladin_context_source(self) -> None: + """Test case for create_paladin_context_source + + Add a Paladin context source + """ + pass + + def test_delete_paladin(self) -> None: + """Test case for delete_paladin + + Delete Paladin + """ + pass + + def test_delete_paladin_context_source(self) -> None: + """Test case for delete_paladin_context_source + + Remove a Paladin context source + """ + pass + + def test_get_paladin(self) -> None: + """Test case for get_paladin + + Get Paladin by ID + """ + pass + + def test_get_paladin_from_name(self) -> None: + """Test case for get_paladin_from_name + + Get Paladins by name + """ + pass + + def test_list_paladin_context_sources(self) -> None: + """Test case for list_paladin_context_sources + + List Paladin context sources + """ + pass + + def test_update_paladin(self) -> None: + """Test case for update_paladin + + Update Paladin + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paladin_connector.py b/test/test_paladin_connector.py new file mode 100644 index 0000000..2f2a44d --- /dev/null +++ b/test/test_paladin_connector.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.paladin_connector import PaladinConnector + +class TestPaladinConnector(unittest.TestCase): + """PaladinConnector unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPaladinConnector(self): + """Test PaladinConnector""" + # inst = PaladinConnector() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paladin_context_source.py b/test/test_paladin_context_source.py new file mode 100644 index 0000000..c09d856 --- /dev/null +++ b/test/test_paladin_context_source.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.paladin_context_source import PaladinContextSource + +class TestPaladinContextSource(unittest.TestCase): + """PaladinContextSource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaladinContextSource: + """Test PaladinContextSource + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaladinContextSource` + """ + model = PaladinContextSource() + if include_optional: + return PaladinContextSource( + id = '', + paladin_id = '', + source_kind = 'SLACK_CHANNEL', + third_party_provider = 'SLACK', + remote_id = '', + name = '', + url = '' + ) + else: + return PaladinContextSource( + id = '', + paladin_id = '', + source_kind = 'SLACK_CHANNEL', + third_party_provider = 'SLACK', + remote_id = '', + name = '', + url = '', + ) + """ + + def testPaladinContextSource(self): + """Test PaladinContextSource""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paladin_context_source_kind.py b/test/test_paladin_context_source_kind.py new file mode 100644 index 0000000..4bb1fbe --- /dev/null +++ b/test/test_paladin_context_source_kind.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.paladin_context_source_kind import PaladinContextSourceKind + +class TestPaladinContextSourceKind(unittest.TestCase): + """PaladinContextSourceKind unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPaladinContextSourceKind(self): + """Test PaladinContextSourceKind""" + # inst = PaladinContextSourceKind() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paladin_context_source_list.py b/test/test_paladin_context_source_list.py new file mode 100644 index 0000000..b57b87b --- /dev/null +++ b/test/test_paladin_context_source_list.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.paladin_context_source_list import PaladinContextSourceList + +class TestPaladinContextSourceList(unittest.TestCase): + """PaladinContextSourceList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaladinContextSourceList: + """Test PaladinContextSourceList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaladinContextSourceList` + """ + model = PaladinContextSourceList() + if include_optional: + return PaladinContextSourceList( + results = [ + {id=8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8, paladin_id=32acc112-21ff-4669-91c2-21e27683eaa1, source_kind=SLACK_CHANNEL, third_party_provider=SLACK, remote_id=C0123456789, name=#access-requests, url=https://example.slack.com/archives/C0123456789} + ] + ) + else: + return PaladinContextSourceList( + results = [ + {id=8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8, paladin_id=32acc112-21ff-4669-91c2-21e27683eaa1, source_kind=SLACK_CHANNEL, third_party_provider=SLACK, remote_id=C0123456789, name=#access-requests, url=https://example.slack.com/archives/C0123456789} + ], + ) + """ + + def testPaladinContextSourceList(self): + """Test PaladinContextSourceList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paladin_context_source_provider.py b/test/test_paladin_context_source_provider.py new file mode 100644 index 0000000..6769f2f --- /dev/null +++ b/test/test_paladin_context_source_provider.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.paladin_context_source_provider import PaladinContextSourceProvider + +class TestPaladinContextSourceProvider(unittest.TestCase): + """PaladinContextSourceProvider unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPaladinContextSourceProvider(self): + """Test PaladinContextSourceProvider""" + # inst = PaladinContextSourceProvider() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paladin_list.py b/test/test_paladin_list.py new file mode 100644 index 0000000..9752fd6 --- /dev/null +++ b/test/test_paladin_list.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.paladin_list import PaladinList + +class TestPaladinList(unittest.TestCase): + """PaladinList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaladinList: + """Test PaladinList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaladinList` + """ + model = PaladinList() + if include_optional: + return PaladinList( + results = [ + {paladin_id=32acc112-21ff-4669-91c2-21e27683eaa1, name=paladin-agent-1, owner_id=7c86c85d-0651-43e2-a748-d69d658418e8, monitor_mode=true, admin_view_only=false, enabled_connectors=[SLACK]} + ] + ) + else: + return PaladinList( + results = [ + {paladin_id=32acc112-21ff-4669-91c2-21e27683eaa1, name=paladin-agent-1, owner_id=7c86c85d-0651-43e2-a748-d69d658418e8, monitor_mode=true, admin_view_only=false, enabled_connectors=[SLACK]} + ], + ) + """ + + def testPaladinList(self): + """Test PaladinList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_remove_role_assignment_input.py b/test/test_remove_role_assignment_input.py new file mode 100644 index 0000000..af37251 --- /dev/null +++ b/test/test_remove_role_assignment_input.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.remove_role_assignment_input import RemoveRoleAssignmentInput + +class TestRemoveRoleAssignmentInput(unittest.TestCase): + """RemoveRoleAssignmentInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemoveRoleAssignmentInput: + """Test RemoveRoleAssignmentInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RemoveRoleAssignmentInput` + """ + model = RemoveRoleAssignmentInput() + if include_optional: + return RemoveRoleAssignmentInput( + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + access_level_remote_id = '' + ) + else: + return RemoveRoleAssignmentInput( + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + ) + """ + + def testRemoveRoleAssignmentInput(self): + """Test RemoveRoleAssignmentInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_remove_role_assignments_entry.py b/test/test_remove_role_assignments_entry.py new file mode 100644 index 0000000..a11060a --- /dev/null +++ b/test/test_remove_role_assignments_entry.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.remove_role_assignments_entry import RemoveRoleAssignmentsEntry + +class TestRemoveRoleAssignmentsEntry(unittest.TestCase): + """RemoveRoleAssignmentsEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemoveRoleAssignmentsEntry: + """Test RemoveRoleAssignmentsEntry + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RemoveRoleAssignmentsEntry` + """ + model = RemoveRoleAssignmentsEntry() + if include_optional: + return RemoveRoleAssignmentsEntry( + role_assignment = opal_security.models.role_assignment.RoleAssignment( + id = '', + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + access_level = null, + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + granted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ) + else: + return RemoveRoleAssignmentsEntry( + role_assignment = opal_security.models.role_assignment.RoleAssignment( + id = '', + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + access_level = null, + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + granted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + ) + """ + + def testRemoveRoleAssignmentsEntry(self): + """Test RemoveRoleAssignmentsEntry""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_remove_role_assignments_request.py b/test/test_remove_role_assignments_request.py new file mode 100644 index 0000000..9c890a0 --- /dev/null +++ b/test/test_remove_role_assignments_request.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.remove_role_assignments_request import RemoveRoleAssignmentsRequest + +class TestRemoveRoleAssignmentsRequest(unittest.TestCase): + """RemoveRoleAssignmentsRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemoveRoleAssignmentsRequest: + """Test RemoveRoleAssignmentsRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RemoveRoleAssignmentsRequest` + """ + model = RemoveRoleAssignmentsRequest() + if include_optional: + return RemoveRoleAssignmentsRequest( + role_assignments = [ + opal_security.models.remove_role_assignment_input.RemoveRoleAssignmentInput( + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + access_level_remote_id = '', ) + ] + ) + else: + return RemoveRoleAssignmentsRequest( + role_assignments = [ + opal_security.models.remove_role_assignment_input.RemoveRoleAssignmentInput( + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + access_level_remote_id = '', ) + ], + ) + """ + + def testRemoveRoleAssignmentsRequest(self): + """Test RemoveRoleAssignmentsRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_remove_role_assignments_response.py b/test/test_remove_role_assignments_response.py new file mode 100644 index 0000000..d1d4b2a --- /dev/null +++ b/test/test_remove_role_assignments_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.remove_role_assignments_response import RemoveRoleAssignmentsResponse + +class TestRemoveRoleAssignmentsResponse(unittest.TestCase): + """RemoveRoleAssignmentsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemoveRoleAssignmentsResponse: + """Test RemoveRoleAssignmentsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RemoveRoleAssignmentsResponse` + """ + model = RemoveRoleAssignmentsResponse() + if include_optional: + return RemoveRoleAssignmentsResponse( + task_ids = [ + '' + ], + entries = [ + opal_security.models.remove_role_assignments_entry.RemoveRoleAssignmentsEntry( + role_assignment = opal_security.models.role_assignment.RoleAssignment( + id = '', + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + access_level = null, + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + granted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), ) + ] + ) + else: + return RemoveRoleAssignmentsResponse( + task_ids = [ + '' + ], + entries = [ + opal_security.models.remove_role_assignments_entry.RemoveRoleAssignmentsEntry( + role_assignment = opal_security.models.role_assignment.RoleAssignment( + id = '', + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + access_level = null, + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + granted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), ) + ], + ) + """ + + def testRemoveRoleAssignmentsResponse(self): + """Test RemoveRoleAssignmentsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_request_template.py b/test/test_request_template.py new file mode 100644 index 0000000..40d4958 --- /dev/null +++ b/test/test_request_template.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.request_template import RequestTemplate + +class TestRequestTemplate(unittest.TestCase): + """RequestTemplate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RequestTemplate: + """Test RequestTemplate + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RequestTemplate` + """ + model = RequestTemplate() + if include_optional: + return RequestTemplate( + request_template_id = '7c86c85d-0651-43e2-a748-d69d658418e8', + name = 'Production access questions', + custom_fields = [ + opal_security.models.request_template_custom_field.RequestTemplateCustomField( + name = 'Why do you need this access?', + description = '', + type = 'SHORT_TEXT', + required = True, + metadata = opal_security.models.request_template_custom_field_metadata.RequestTemplateCustomFieldMetadata( + callout_data = opal_security.models.request_template_custom_field_callout_metadata.RequestTemplateCustomFieldCalloutMetadata( + severity = 'WARNING', + text = 'This role grants access to production customer data.', ), + multi_choice_data = opal_security.models.request_template_custom_field_multi_choice_metadata.RequestTemplateCustomFieldMultiChoiceMetadata( + options = [Incident response, Scheduled maintenance], ), ), ) + ] + ) + else: + return RequestTemplate( + request_template_id = '7c86c85d-0651-43e2-a748-d69d658418e8', + name = 'Production access questions', + ) + """ + + def testRequestTemplate(self): + """Test RequestTemplate""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_request_template_custom_field.py b/test/test_request_template_custom_field.py new file mode 100644 index 0000000..8c308f6 --- /dev/null +++ b/test/test_request_template_custom_field.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.request_template_custom_field import RequestTemplateCustomField + +class TestRequestTemplateCustomField(unittest.TestCase): + """RequestTemplateCustomField unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RequestTemplateCustomField: + """Test RequestTemplateCustomField + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RequestTemplateCustomField` + """ + model = RequestTemplateCustomField() + if include_optional: + return RequestTemplateCustomField( + name = 'Why do you need this access?', + description = '', + type = 'SHORT_TEXT', + required = True, + metadata = opal_security.models.request_template_custom_field_metadata.RequestTemplateCustomFieldMetadata( + callout_data = opal_security.models.request_template_custom_field_callout_metadata.RequestTemplateCustomFieldCalloutMetadata( + severity = 'WARNING', + text = 'This role grants access to production customer data.', ), + multi_choice_data = opal_security.models.request_template_custom_field_multi_choice_metadata.RequestTemplateCustomFieldMultiChoiceMetadata( + options = [Incident response, Scheduled maintenance], ), ) + ) + else: + return RequestTemplateCustomField( + name = 'Why do you need this access?', + type = 'SHORT_TEXT', + ) + """ + + def testRequestTemplateCustomField(self): + """Test RequestTemplateCustomField""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_request_template_custom_field_callout_metadata.py b/test/test_request_template_custom_field_callout_metadata.py new file mode 100644 index 0000000..4ac70ed --- /dev/null +++ b/test/test_request_template_custom_field_callout_metadata.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.request_template_custom_field_callout_metadata import RequestTemplateCustomFieldCalloutMetadata + +class TestRequestTemplateCustomFieldCalloutMetadata(unittest.TestCase): + """RequestTemplateCustomFieldCalloutMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RequestTemplateCustomFieldCalloutMetadata: + """Test RequestTemplateCustomFieldCalloutMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RequestTemplateCustomFieldCalloutMetadata` + """ + model = RequestTemplateCustomFieldCalloutMetadata() + if include_optional: + return RequestTemplateCustomFieldCalloutMetadata( + severity = 'WARNING', + text = 'This role grants access to production customer data.' + ) + else: + return RequestTemplateCustomFieldCalloutMetadata( + severity = 'WARNING', + text = 'This role grants access to production customer data.', + ) + """ + + def testRequestTemplateCustomFieldCalloutMetadata(self): + """Test RequestTemplateCustomFieldCalloutMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_request_template_custom_field_input.py b/test/test_request_template_custom_field_input.py new file mode 100644 index 0000000..90d1ea0 --- /dev/null +++ b/test/test_request_template_custom_field_input.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.request_template_custom_field_input import RequestTemplateCustomFieldInput + +class TestRequestTemplateCustomFieldInput(unittest.TestCase): + """RequestTemplateCustomFieldInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RequestTemplateCustomFieldInput: + """Test RequestTemplateCustomFieldInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RequestTemplateCustomFieldInput` + """ + model = RequestTemplateCustomFieldInput() + if include_optional: + return RequestTemplateCustomFieldInput( + name = 'Why do you need this access?', + description = '', + type = 'SHORT_TEXT', + required = True, + metadata = opal_security.models.request_template_custom_field_metadata.RequestTemplateCustomFieldMetadata( + callout_data = opal_security.models.request_template_custom_field_callout_metadata.RequestTemplateCustomFieldCalloutMetadata( + severity = 'WARNING', + text = 'This role grants access to production customer data.', ), + multi_choice_data = opal_security.models.request_template_custom_field_multi_choice_metadata.RequestTemplateCustomFieldMultiChoiceMetadata( + options = [Incident response, Scheduled maintenance], ), ) + ) + else: + return RequestTemplateCustomFieldInput( + type = 'SHORT_TEXT', + ) + """ + + def testRequestTemplateCustomFieldInput(self): + """Test RequestTemplateCustomFieldInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_request_template_custom_field_metadata.py b/test/test_request_template_custom_field_metadata.py new file mode 100644 index 0000000..d4886b7 --- /dev/null +++ b/test/test_request_template_custom_field_metadata.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.request_template_custom_field_metadata import RequestTemplateCustomFieldMetadata + +class TestRequestTemplateCustomFieldMetadata(unittest.TestCase): + """RequestTemplateCustomFieldMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RequestTemplateCustomFieldMetadata: + """Test RequestTemplateCustomFieldMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RequestTemplateCustomFieldMetadata` + """ + model = RequestTemplateCustomFieldMetadata() + if include_optional: + return RequestTemplateCustomFieldMetadata( + callout_data = opal_security.models.request_template_custom_field_callout_metadata.RequestTemplateCustomFieldCalloutMetadata( + severity = 'WARNING', + text = 'This role grants access to production customer data.', ), + multi_choice_data = opal_security.models.request_template_custom_field_multi_choice_metadata.RequestTemplateCustomFieldMultiChoiceMetadata( + options = [Incident response, Scheduled maintenance], ) + ) + else: + return RequestTemplateCustomFieldMetadata( + ) + """ + + def testRequestTemplateCustomFieldMetadata(self): + """Test RequestTemplateCustomFieldMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_request_template_custom_field_multi_choice_metadata.py b/test/test_request_template_custom_field_multi_choice_metadata.py new file mode 100644 index 0000000..2b05096 --- /dev/null +++ b/test/test_request_template_custom_field_multi_choice_metadata.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.request_template_custom_field_multi_choice_metadata import RequestTemplateCustomFieldMultiChoiceMetadata + +class TestRequestTemplateCustomFieldMultiChoiceMetadata(unittest.TestCase): + """RequestTemplateCustomFieldMultiChoiceMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RequestTemplateCustomFieldMultiChoiceMetadata: + """Test RequestTemplateCustomFieldMultiChoiceMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RequestTemplateCustomFieldMultiChoiceMetadata` + """ + model = RequestTemplateCustomFieldMultiChoiceMetadata() + if include_optional: + return RequestTemplateCustomFieldMultiChoiceMetadata( + options = [Incident response, Scheduled maintenance] + ) + else: + return RequestTemplateCustomFieldMultiChoiceMetadata( + options = [Incident response, Scheduled maintenance], + ) + """ + + def testRequestTemplateCustomFieldMultiChoiceMetadata(self): + """Test RequestTemplateCustomFieldMultiChoiceMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_request_templates_api.py b/test/test_request_templates_api.py new file mode 100644 index 0000000..22c3037 --- /dev/null +++ b/test/test_request_templates_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.api.request_templates_api import RequestTemplatesApi + + +class TestRequestTemplatesApi(unittest.TestCase): + """RequestTemplatesApi unit test stubs""" + + def setUp(self) -> None: + self.api = RequestTemplatesApi() + + def tearDown(self) -> None: + pass + + def test_create_request_template(self) -> None: + """Test case for create_request_template + + """ + pass + + def test_delete_request_template(self) -> None: + """Test case for delete_request_template + + """ + pass + + def test_get_request_template(self) -> None: + """Test case for get_request_template + + """ + pass + + def test_get_request_templates(self) -> None: + """Test case for get_request_templates + + """ + pass + + def test_update_request_template(self) -> None: + """Test case for update_request_template + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_access_level_list.py b/test/test_resource_access_level_list.py new file mode 100644 index 0000000..da55e90 --- /dev/null +++ b/test/test_resource_access_level_list.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_access_level_list import ResourceAccessLevelList + +class TestResourceAccessLevelList(unittest.TestCase): + """ResourceAccessLevelList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceAccessLevelList: + """Test ResourceAccessLevelList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceAccessLevelList` + """ + model = ResourceAccessLevelList() + if include_optional: + return ResourceAccessLevelList( + results = [ + {access_level_name=AdminRole, access_level_remote_id=arn:aws:iam::590304332660:role/AdministratorAccess} + ] + ) + else: + return ResourceAccessLevelList( + ) + """ + + def testResourceAccessLevelList(self): + """Test ResourceAccessLevelList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_configuration_template.py b/test/test_resource_configuration_template.py new file mode 100644 index 0000000..ef4ce7d --- /dev/null +++ b/test/test_resource_configuration_template.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_configuration_template import ResourceConfigurationTemplate + +class TestResourceConfigurationTemplate(unittest.TestCase): + """ResourceConfigurationTemplate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceConfigurationTemplate: + """Test ResourceConfigurationTemplate + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceConfigurationTemplate` + """ + model = ResourceConfigurationTemplate() + if include_optional: + return ResourceConfigurationTemplate( + configuration_template_id = '06851574-e50d-40ca-8c78-f72ae6ab4304' + ) + else: + return ResourceConfigurationTemplate( + configuration_template_id = '06851574-e50d-40ca-8c78-f72ae6ab4304', + ) + """ + + def testResourceConfigurationTemplate(self): + """Test ResourceConfigurationTemplate""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_custom_access_level_list.py b/test/test_resource_custom_access_level_list.py new file mode 100644 index 0000000..8eb2cef --- /dev/null +++ b/test/test_resource_custom_access_level_list.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_custom_access_level_list import ResourceCustomAccessLevelList + +class TestResourceCustomAccessLevelList(unittest.TestCase): + """ResourceCustomAccessLevelList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceCustomAccessLevelList: + """Test ResourceCustomAccessLevelList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceCustomAccessLevelList` + """ + model = ResourceCustomAccessLevelList() + if include_optional: + return ResourceCustomAccessLevelList( + custom_access_levels = [ + opal_security.models.resource_custom_access_level_response.ResourceCustomAccessLevelResponse( + resource_custom_access_level_id = '', + resource_id = '', + access_level = {access_level_name=AdminRole, access_level_remote_id=arn:aws:iam::590304332660:role/AdministratorAccess}, + policy = '', + requestable_by_default = True, + stackable_sensitivity_index = 56, + member_resource_ids = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return ResourceCustomAccessLevelList( + custom_access_levels = [ + opal_security.models.resource_custom_access_level_response.ResourceCustomAccessLevelResponse( + resource_custom_access_level_id = '', + resource_id = '', + access_level = {access_level_name=AdminRole, access_level_remote_id=arn:aws:iam::590304332660:role/AdministratorAccess}, + policy = '', + requestable_by_default = True, + stackable_sensitivity_index = 56, + member_resource_ids = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + ) + """ + + def testResourceCustomAccessLevelList(self): + """Test ResourceCustomAccessLevelList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_custom_access_level_response.py b/test/test_resource_custom_access_level_response.py new file mode 100644 index 0000000..619f137 --- /dev/null +++ b/test/test_resource_custom_access_level_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_custom_access_level_response import ResourceCustomAccessLevelResponse + +class TestResourceCustomAccessLevelResponse(unittest.TestCase): + """ResourceCustomAccessLevelResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceCustomAccessLevelResponse: + """Test ResourceCustomAccessLevelResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceCustomAccessLevelResponse` + """ + model = ResourceCustomAccessLevelResponse() + if include_optional: + return ResourceCustomAccessLevelResponse( + resource_custom_access_level_id = '', + resource_id = '', + access_level = {access_level_name=AdminRole, access_level_remote_id=arn:aws:iam::590304332660:role/AdministratorAccess}, + policy = '', + requestable_by_default = True, + stackable_sensitivity_index = 56, + member_resource_ids = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return ResourceCustomAccessLevelResponse( + resource_custom_access_level_id = '', + resource_id = '', + access_level = {access_level_name=AdminRole, access_level_remote_id=arn:aws:iam::590304332660:role/AdministratorAccess}, + requestable_by_default = True, + ) + """ + + def testResourceCustomAccessLevelResponse(self): + """Test ResourceCustomAccessLevelResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_alicloud_ecs_instance.py b/test/test_resource_remote_info_alicloud_ecs_instance.py new file mode 100644 index 0000000..3164f84 --- /dev/null +++ b/test/test_resource_remote_info_alicloud_ecs_instance.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_alicloud_ecs_instance import ResourceRemoteInfoAlicloudEcsInstance + +class TestResourceRemoteInfoAlicloudEcsInstance(unittest.TestCase): + """ResourceRemoteInfoAlicloudEcsInstance unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoAlicloudEcsInstance: + """Test ResourceRemoteInfoAlicloudEcsInstance + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoAlicloudEcsInstance` + """ + model = ResourceRemoteInfoAlicloudEcsInstance() + if include_optional: + return ResourceRemoteInfoAlicloudEcsInstance( + instance_id = 'i-bp1a1234567890abcd' + ) + else: + return ResourceRemoteInfoAlicloudEcsInstance( + instance_id = 'i-bp1a1234567890abcd', + ) + """ + + def testResourceRemoteInfoAlicloudEcsInstance(self): + """Test ResourceRemoteInfoAlicloudEcsInstance""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_alicloud_ram_role.py b/test/test_resource_remote_info_alicloud_ram_role.py new file mode 100644 index 0000000..c4fe767 --- /dev/null +++ b/test/test_resource_remote_info_alicloud_ram_role.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_alicloud_ram_role import ResourceRemoteInfoAlicloudRamRole + +class TestResourceRemoteInfoAlicloudRamRole(unittest.TestCase): + """ResourceRemoteInfoAlicloudRamRole unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoAlicloudRamRole: + """Test ResourceRemoteInfoAlicloudRamRole + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoAlicloudRamRole` + """ + model = ResourceRemoteInfoAlicloudRamRole() + if include_optional: + return ResourceRemoteInfoAlicloudRamRole( + role_arn = 'acs:ram::1234567890:role/MyRole' + ) + else: + return ResourceRemoteInfoAlicloudRamRole( + role_arn = 'acs:ram::1234567890:role/MyRole', + ) + """ + + def testResourceRemoteInfoAlicloudRamRole(self): + """Test ResourceRemoteInfoAlicloudRamRole""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_asana_workspace.py b/test/test_resource_remote_info_asana_workspace.py new file mode 100644 index 0000000..3557794 --- /dev/null +++ b/test/test_resource_remote_info_asana_workspace.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_asana_workspace import ResourceRemoteInfoAsanaWorkspace + +class TestResourceRemoteInfoAsanaWorkspace(unittest.TestCase): + """ResourceRemoteInfoAsanaWorkspace unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoAsanaWorkspace: + """Test ResourceRemoteInfoAsanaWorkspace + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoAsanaWorkspace` + """ + model = ResourceRemoteInfoAsanaWorkspace() + if include_optional: + return ResourceRemoteInfoAsanaWorkspace( + workspace_gid = '' + ) + else: + return ResourceRemoteInfoAsanaWorkspace( + workspace_gid = '', + ) + """ + + def testResourceRemoteInfoAsanaWorkspace(self): + """Test ResourceRemoteInfoAsanaWorkspace""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_axiom_custom_role.py b/test/test_resource_remote_info_axiom_custom_role.py new file mode 100644 index 0000000..4694e4c --- /dev/null +++ b/test/test_resource_remote_info_axiom_custom_role.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_axiom_custom_role import ResourceRemoteInfoAxiomCustomRole + +class TestResourceRemoteInfoAxiomCustomRole(unittest.TestCase): + """ResourceRemoteInfoAxiomCustomRole unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoAxiomCustomRole: + """Test ResourceRemoteInfoAxiomCustomRole + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoAxiomCustomRole` + """ + model = ResourceRemoteInfoAxiomCustomRole() + if include_optional: + return ResourceRemoteInfoAxiomCustomRole( + role_id = 'role_0123456789abcdef' + ) + else: + return ResourceRemoteInfoAxiomCustomRole( + role_id = 'role_0123456789abcdef', + ) + """ + + def testResourceRemoteInfoAxiomCustomRole(self): + """Test ResourceRemoteInfoAxiomCustomRole""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_axiom_role.py b/test/test_resource_remote_info_axiom_role.py new file mode 100644 index 0000000..1a56d32 --- /dev/null +++ b/test/test_resource_remote_info_axiom_role.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_axiom_role import ResourceRemoteInfoAxiomRole + +class TestResourceRemoteInfoAxiomRole(unittest.TestCase): + """ResourceRemoteInfoAxiomRole unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoAxiomRole: + """Test ResourceRemoteInfoAxiomRole + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoAxiomRole` + """ + model = ResourceRemoteInfoAxiomRole() + if include_optional: + return ResourceRemoteInfoAxiomRole( + role_id = 'role_member' + ) + else: + return ResourceRemoteInfoAxiomRole( + role_id = 'role_member', + ) + """ + + def testResourceRemoteInfoAxiomRole(self): + """Test ResourceRemoteInfoAxiomRole""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_bitwarden_organization.py b/test/test_resource_remote_info_bitwarden_organization.py new file mode 100644 index 0000000..33fce2c --- /dev/null +++ b/test/test_resource_remote_info_bitwarden_organization.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_bitwarden_organization import ResourceRemoteInfoBitwardenOrganization + +class TestResourceRemoteInfoBitwardenOrganization(unittest.TestCase): + """ResourceRemoteInfoBitwardenOrganization unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoBitwardenOrganization: + """Test ResourceRemoteInfoBitwardenOrganization + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoBitwardenOrganization` + """ + model = ResourceRemoteInfoBitwardenOrganization() + if include_optional: + return ResourceRemoteInfoBitwardenOrganization( + organization_id = '' + ) + else: + return ResourceRemoteInfoBitwardenOrganization( + organization_id = '', + ) + """ + + def testResourceRemoteInfoBitwardenOrganization(self): + """Test ResourceRemoteInfoBitwardenOrganization""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_box_enterprise.py b/test/test_resource_remote_info_box_enterprise.py new file mode 100644 index 0000000..82f772d --- /dev/null +++ b/test/test_resource_remote_info_box_enterprise.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_box_enterprise import ResourceRemoteInfoBoxEnterprise + +class TestResourceRemoteInfoBoxEnterprise(unittest.TestCase): + """ResourceRemoteInfoBoxEnterprise unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoBoxEnterprise: + """Test ResourceRemoteInfoBoxEnterprise + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoBoxEnterprise` + """ + model = ResourceRemoteInfoBoxEnterprise() + if include_optional: + return ResourceRemoteInfoBoxEnterprise( + resource_id = '' + ) + else: + return ResourceRemoteInfoBoxEnterprise( + resource_id = '', + ) + """ + + def testResourceRemoteInfoBoxEnterprise(self): + """Test ResourceRemoteInfoBoxEnterprise""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_box_folder.py b/test/test_resource_remote_info_box_folder.py new file mode 100644 index 0000000..4485379 --- /dev/null +++ b/test/test_resource_remote_info_box_folder.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_box_folder import ResourceRemoteInfoBoxFolder + +class TestResourceRemoteInfoBoxFolder(unittest.TestCase): + """ResourceRemoteInfoBoxFolder unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoBoxFolder: + """Test ResourceRemoteInfoBoxFolder + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoBoxFolder` + """ + model = ResourceRemoteInfoBoxFolder() + if include_optional: + return ResourceRemoteInfoBoxFolder( + resource_id = '' + ) + else: + return ResourceRemoteInfoBoxFolder( + resource_id = '', + ) + """ + + def testResourceRemoteInfoBoxFolder(self): + """Test ResourceRemoteInfoBoxFolder""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_calendly_event_type.py b/test/test_resource_remote_info_calendly_event_type.py new file mode 100644 index 0000000..7b42417 --- /dev/null +++ b/test/test_resource_remote_info_calendly_event_type.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_calendly_event_type import ResourceRemoteInfoCalendlyEventType + +class TestResourceRemoteInfoCalendlyEventType(unittest.TestCase): + """ResourceRemoteInfoCalendlyEventType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoCalendlyEventType: + """Test ResourceRemoteInfoCalendlyEventType + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoCalendlyEventType` + """ + model = ResourceRemoteInfoCalendlyEventType() + if include_optional: + return ResourceRemoteInfoCalendlyEventType( + resource_id = '' + ) + else: + return ResourceRemoteInfoCalendlyEventType( + resource_id = '', + ) + """ + + def testResourceRemoteInfoCalendlyEventType(self): + """Test ResourceRemoteInfoCalendlyEventType""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_calendly_role.py b/test/test_resource_remote_info_calendly_role.py new file mode 100644 index 0000000..0483a03 --- /dev/null +++ b/test/test_resource_remote_info_calendly_role.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_calendly_role import ResourceRemoteInfoCalendlyRole + +class TestResourceRemoteInfoCalendlyRole(unittest.TestCase): + """ResourceRemoteInfoCalendlyRole unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoCalendlyRole: + """Test ResourceRemoteInfoCalendlyRole + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoCalendlyRole` + """ + model = ResourceRemoteInfoCalendlyRole() + if include_optional: + return ResourceRemoteInfoCalendlyRole( + resource_id = '' + ) + else: + return ResourceRemoteInfoCalendlyRole( + resource_id = '', + ) + """ + + def testResourceRemoteInfoCalendlyRole(self): + """Test ResourceRemoteInfoCalendlyRole""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_clickhouse_console_role.py b/test/test_resource_remote_info_clickhouse_console_role.py new file mode 100644 index 0000000..51c0a46 --- /dev/null +++ b/test/test_resource_remote_info_clickhouse_console_role.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_clickhouse_console_role import ResourceRemoteInfoClickhouseConsoleRole + +class TestResourceRemoteInfoClickhouseConsoleRole(unittest.TestCase): + """ResourceRemoteInfoClickhouseConsoleRole unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoClickhouseConsoleRole: + """Test ResourceRemoteInfoClickhouseConsoleRole + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoClickhouseConsoleRole` + """ + model = ResourceRemoteInfoClickhouseConsoleRole() + if include_optional: + return ResourceRemoteInfoClickhouseConsoleRole( + role_id = '123e4567-e89b-12d3-a456-426614174000' + ) + else: + return ResourceRemoteInfoClickhouseConsoleRole( + role_id = '123e4567-e89b-12d3-a456-426614174000', + ) + """ + + def testResourceRemoteInfoClickhouseConsoleRole(self): + """Test ResourceRemoteInfoClickhouseConsoleRole""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_cursor_origin_repository.py b/test/test_resource_remote_info_cursor_origin_repository.py new file mode 100644 index 0000000..14c6e4d --- /dev/null +++ b/test/test_resource_remote_info_cursor_origin_repository.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_cursor_origin_repository import ResourceRemoteInfoCursorOriginRepository + +class TestResourceRemoteInfoCursorOriginRepository(unittest.TestCase): + """ResourceRemoteInfoCursorOriginRepository unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoCursorOriginRepository: + """Test ResourceRemoteInfoCursorOriginRepository + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoCursorOriginRepository` + """ + model = ResourceRemoteInfoCursorOriginRepository() + if include_optional: + return ResourceRemoteInfoCursorOriginRepository( + repository_name = 'acme/rocket' + ) + else: + return ResourceRemoteInfoCursorOriginRepository( + repository_name = 'acme/rocket', + ) + """ + + def testResourceRemoteInfoCursorOriginRepository(self): + """Test ResourceRemoteInfoCursorOriginRepository""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_databricks_catalog.py b/test/test_resource_remote_info_databricks_catalog.py new file mode 100644 index 0000000..d3c6ebd --- /dev/null +++ b/test/test_resource_remote_info_databricks_catalog.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_databricks_catalog import ResourceRemoteInfoDatabricksCatalog + +class TestResourceRemoteInfoDatabricksCatalog(unittest.TestCase): + """ResourceRemoteInfoDatabricksCatalog unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoDatabricksCatalog: + """Test ResourceRemoteInfoDatabricksCatalog + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoDatabricksCatalog` + """ + model = ResourceRemoteInfoDatabricksCatalog() + if include_optional: + return ResourceRemoteInfoDatabricksCatalog( + metastore_id = '12345678-1234-1234-1234-123456789012', + full_name = 'my_catalog' + ) + else: + return ResourceRemoteInfoDatabricksCatalog( + metastore_id = '12345678-1234-1234-1234-123456789012', + full_name = 'my_catalog', + ) + """ + + def testResourceRemoteInfoDatabricksCatalog(self): + """Test ResourceRemoteInfoDatabricksCatalog""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_databricks_function.py b/test/test_resource_remote_info_databricks_function.py new file mode 100644 index 0000000..02526f1 --- /dev/null +++ b/test/test_resource_remote_info_databricks_function.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_databricks_function import ResourceRemoteInfoDatabricksFunction + +class TestResourceRemoteInfoDatabricksFunction(unittest.TestCase): + """ResourceRemoteInfoDatabricksFunction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoDatabricksFunction: + """Test ResourceRemoteInfoDatabricksFunction + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoDatabricksFunction` + """ + model = ResourceRemoteInfoDatabricksFunction() + if include_optional: + return ResourceRemoteInfoDatabricksFunction( + metastore_id = '12345678-1234-1234-1234-123456789012', + full_name = 'my_catalog.my_schema.my_function' + ) + else: + return ResourceRemoteInfoDatabricksFunction( + metastore_id = '12345678-1234-1234-1234-123456789012', + full_name = 'my_catalog.my_schema.my_function', + ) + """ + + def testResourceRemoteInfoDatabricksFunction(self): + """Test ResourceRemoteInfoDatabricksFunction""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_databricks_model.py b/test/test_resource_remote_info_databricks_model.py new file mode 100644 index 0000000..f3599d6 --- /dev/null +++ b/test/test_resource_remote_info_databricks_model.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_databricks_model import ResourceRemoteInfoDatabricksModel + +class TestResourceRemoteInfoDatabricksModel(unittest.TestCase): + """ResourceRemoteInfoDatabricksModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoDatabricksModel: + """Test ResourceRemoteInfoDatabricksModel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoDatabricksModel` + """ + model = ResourceRemoteInfoDatabricksModel() + if include_optional: + return ResourceRemoteInfoDatabricksModel( + metastore_id = '12345678-1234-1234-1234-123456789012', + full_name = 'my_catalog.my_schema.my_model' + ) + else: + return ResourceRemoteInfoDatabricksModel( + metastore_id = '12345678-1234-1234-1234-123456789012', + full_name = 'my_catalog.my_schema.my_model', + ) + """ + + def testResourceRemoteInfoDatabricksModel(self): + """Test ResourceRemoteInfoDatabricksModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_databricks_schema.py b/test/test_resource_remote_info_databricks_schema.py new file mode 100644 index 0000000..1384e5a --- /dev/null +++ b/test/test_resource_remote_info_databricks_schema.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_databricks_schema import ResourceRemoteInfoDatabricksSchema + +class TestResourceRemoteInfoDatabricksSchema(unittest.TestCase): + """ResourceRemoteInfoDatabricksSchema unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoDatabricksSchema: + """Test ResourceRemoteInfoDatabricksSchema + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoDatabricksSchema` + """ + model = ResourceRemoteInfoDatabricksSchema() + if include_optional: + return ResourceRemoteInfoDatabricksSchema( + metastore_id = '12345678-1234-1234-1234-123456789012', + full_name = 'my_catalog.my_schema' + ) + else: + return ResourceRemoteInfoDatabricksSchema( + metastore_id = '12345678-1234-1234-1234-123456789012', + full_name = 'my_catalog.my_schema', + ) + """ + + def testResourceRemoteInfoDatabricksSchema(self): + """Test ResourceRemoteInfoDatabricksSchema""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_databricks_service.py b/test/test_resource_remote_info_databricks_service.py new file mode 100644 index 0000000..f0fab81 --- /dev/null +++ b/test/test_resource_remote_info_databricks_service.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_databricks_service import ResourceRemoteInfoDatabricksService + +class TestResourceRemoteInfoDatabricksService(unittest.TestCase): + """ResourceRemoteInfoDatabricksService unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoDatabricksService: + """Test ResourceRemoteInfoDatabricksService + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoDatabricksService` + """ + model = ResourceRemoteInfoDatabricksService() + if include_optional: + return ResourceRemoteInfoDatabricksService( + metastore_id = '12345678-1234-1234-1234-123456789012', + full_name = 'my_catalog.my_schema.my_service' + ) + else: + return ResourceRemoteInfoDatabricksService( + metastore_id = '12345678-1234-1234-1234-123456789012', + full_name = 'my_catalog.my_schema.my_service', + ) + """ + + def testResourceRemoteInfoDatabricksService(self): + """Test ResourceRemoteInfoDatabricksService""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_databricks_volume.py b/test/test_resource_remote_info_databricks_volume.py new file mode 100644 index 0000000..fdde88c --- /dev/null +++ b/test/test_resource_remote_info_databricks_volume.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_databricks_volume import ResourceRemoteInfoDatabricksVolume + +class TestResourceRemoteInfoDatabricksVolume(unittest.TestCase): + """ResourceRemoteInfoDatabricksVolume unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoDatabricksVolume: + """Test ResourceRemoteInfoDatabricksVolume + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoDatabricksVolume` + """ + model = ResourceRemoteInfoDatabricksVolume() + if include_optional: + return ResourceRemoteInfoDatabricksVolume( + metastore_id = '12345678-1234-1234-1234-123456789012', + full_name = 'my_catalog.my_schema.my_volume' + ) + else: + return ResourceRemoteInfoDatabricksVolume( + metastore_id = '12345678-1234-1234-1234-123456789012', + full_name = 'my_catalog.my_schema.my_volume', + ) + """ + + def testResourceRemoteInfoDatabricksVolume(self): + """Test ResourceRemoteInfoDatabricksVolume""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_docusign_permission_profile.py b/test/test_resource_remote_info_docusign_permission_profile.py new file mode 100644 index 0000000..ced4c0d --- /dev/null +++ b/test/test_resource_remote_info_docusign_permission_profile.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_docusign_permission_profile import ResourceRemoteInfoDocusignPermissionProfile + +class TestResourceRemoteInfoDocusignPermissionProfile(unittest.TestCase): + """ResourceRemoteInfoDocusignPermissionProfile unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoDocusignPermissionProfile: + """Test ResourceRemoteInfoDocusignPermissionProfile + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoDocusignPermissionProfile` + """ + model = ResourceRemoteInfoDocusignPermissionProfile() + if include_optional: + return ResourceRemoteInfoDocusignPermissionProfile( + permission_profile_id = '12345' + ) + else: + return ResourceRemoteInfoDocusignPermissionProfile( + permission_profile_id = '12345', + ) + """ + + def testResourceRemoteInfoDocusignPermissionProfile(self): + """Test ResourceRemoteInfoDocusignPermissionProfile""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_gcp_billing_account.py b/test/test_resource_remote_info_gcp_billing_account.py new file mode 100644 index 0000000..7cc38b9 --- /dev/null +++ b/test/test_resource_remote_info_gcp_billing_account.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_gcp_billing_account import ResourceRemoteInfoGcpBillingAccount + +class TestResourceRemoteInfoGcpBillingAccount(unittest.TestCase): + """ResourceRemoteInfoGcpBillingAccount unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoGcpBillingAccount: + """Test ResourceRemoteInfoGcpBillingAccount + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoGcpBillingAccount` + """ + model = ResourceRemoteInfoGcpBillingAccount() + if include_optional: + return ResourceRemoteInfoGcpBillingAccount( + billing_account_id = 'billingAccounts/012345-567890-ABCDEF' + ) + else: + return ResourceRemoteInfoGcpBillingAccount( + billing_account_id = 'billingAccounts/012345-567890-ABCDEF', + ) + """ + + def testResourceRemoteInfoGcpBillingAccount(self): + """Test ResourceRemoteInfoGcpBillingAccount""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_linear_organization.py b/test/test_resource_remote_info_linear_organization.py new file mode 100644 index 0000000..e26a908 --- /dev/null +++ b/test/test_resource_remote_info_linear_organization.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_linear_organization import ResourceRemoteInfoLinearOrganization + +class TestResourceRemoteInfoLinearOrganization(unittest.TestCase): + """ResourceRemoteInfoLinearOrganization unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoLinearOrganization: + """Test ResourceRemoteInfoLinearOrganization + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoLinearOrganization` + """ + model = ResourceRemoteInfoLinearOrganization() + if include_optional: + return ResourceRemoteInfoLinearOrganization( + org_id = 'df85baa9-0af5-4f28-a5b5-64e4b2ddeedc' + ) + else: + return ResourceRemoteInfoLinearOrganization( + org_id = 'df85baa9-0af5-4f28-a5b5-64e4b2ddeedc', + ) + """ + + def testResourceRemoteInfoLinearOrganization(self): + """Test ResourceRemoteInfoLinearOrganization""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_linear_project.py b/test/test_resource_remote_info_linear_project.py new file mode 100644 index 0000000..e22c7e7 --- /dev/null +++ b/test/test_resource_remote_info_linear_project.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_linear_project import ResourceRemoteInfoLinearProject + +class TestResourceRemoteInfoLinearProject(unittest.TestCase): + """ResourceRemoteInfoLinearProject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoLinearProject: + """Test ResourceRemoteInfoLinearProject + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoLinearProject` + """ + model = ResourceRemoteInfoLinearProject() + if include_optional: + return ResourceRemoteInfoLinearProject( + project_id = '58ed91a7-1234-5678-9abc-def012345678' + ) + else: + return ResourceRemoteInfoLinearProject( + project_id = '58ed91a7-1234-5678-9abc-def012345678', + ) + """ + + def testResourceRemoteInfoLinearProject(self): + """Test ResourceRemoteInfoLinearProject""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_onelogin_app.py b/test/test_resource_remote_info_onelogin_app.py new file mode 100644 index 0000000..d495e7b --- /dev/null +++ b/test/test_resource_remote_info_onelogin_app.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_onelogin_app import ResourceRemoteInfoOneloginApp + +class TestResourceRemoteInfoOneloginApp(unittest.TestCase): + """ResourceRemoteInfoOneloginApp unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoOneloginApp: + """Test ResourceRemoteInfoOneloginApp + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoOneloginApp` + """ + model = ResourceRemoteInfoOneloginApp() + if include_optional: + return ResourceRemoteInfoOneloginApp( + resource_id = '' + ) + else: + return ResourceRemoteInfoOneloginApp( + resource_id = '', + ) + """ + + def testResourceRemoteInfoOneloginApp(self): + """Test ResourceRemoteInfoOneloginApp""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_ramp_fund.py b/test/test_resource_remote_info_ramp_fund.py new file mode 100644 index 0000000..13a4a1b --- /dev/null +++ b/test/test_resource_remote_info_ramp_fund.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_ramp_fund import ResourceRemoteInfoRampFund + +class TestResourceRemoteInfoRampFund(unittest.TestCase): + """ResourceRemoteInfoRampFund unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoRampFund: + """Test ResourceRemoteInfoRampFund + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoRampFund` + """ + model = ResourceRemoteInfoRampFund() + if include_optional: + return ResourceRemoteInfoRampFund( + fund_id = '9abffcf0-dd7d-42f0-b806-ce0502ab6496' + ) + else: + return ResourceRemoteInfoRampFund( + fund_id = '9abffcf0-dd7d-42f0-b806-ce0502ab6496', + ) + """ + + def testResourceRemoteInfoRampFund(self): + """Test ResourceRemoteInfoRampFund""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_ramp_role.py b/test/test_resource_remote_info_ramp_role.py new file mode 100644 index 0000000..cf2b50a --- /dev/null +++ b/test/test_resource_remote_info_ramp_role.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_ramp_role import ResourceRemoteInfoRampRole + +class TestResourceRemoteInfoRampRole(unittest.TestCase): + """ResourceRemoteInfoRampRole unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoRampRole: + """Test ResourceRemoteInfoRampRole + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoRampRole` + """ + model = ResourceRemoteInfoRampRole() + if include_optional: + return ResourceRemoteInfoRampRole( + role = 'BUSINESS_USER' + ) + else: + return ResourceRemoteInfoRampRole( + role = 'BUSINESS_USER', + ) + """ + + def testResourceRemoteInfoRampRole(self): + """Test ResourceRemoteInfoRampRole""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_rippling_department.py b/test/test_resource_remote_info_rippling_department.py new file mode 100644 index 0000000..564800d --- /dev/null +++ b/test/test_resource_remote_info_rippling_department.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_rippling_department import ResourceRemoteInfoRipplingDepartment + +class TestResourceRemoteInfoRipplingDepartment(unittest.TestCase): + """ResourceRemoteInfoRipplingDepartment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoRipplingDepartment: + """Test ResourceRemoteInfoRipplingDepartment + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoRipplingDepartment` + """ + model = ResourceRemoteInfoRipplingDepartment() + if include_optional: + return ResourceRemoteInfoRipplingDepartment( + department_id = '8caed98e-1234-5678-9abc-def012345678' + ) + else: + return ResourceRemoteInfoRipplingDepartment( + department_id = '8caed98e-1234-5678-9abc-def012345678', + ) + """ + + def testResourceRemoteInfoRipplingDepartment(self): + """Test ResourceRemoteInfoRipplingDepartment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_slack_organization.py b/test/test_resource_remote_info_slack_organization.py new file mode 100644 index 0000000..a080a8a --- /dev/null +++ b/test/test_resource_remote_info_slack_organization.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_slack_organization import ResourceRemoteInfoSlackOrganization + +class TestResourceRemoteInfoSlackOrganization(unittest.TestCase): + """ResourceRemoteInfoSlackOrganization unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoSlackOrganization: + """Test ResourceRemoteInfoSlackOrganization + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoSlackOrganization` + """ + model = ResourceRemoteInfoSlackOrganization() + if include_optional: + return ResourceRemoteInfoSlackOrganization( + organization_id = 'E01234567' + ) + else: + return ResourceRemoteInfoSlackOrganization( + organization_id = 'E01234567', + ) + """ + + def testResourceRemoteInfoSlackOrganization(self): + """Test ResourceRemoteInfoSlackOrganization""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_slack_workspace.py b/test/test_resource_remote_info_slack_workspace.py new file mode 100644 index 0000000..30128cc --- /dev/null +++ b/test/test_resource_remote_info_slack_workspace.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_slack_workspace import ResourceRemoteInfoSlackWorkspace + +class TestResourceRemoteInfoSlackWorkspace(unittest.TestCase): + """ResourceRemoteInfoSlackWorkspace unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoSlackWorkspace: + """Test ResourceRemoteInfoSlackWorkspace + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoSlackWorkspace` + """ + model = ResourceRemoteInfoSlackWorkspace() + if include_optional: + return ResourceRemoteInfoSlackWorkspace( + workspace_id = 'T01234567' + ) + else: + return ResourceRemoteInfoSlackWorkspace( + workspace_id = 'T01234567', + ) + """ + + def testResourceRemoteInfoSlackWorkspace(self): + """Test ResourceRemoteInfoSlackWorkspace""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_tray_organization.py b/test/test_resource_remote_info_tray_organization.py new file mode 100644 index 0000000..6155802 --- /dev/null +++ b/test/test_resource_remote_info_tray_organization.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_tray_organization import ResourceRemoteInfoTrayOrganization + +class TestResourceRemoteInfoTrayOrganization(unittest.TestCase): + """ResourceRemoteInfoTrayOrganization unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoTrayOrganization: + """Test ResourceRemoteInfoTrayOrganization + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoTrayOrganization` + """ + model = ResourceRemoteInfoTrayOrganization() + if include_optional: + return ResourceRemoteInfoTrayOrganization( + organization_id = '' + ) + else: + return ResourceRemoteInfoTrayOrganization( + organization_id = '', + ) + """ + + def testResourceRemoteInfoTrayOrganization(self): + """Test ResourceRemoteInfoTrayOrganization""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_tray_workspace.py b/test/test_resource_remote_info_tray_workspace.py new file mode 100644 index 0000000..bf28095 --- /dev/null +++ b/test/test_resource_remote_info_tray_workspace.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_tray_workspace import ResourceRemoteInfoTrayWorkspace + +class TestResourceRemoteInfoTrayWorkspace(unittest.TestCase): + """ResourceRemoteInfoTrayWorkspace unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoTrayWorkspace: + """Test ResourceRemoteInfoTrayWorkspace + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoTrayWorkspace` + """ + model = ResourceRemoteInfoTrayWorkspace() + if include_optional: + return ResourceRemoteInfoTrayWorkspace( + workspace_id = '' + ) + else: + return ResourceRemoteInfoTrayWorkspace( + workspace_id = '', + ) + """ + + def testResourceRemoteInfoTrayWorkspace(self): + """Test ResourceRemoteInfoTrayWorkspace""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_vercel_project.py b/test/test_resource_remote_info_vercel_project.py new file mode 100644 index 0000000..b1d3594 --- /dev/null +++ b/test/test_resource_remote_info_vercel_project.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_vercel_project import ResourceRemoteInfoVercelProject + +class TestResourceRemoteInfoVercelProject(unittest.TestCase): + """ResourceRemoteInfoVercelProject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoVercelProject: + """Test ResourceRemoteInfoVercelProject + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoVercelProject` + """ + model = ResourceRemoteInfoVercelProject() + if include_optional: + return ResourceRemoteInfoVercelProject( + project_id = 'prj_xxxxxxxx' + ) + else: + return ResourceRemoteInfoVercelProject( + project_id = 'prj_xxxxxxxx', + ) + """ + + def testResourceRemoteInfoVercelProject(self): + """Test ResourceRemoteInfoVercelProject""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_vercel_role.py b/test/test_resource_remote_info_vercel_role.py new file mode 100644 index 0000000..9f0c7dd --- /dev/null +++ b/test/test_resource_remote_info_vercel_role.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_vercel_role import ResourceRemoteInfoVercelRole + +class TestResourceRemoteInfoVercelRole(unittest.TestCase): + """ResourceRemoteInfoVercelRole unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoVercelRole: + """Test ResourceRemoteInfoVercelRole + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoVercelRole` + """ + model = ResourceRemoteInfoVercelRole() + if include_optional: + return ResourceRemoteInfoVercelRole( + role_id = 'CONTRIBUTOR' + ) + else: + return ResourceRemoteInfoVercelRole( + role_id = 'CONTRIBUTOR', + ) + """ + + def testResourceRemoteInfoVercelRole(self): + """Test ResourceRemoteInfoVercelRole""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_wrike_user_type.py b/test/test_resource_remote_info_wrike_user_type.py new file mode 100644 index 0000000..e873b76 --- /dev/null +++ b/test/test_resource_remote_info_wrike_user_type.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_wrike_user_type import ResourceRemoteInfoWrikeUserType + +class TestResourceRemoteInfoWrikeUserType(unittest.TestCase): + """ResourceRemoteInfoWrikeUserType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoWrikeUserType: + """Test ResourceRemoteInfoWrikeUserType + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoWrikeUserType` + """ + model = ResourceRemoteInfoWrikeUserType() + if include_optional: + return ResourceRemoteInfoWrikeUserType( + user_type_id = 'KX7ZHLVGABCDEFGH' + ) + else: + return ResourceRemoteInfoWrikeUserType( + user_type_id = 'KX7ZHLVGABCDEFGH', + ) + """ + + def testResourceRemoteInfoWrikeUserType(self): + """Test ResourceRemoteInfoWrikeUserType""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_zoom_license.py b/test/test_resource_remote_info_zoom_license.py new file mode 100644 index 0000000..41ce9fd --- /dev/null +++ b/test/test_resource_remote_info_zoom_license.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_zoom_license import ResourceRemoteInfoZoomLicense + +class TestResourceRemoteInfoZoomLicense(unittest.TestCase): + """ResourceRemoteInfoZoomLicense unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoZoomLicense: + """Test ResourceRemoteInfoZoomLicense + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoZoomLicense` + """ + model = ResourceRemoteInfoZoomLicense() + if include_optional: + return ResourceRemoteInfoZoomLicense( + license_type = '2' + ) + else: + return ResourceRemoteInfoZoomLicense( + license_type = '2', + ) + """ + + def testResourceRemoteInfoZoomLicense(self): + """Test ResourceRemoteInfoZoomLicense""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_zoom_role.py b/test/test_resource_remote_info_zoom_role.py new file mode 100644 index 0000000..33f5258 --- /dev/null +++ b/test/test_resource_remote_info_zoom_role.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.resource_remote_info_zoom_role import ResourceRemoteInfoZoomRole + +class TestResourceRemoteInfoZoomRole(unittest.TestCase): + """ResourceRemoteInfoZoomRole unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoZoomRole: + """Test ResourceRemoteInfoZoomRole + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoZoomRole` + """ + model = ResourceRemoteInfoZoomRole() + if include_optional: + return ResourceRemoteInfoZoomRole( + role_id = '0' + ) + else: + return ResourceRemoteInfoZoomRole( + role_id = '0', + ) + """ + + def testResourceRemoteInfoZoomRole(self): + """Test ResourceRemoteInfoZoomRole""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_review_campaign_item_decision_info.py b/test/test_review_campaign_item_decision_info.py new file mode 100644 index 0000000..ef836ac --- /dev/null +++ b/test/test_review_campaign_item_decision_info.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.review_campaign_item_decision_info import ReviewCampaignItemDecisionInfo + +class TestReviewCampaignItemDecisionInfo(unittest.TestCase): + """ReviewCampaignItemDecisionInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ReviewCampaignItemDecisionInfo: + """Test ReviewCampaignItemDecisionInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ReviewCampaignItemDecisionInfo` + """ + model = ReviewCampaignItemDecisionInfo() + if include_optional: + return ReviewCampaignItemDecisionInfo( + campaign_item_review_id = '4b8f2c1a-9d3e-4f6a-8b1c-2e5d7a9f0c3b', + decision = 'APPROVED', + note = 'Access is still required for on-call.', + access_level_remote_id = 'arn:aws:iam::123456789012:role/ReadOnly', + new_reviewer_user_ids = [ + '' + ], + assignment_source = 'MANUAL' + ) + else: + return ReviewCampaignItemDecisionInfo( + campaign_item_review_id = '4b8f2c1a-9d3e-4f6a-8b1c-2e5d7a9f0c3b', + decision = 'APPROVED', + ) + """ + + def testReviewCampaignItemDecisionInfo(self): + """Test ReviewCampaignItemDecisionInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_review_campaign_items_info.py b/test/test_review_campaign_items_info.py new file mode 100644 index 0000000..ab92ac4 --- /dev/null +++ b/test/test_review_campaign_items_info.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.review_campaign_items_info import ReviewCampaignItemsInfo + +class TestReviewCampaignItemsInfo(unittest.TestCase): + """ReviewCampaignItemsInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ReviewCampaignItemsInfo: + """Test ReviewCampaignItemsInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ReviewCampaignItemsInfo` + """ + model = ReviewCampaignItemsInfo() + if include_optional: + return ReviewCampaignItemsInfo( + decisions = [ + opal_security.models.review_campaign_item_decision_info.ReviewCampaignItemDecisionInfo( + campaign_item_review_id = '4b8f2c1a-9d3e-4f6a-8b1c-2e5d7a9f0c3b', + decision = 'APPROVED', + note = 'Access is still required for on-call.', + access_level_remote_id = 'arn:aws:iam::123456789012:role/ReadOnly', + new_reviewer_user_ids = [ + '' + ], + assignment_source = null, ) + ] + ) + else: + return ReviewCampaignItemsInfo( + decisions = [ + opal_security.models.review_campaign_item_decision_info.ReviewCampaignItemDecisionInfo( + campaign_item_review_id = '4b8f2c1a-9d3e-4f6a-8b1c-2e5d7a9f0c3b', + decision = 'APPROVED', + note = 'Access is still required for on-call.', + access_level_remote_id = 'arn:aws:iam::123456789012:role/ReadOnly', + new_reviewer_user_ids = [ + '' + ], + assignment_source = null, ) + ], + ) + """ + + def testReviewCampaignItemsInfo(self): + """Test ReviewCampaignItemsInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_review_campaign_items_response.py b/test/test_review_campaign_items_response.py new file mode 100644 index 0000000..f80b71d --- /dev/null +++ b/test/test_review_campaign_items_response.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.review_campaign_items_response import ReviewCampaignItemsResponse + +class TestReviewCampaignItemsResponse(unittest.TestCase): + """ReviewCampaignItemsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ReviewCampaignItemsResponse: + """Test ReviewCampaignItemsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ReviewCampaignItemsResponse` + """ + model = ReviewCampaignItemsResponse() + if include_optional: + return ReviewCampaignItemsResponse( + reviews = [ + opal_security.models.campaign_item_review_result.CampaignItemReviewResult( + campaign_item_review_id = '4b8f2c1a-9d3e-4f6a-8b1c-2e5d7a9f0c3b', + decision = null, + note = '', + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_access_level_remote_id = '', + reassigned_to_reviewer_ids = [ + '' + ], ) + ] + ) + else: + return ReviewCampaignItemsResponse( + reviews = [ + opal_security.models.campaign_item_review_result.CampaignItemReviewResult( + campaign_item_review_id = '4b8f2c1a-9d3e-4f6a-8b1c-2e5d7a9f0c3b', + decision = null, + note = '', + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_access_level_remote_id = '', + reassigned_to_reviewer_ids = [ + '' + ], ) + ], + ) + """ + + def testReviewCampaignItemsResponse(self): + """Test ReviewCampaignItemsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reviewer_stage_escalation.py b/test/test_reviewer_stage_escalation.py new file mode 100644 index 0000000..af7be5e --- /dev/null +++ b/test/test_reviewer_stage_escalation.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.reviewer_stage_escalation import ReviewerStageEscalation + +class TestReviewerStageEscalation(unittest.TestCase): + """ReviewerStageEscalation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ReviewerStageEscalation: + """Test ReviewerStageEscalation + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ReviewerStageEscalation` + """ + model = ReviewerStageEscalation() + if include_optional: + return ReviewerStageEscalation( + delay_minutes = 60, + owner_ids = [ + '' + ], + user_ids = [ + '' + ] + ) + else: + return ReviewerStageEscalation( + delay_minutes = 60, + ) + """ + + def testReviewerStageEscalation(self): + """Test ReviewerStageEscalation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_role_assignment.py b/test/test_role_assignment.py new file mode 100644 index 0000000..bc21539 --- /dev/null +++ b/test/test_role_assignment.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.role_assignment import RoleAssignment + +class TestRoleAssignment(unittest.TestCase): + """RoleAssignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RoleAssignment: + """Test RoleAssignment + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RoleAssignment` + """ + model = RoleAssignment() + if include_optional: + return RoleAssignment( + id = '', + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + access_level = {access_level_name=AdminRole, access_level_remote_id=arn:aws:iam::590304332660:role/AdministratorAccess}, + expiration = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + granted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return RoleAssignment( + id = '', + entity_id = '', + entity_type = 'GROUP', + principal_id = '', + principal_type = 'GROUP', + ) + """ + + def testRoleAssignment(self): + """Test RoleAssignment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_role_assignment_entity_type_enum.py b/test/test_role_assignment_entity_type_enum.py new file mode 100644 index 0000000..d62ddb9 --- /dev/null +++ b/test/test_role_assignment_entity_type_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.role_assignment_entity_type_enum import RoleAssignmentEntityTypeEnum + +class TestRoleAssignmentEntityTypeEnum(unittest.TestCase): + """RoleAssignmentEntityTypeEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRoleAssignmentEntityTypeEnum(self): + """Test RoleAssignmentEntityTypeEnum""" + # inst = RoleAssignmentEntityTypeEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_role_assignments_api.py b/test/test_role_assignments_api.py new file mode 100644 index 0000000..726e111 --- /dev/null +++ b/test/test_role_assignments_api.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.api.role_assignments_api import RoleAssignmentsApi + + +class TestRoleAssignmentsApi(unittest.TestCase): + """RoleAssignmentsApi unit test stubs""" + + def setUp(self) -> None: + self.api = RoleAssignmentsApi() + + def tearDown(self) -> None: + pass + + def test_add_role_assignments(self) -> None: + """Test case for add_role_assignments + + Add role assignments + """ + pass + + def test_list_role_assignments(self) -> None: + """Test case for list_role_assignments + + List role assignments + """ + pass + + def test_remove_role_assignments(self) -> None: + """Test case for remove_role_assignments + + Remove role assignments + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_run_opal_query_request.py b/test/test_run_opal_query_request.py new file mode 100644 index 0000000..713b7ce --- /dev/null +++ b/test/test_run_opal_query_request.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.run_opal_query_request import RunOpalQueryRequest + +class TestRunOpalQueryRequest(unittest.TestCase): + """RunOpalQueryRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RunOpalQueryRequest: + """Test RunOpalQueryRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RunOpalQueryRequest` + """ + model = RunOpalQueryRequest() + if include_optional: + return RunOpalQueryRequest( + type = 'NODE', + query = opal_security.models.opal_access_path_query_body.OpalAccessPathQueryBody( + principal_filter = opal_security.models.access_entity_filters.AccessEntityFilters( + entity_types = [ + 'RESOURCE' + ], + entity_item_types = [ + 'OPAL_ROLE' + ], + entity_name = opal_security.models.entity_name_filter.EntityNameFilter( + string_match_type = 'CONTAINS', + string = 'engineering', ), + entity_description = opal_security.models.entity_description_filter.EntityDescriptionFilter( + string = 'production', + not = True, ), + entity_tag = opal_security.models.entity_tag_filter.EntityTagFilter( + key = 'team', + value = 'platform', + connection_id = '', ), + entity_tag_key = opal_security.models.entity_tag_key_filter.EntityTagKeyFilter( + keys = [Critical], ), + hr_idp_status = opal_security.models.idp_status_filter.IdpStatusFilter( + statuses = [ + 'ACTIVE' + ], + not = True, ), + entity_admin_owner = opal_security.models.entity_admin_filter.EntityAdminFilter( + owner_ids = [ + '' + ], + not = True, ), + entity_ids = [ + '' + ], + imported_from_app = [ + '' + ], + role_remote_ids = [ + '' + ], + role_names = [ + '' + ], + all_of = [ + opal_security.models.access_entity_filters.AccessEntityFilters( + any_of = [ + + ], + not = opal_security.models.not.not(), ) + ], + any_of = [ + + ], + not = opal_security.models.not.not(), ), + entitlement_filter = , + principal_access_filters = null, + entitlement_access_filters = null, + access_level_remote_ids = [ + '' + ], + access_level_names = [ + '' + ], + edge_filter = opal_security.models.opal_access_path_edge_filter.OpalAccessPathEdgeFilter( + direct_only = True, + access_duration_type = 'EXPIRING_ONLY', ), ), + first = 200, + after = '' + ) + else: + return RunOpalQueryRequest( + type = 'NODE', + ) + """ + + def testRunOpalQueryRequest(self): + """Test RunOpalQueryRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_service_users_api.py b/test/test_service_users_api.py new file mode 100644 index 0000000..979032f --- /dev/null +++ b/test/test_service_users_api.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.api.service_users_api import ServiceUsersApi + + +class TestServiceUsersApi(unittest.TestCase): + """ServiceUsersApi unit test stubs""" + + def setUp(self) -> None: + self.api = ServiceUsersApi() + + def tearDown(self) -> None: + pass + + def test_create_service_user(self) -> None: + """Test case for create_service_user + + Create service user + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_set_agent_kill_switch_request.py b/test/test_set_agent_kill_switch_request.py new file mode 100644 index 0000000..95a56c9 --- /dev/null +++ b/test/test_set_agent_kill_switch_request.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.set_agent_kill_switch_request import SetAgentKillSwitchRequest + +class TestSetAgentKillSwitchRequest(unittest.TestCase): + """SetAgentKillSwitchRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SetAgentKillSwitchRequest: + """Test SetAgentKillSwitchRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SetAgentKillSwitchRequest` + """ + model = SetAgentKillSwitchRequest() + if include_optional: + return SetAgentKillSwitchRequest( + active = True, + duration_minutes = 56, + reason = '' + ) + else: + return SetAgentKillSwitchRequest( + active = True, + ) + """ + + def testSetAgentKillSwitchRequest(self): + """Test SetAgentKillSwitchRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sort_direction_enum.py b/test/test_sort_direction_enum.py new file mode 100644 index 0000000..5edcbed --- /dev/null +++ b/test/test_sort_direction_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.sort_direction_enum import SortDirectionEnum + +class TestSortDirectionEnum(unittest.TestCase): + """SortDirectionEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSortDirectionEnum(self): + """Test SortDirectionEnum""" + # inst = SortDirectionEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stop_campaign_request.py b/test/test_stop_campaign_request.py new file mode 100644 index 0000000..90d430f --- /dev/null +++ b/test/test_stop_campaign_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.stop_campaign_request import StopCampaignRequest + +class TestStopCampaignRequest(unittest.TestCase): + """StopCampaignRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StopCampaignRequest: + """Test StopCampaignRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StopCampaignRequest` + """ + model = StopCampaignRequest() + if include_optional: + return StopCampaignRequest( + revoke_unreviewed = True + ) + else: + return StopCampaignRequest( + ) + """ + + def testStopCampaignRequest(self): + """Test StopCampaignRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_app_info.py b/test/test_update_app_info.py new file mode 100644 index 0000000..65748d9 --- /dev/null +++ b/test/test_update_app_info.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.update_app_info import UpdateAppInfo + +class TestUpdateAppInfo(unittest.TestCase): + """UpdateAppInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateAppInfo: + """Test UpdateAppInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateAppInfo` + """ + model = UpdateAppInfo() + if include_optional: + return UpdateAppInfo( + name = '', + description = '', + admin_owner_id = '', + visibility = 'GLOBAL', + visibility_group_ids = [ + '' + ], + import_visibility = 'GLOBAL', + custom_connector = opal_security.models.update_custom_connector_info.UpdateCustomConnectorInfo( + identifier = '', + base_url = '', + signing_secret = '', + tls_mode = True, + tls_ca_cert_content = '', + supports_groups = True, + supports_nested_resources = True, + supports_nested_groups = True, + supports_event_ingestion = True, + supports_idp = True, + idp_protocol = 'OPAL', ) + ) + else: + return UpdateAppInfo( + ) + """ + + def testUpdateAppInfo(self): + """Test UpdateAppInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_campaign_configuration_info.py b/test/test_update_campaign_configuration_info.py new file mode 100644 index 0000000..5d604a2 --- /dev/null +++ b/test/test_update_campaign_configuration_info.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.update_campaign_configuration_info import UpdateCampaignConfigurationInfo + +class TestUpdateCampaignConfigurationInfo(unittest.TestCase): + """UpdateCampaignConfigurationInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateCampaignConfigurationInfo: + """Test UpdateCampaignConfigurationInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateCampaignConfigurationInfo` + """ + model = UpdateCampaignConfigurationInfo() + if include_optional: + return UpdateCampaignConfigurationInfo( + allow_self_review = False, + send_reviewer_assignment_notification = True, + allow_reviewer_reassignment = False, + allow_reviewers_to_reduce_expiration = False, + start_date = '2026-07-02T00:00:00.000+00:00', + end_date = '2026-09-30T00:00:00.000+00:00', + timezone = 'America/Los_Angeles', + revoke_on = 'END', + reminder_schedule = [7, 3, 1], + reminder_include_manager = True, + require_reason_on_denial = False, + auto_stop_when_complete = False, + hide_ai_suggestions = False, + custom_start_message = 'Please complete your reviews by Friday.', + group_asset_visibility_policy = 'STRICT', + cron_expression = '0 9 1 * *', + recurring_duration_days = 14 + ) + else: + return UpdateCampaignConfigurationInfo( + ) + """ + + def testUpdateCampaignConfigurationInfo(self): + """Test UpdateCampaignConfigurationInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_campaign_info.py b/test/test_update_campaign_info.py new file mode 100644 index 0000000..c103d6a --- /dev/null +++ b/test/test_update_campaign_info.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.update_campaign_info import UpdateCampaignInfo + +class TestUpdateCampaignInfo(unittest.TestCase): + """UpdateCampaignInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateCampaignInfo: + """Test UpdateCampaignInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateCampaignInfo` + """ + model = UpdateCampaignInfo() + if include_optional: + return UpdateCampaignInfo( + name = 'Q3 Access Review (Updated)', + configuration = {end_date=2026-09-30T00:00:00.000+00:00, timezone=America/Los_Angeles, allow_self_review=false} + ) + else: + return UpdateCampaignInfo( + ) + """ + + def testUpdateCampaignInfo(self): + """Test UpdateCampaignInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_campaign_item_reviewers_info.py b/test/test_update_campaign_item_reviewers_info.py new file mode 100644 index 0000000..863f049 --- /dev/null +++ b/test/test_update_campaign_item_reviewers_info.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.update_campaign_item_reviewers_info import UpdateCampaignItemReviewersInfo + +class TestUpdateCampaignItemReviewersInfo(unittest.TestCase): + """UpdateCampaignItemReviewersInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateCampaignItemReviewersInfo: + """Test UpdateCampaignItemReviewersInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateCampaignItemReviewersInfo` + """ + model = UpdateCampaignItemReviewersInfo() + if include_optional: + return UpdateCampaignItemReviewersInfo( + to_assign = [ + opal_security.models.campaign_item_reviewer_assignment.CampaignItemReviewerAssignment( + campaign_item_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + reviewer_id = '32acc112-21ff-4669-91c2-21e27683eaa1', + assignment_source = null, ) + ], + to_unassign = [ + opal_security.models.campaign_item_reviewer_assignment.CampaignItemReviewerAssignment( + campaign_item_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + reviewer_id = '32acc112-21ff-4669-91c2-21e27683eaa1', + assignment_source = null, ) + ], + to_remove_sources = [ + opal_security.models.campaign_item_reviewer_source_removal.CampaignItemReviewerSourceRemoval( + campaign_item_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + assignment_source = 'MANUAL', ) + ] + ) + else: + return UpdateCampaignItemReviewersInfo( + ) + """ + + def testUpdateCampaignItemReviewersInfo(self): + """Test UpdateCampaignItemReviewersInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_campaign_item_reviewers_result.py b/test/test_update_campaign_item_reviewers_result.py new file mode 100644 index 0000000..18ff638 --- /dev/null +++ b/test/test_update_campaign_item_reviewers_result.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.update_campaign_item_reviewers_result import UpdateCampaignItemReviewersResult + +class TestUpdateCampaignItemReviewersResult(unittest.TestCase): + """UpdateCampaignItemReviewersResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateCampaignItemReviewersResult: + """Test UpdateCampaignItemReviewersResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateCampaignItemReviewersResult` + """ + model = UpdateCampaignItemReviewersResult() + if include_optional: + return UpdateCampaignItemReviewersResult( + reviews = [ + opal_security.models.campaign_item_review.CampaignItemReview( + campaign_item_review_id = '', + campaign_item_id = '', + reviewer_user_id = '', + assignment_source = 'MANUAL', + decision = null, + note = '', + updated_access_level_remote_id = '', + updated_duration_in_minutes = 56, + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + resolution_message = '', ) + ], + unassigned_preset_messages = [ + opal_security.models.campaign_item_unassigned_preset_message.CampaignItemUnassignedPresetMessage( + campaign_item_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + assignment_source = 'MANUAL', + message = '', ) + ] + ) + else: + return UpdateCampaignItemReviewersResult( + reviews = [ + opal_security.models.campaign_item_review.CampaignItemReview( + campaign_item_review_id = '', + campaign_item_id = '', + reviewer_user_id = '', + assignment_source = 'MANUAL', + decision = null, + note = '', + updated_access_level_remote_id = '', + updated_duration_in_minutes = 56, + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + resolution_message = '', ) + ], + unassigned_preset_messages = [ + opal_security.models.campaign_item_unassigned_preset_message.CampaignItemUnassignedPresetMessage( + campaign_item_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + assignment_source = 'MANUAL', + message = '', ) + ], + ) + """ + + def testUpdateCampaignItemReviewersResult(self): + """Test UpdateCampaignItemReviewersResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_custom_connector_info.py b/test/test_update_custom_connector_info.py new file mode 100644 index 0000000..3179828 --- /dev/null +++ b/test/test_update_custom_connector_info.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.update_custom_connector_info import UpdateCustomConnectorInfo + +class TestUpdateCustomConnectorInfo(unittest.TestCase): + """UpdateCustomConnectorInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateCustomConnectorInfo: + """Test UpdateCustomConnectorInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateCustomConnectorInfo` + """ + model = UpdateCustomConnectorInfo() + if include_optional: + return UpdateCustomConnectorInfo( + identifier = '', + base_url = '', + signing_secret = '', + tls_mode = True, + tls_ca_cert_content = '', + supports_groups = True, + supports_nested_resources = True, + supports_nested_groups = True, + supports_event_ingestion = True, + supports_idp = True, + idp_protocol = 'OPAL' + ) + else: + return UpdateCustomConnectorInfo( + ) + """ + + def testUpdateCustomConnectorInfo(self): + """Test UpdateCustomConnectorInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_opal_script_info.py b/test/test_update_opal_script_info.py new file mode 100644 index 0000000..e4918b1 --- /dev/null +++ b/test/test_update_opal_script_info.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.update_opal_script_info import UpdateOpalScriptInfo + +class TestUpdateOpalScriptInfo(unittest.TestCase): + """UpdateOpalScriptInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateOpalScriptInfo: + """Test UpdateOpalScriptInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateOpalScriptInfo` + """ + model = UpdateOpalScriptInfo() + if include_optional: + return UpdateOpalScriptInfo( + name = 'MFA check', + script = '' + ) + else: + return UpdateOpalScriptInfo( + ) + """ + + def testUpdateOpalScriptInfo(self): + """Test UpdateOpalScriptInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_paladin_info.py b/test/test_update_paladin_info.py new file mode 100644 index 0000000..4c7f39c --- /dev/null +++ b/test/test_update_paladin_info.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.update_paladin_info import UpdatePaladinInfo + +class TestUpdatePaladinInfo(unittest.TestCase): + """UpdatePaladinInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdatePaladinInfo: + """Test UpdatePaladinInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdatePaladinInfo` + """ + model = UpdatePaladinInfo() + if include_optional: + return UpdatePaladinInfo( + name = 'paladin-agent-1', + monitor_mode = True, + admin_view_only = True, + enabled_connectors = [ + 'NOTION' + ], + instructions = '' + ) + else: + return UpdatePaladinInfo( + name = 'paladin-agent-1', + ) + """ + + def testUpdatePaladinInfo(self): + """Test UpdatePaladinInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_request_template_info.py b/test/test_update_request_template_info.py new file mode 100644 index 0000000..855db97 --- /dev/null +++ b/test/test_update_request_template_info.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.update_request_template_info import UpdateRequestTemplateInfo + +class TestUpdateRequestTemplateInfo(unittest.TestCase): + """UpdateRequestTemplateInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateRequestTemplateInfo: + """Test UpdateRequestTemplateInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateRequestTemplateInfo` + """ + model = UpdateRequestTemplateInfo() + if include_optional: + return UpdateRequestTemplateInfo( + request_template_id = '7c86c85d-0651-43e2-a748-d69d658418e8', + name = '', + custom_fields = [ + opal_security.models.request_template_custom_field_input.RequestTemplateCustomFieldInput( + name = 'Why do you need this access?', + description = '', + type = 'SHORT_TEXT', + required = True, + metadata = opal_security.models.request_template_custom_field_metadata.RequestTemplateCustomFieldMetadata( + callout_data = opal_security.models.request_template_custom_field_callout_metadata.RequestTemplateCustomFieldCalloutMetadata( + severity = 'WARNING', + text = 'This role grants access to production customer data.', ), + multi_choice_data = opal_security.models.request_template_custom_field_multi_choice_metadata.RequestTemplateCustomFieldMultiChoiceMetadata( + options = [Incident response, Scheduled maintenance], ), ), ) + ] + ) + else: + return UpdateRequestTemplateInfo( + request_template_id = '7c86c85d-0651-43e2-a748-d69d658418e8', + ) + """ + + def testUpdateRequestTemplateInfo(self): + """Test UpdateRequestTemplateInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_resource_custom_access_level_info.py b/test/test_update_resource_custom_access_level_info.py new file mode 100644 index 0000000..7bad3ae --- /dev/null +++ b/test/test_update_resource_custom_access_level_info.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.update_resource_custom_access_level_info import UpdateResourceCustomAccessLevelInfo + +class TestUpdateResourceCustomAccessLevelInfo(unittest.TestCase): + """UpdateResourceCustomAccessLevelInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateResourceCustomAccessLevelInfo: + """Test UpdateResourceCustomAccessLevelInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateResourceCustomAccessLevelInfo` + """ + model = UpdateResourceCustomAccessLevelInfo() + if include_optional: + return UpdateResourceCustomAccessLevelInfo( + access_level_name = '', + policy = '', + requestable_by_default = True, + stackable_sensitivity_index = 56, + clear_stackable_sensitivity_index = True + ) + else: + return UpdateResourceCustomAccessLevelInfo( + ) + """ + + def testUpdateResourceCustomAccessLevelInfo(self): + """Test UpdateResourceCustomAccessLevelInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_user_info.py b/test/test_update_user_info.py new file mode 100644 index 0000000..d0518b7 --- /dev/null +++ b/test/test_update_user_info.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.update_user_info import UpdateUserInfo + +class TestUpdateUserInfo(unittest.TestCase): + """UpdateUserInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateUserInfo: + """Test UpdateUserInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateUserInfo` + """ + model = UpdateUserInfo() + if include_optional: + return UpdateUserInfo( + manager_id = '', + position = '' + ) + else: + return UpdateUserInfo( + ) + """ + + def testUpdateUserInfo(self): + """Test UpdateUserInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_access.py b/test/test_user_access.py new file mode 100644 index 0000000..3a7dbae --- /dev/null +++ b/test/test_user_access.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.user_access import UserAccess + +class TestUserAccess(unittest.TestCase): + """UserAccess unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserAccess: + """Test UserAccess + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserAccess` + """ + model = UserAccess() + if include_optional: + return UserAccess( + entity_type = 'RESOURCE', + entity_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3', + entity_name = 'AdministratorAccess', + description = 'Full access to all resources and settings.', + access_level = {access_level_name=Developer, access_level_remote_id=20}, + expiration_date = '2022-01-23T04:56:07.000+00:00', + has_direct_access = True, + num_access_paths = 2, + propagation_status = opal_security.models.propagation_status.PropagationStatus( + status = '[SUCCESS]', ) + ) + else: + return UserAccess( + entity_type = 'RESOURCE', + entity_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3', + entity_name = 'AdministratorAccess', + description = 'Full access to all resources and settings.', + access_level = {access_level_name=Developer, access_level_remote_id=20}, + has_direct_access = True, + num_access_paths = 2, + ) + """ + + def testUserAccess(self): + """Test UserAccess""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_access_entity_type_enum.py b/test/test_user_access_entity_type_enum.py new file mode 100644 index 0000000..a2731c8 --- /dev/null +++ b/test/test_user_access_entity_type_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.user_access_entity_type_enum import UserAccessEntityTypeEnum + +class TestUserAccessEntityTypeEnum(unittest.TestCase): + """UserAccessEntityTypeEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserAccessEntityTypeEnum(self): + """Test UserAccessEntityTypeEnum""" + # inst = UserAccessEntityTypeEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_access_level.py b/test/test_user_access_level.py new file mode 100644 index 0000000..b8178ab --- /dev/null +++ b/test/test_user_access_level.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.user_access_level import UserAccessLevel + +class TestUserAccessLevel(unittest.TestCase): + """UserAccessLevel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserAccessLevel: + """Test UserAccessLevel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserAccessLevel` + """ + model = UserAccessLevel() + if include_optional: + return UserAccessLevel( + access_level_name = 'Developer', + access_level_remote_id = '20' + ) + else: + return UserAccessLevel( + access_level_name = 'Developer', + access_level_remote_id = '20', + ) + """ + + def testUserAccessLevel(self): + """Test UserAccessLevel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_access_list.py b/test/test_user_access_list.py new file mode 100644 index 0000000..b4478ec --- /dev/null +++ b/test/test_user_access_list.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.user_access_list import UserAccessList + +class TestUserAccessList(unittest.TestCase): + """UserAccessList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserAccessList: + """Test UserAccessList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserAccessList` + """ + model = UserAccessList() + if include_optional: + return UserAccessList( + results = [ + {entity_type=RESOURCE, entity_id=1b978423-db0a-4037-a4cf-f79c60cb67b3, entity_name=AdministratorAccess, description=Full access to all resources and settings., access_level={access_level_name=AdminRole, access_level_remote_id=arn:aws:iam::590304332660:role/AdministratorAccess}, expiration_date=2022-01-23T04:56:07.000+00:00, has_direct_access=false, num_access_paths=2} + ], + next = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw', + previous = 'cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ' + ) + else: + return UserAccessList( + results = [ + {entity_type=RESOURCE, entity_id=1b978423-db0a-4037-a4cf-f79c60cb67b3, entity_name=AdministratorAccess, description=Full access to all resources and settings., access_level={access_level_name=AdminRole, access_level_remote_id=arn:aws:iam::590304332660:role/AdministratorAccess}, expiration_date=2022-01-23T04:56:07.000+00:00, has_direct_access=false, num_access_paths=2} + ], + ) + """ + + def testUserAccessList(self): + """Test UserAccessList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_product_role_enum.py b/test/test_user_product_role_enum.py new file mode 100644 index 0000000..31f2524 --- /dev/null +++ b/test/test_user_product_role_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.user_product_role_enum import UserProductRoleEnum + +class TestUserProductRoleEnum(unittest.TestCase): + """UserProductRoleEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserProductRoleEnum(self): + """Test UserProductRoleEnum""" + # inst = UserProductRoleEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_viewer_campaign_item.py b/test/test_viewer_campaign_item.py new file mode 100644 index 0000000..151a232 --- /dev/null +++ b/test/test_viewer_campaign_item.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.viewer_campaign_item import ViewerCampaignItem + +class TestViewerCampaignItem(unittest.TestCase): + """ViewerCampaignItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ViewerCampaignItem: + """Test ViewerCampaignItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ViewerCampaignItem` + """ + model = ViewerCampaignItem() + if include_optional: + return ViewerCampaignItem( + campaign_item_review_id = '', + decision = 'APPROVED', + note = '', + decided_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + pending_decision = 'APPROVED', + pending_note = '', + updated_access_level_remote_id = '', + pending_updated_access_level_remote_id = '', + updated_duration_in_minutes = 56, + pending_updated_duration_in_minutes = 56, + reassigned_to_reviewer_ids = [ + '' + ], + principal_id = '', + principal_type = 'GROUP', + entity_id = '', + entity_type = 'GROUP', + access_level_name = '', + access_level_remote_id = '', + granted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + role_assignment_id = '' + ) + else: + return ViewerCampaignItem( + campaign_item_review_id = '', + principal_id = '', + principal_type = 'GROUP', + entity_id = '', + entity_type = 'GROUP', + granted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + role_assignment_id = '', + ) + """ + + def testViewerCampaignItem(self): + """Test ViewerCampaignItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_viewer_campaign_item_review_decision_enum.py b/test/test_viewer_campaign_item_review_decision_enum.py new file mode 100644 index 0000000..d655e5b --- /dev/null +++ b/test/test_viewer_campaign_item_review_decision_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.viewer_campaign_item_review_decision_enum import ViewerCampaignItemReviewDecisionEnum + +class TestViewerCampaignItemReviewDecisionEnum(unittest.TestCase): + """ViewerCampaignItemReviewDecisionEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testViewerCampaignItemReviewDecisionEnum(self): + """Test ViewerCampaignItemReviewDecisionEnum""" + # inst = ViewerCampaignItemReviewDecisionEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_viewer_campaign_item_sort_field_enum.py b/test/test_viewer_campaign_item_sort_field_enum.py new file mode 100644 index 0000000..84b29f3 --- /dev/null +++ b/test/test_viewer_campaign_item_sort_field_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.viewer_campaign_item_sort_field_enum import ViewerCampaignItemSortFieldEnum + +class TestViewerCampaignItemSortFieldEnum(unittest.TestCase): + """ViewerCampaignItemSortFieldEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testViewerCampaignItemSortFieldEnum(self): + """Test ViewerCampaignItemSortFieldEnum""" + # inst = ViewerCampaignItemSortFieldEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_viewer_campaign_item_status_enum.py b/test/test_viewer_campaign_item_status_enum.py new file mode 100644 index 0000000..d823daf --- /dev/null +++ b/test/test_viewer_campaign_item_status_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal_security.models.viewer_campaign_item_status_enum import ViewerCampaignItemStatusEnum + +class TestViewerCampaignItemStatusEnum(unittest.TestCase): + """ViewerCampaignItemStatusEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testViewerCampaignItemStatusEnum(self): + """Test ViewerCampaignItemStatusEnum""" + # inst = ViewerCampaignItemStatusEnum() + +if __name__ == '__main__': + unittest.main()