From bc449589b0d84f1aaae3c998a55371659a84637d Mon Sep 17 00:00:00 2001 From: joset-opal Date: Sat, 6 Jun 2026 13:36:52 -0300 Subject: [PATCH] Regenerate Go SDK with custom access levels endpoints Copy updated OpenAPI spec from opal repo and regenerate. Adds 4 new endpoints for resource custom access level CRUD and associated model types (ResourceCustomAccessLevelResponse, CreateResourceCustomAccessLevelInfo, UpdateResourceCustomAccessLevelInfo, ResourceCustomAccessLevelList). Co-Authored-By: Claude Opus 4.6 (1M context) --- .openapi-generator/FILES | 102 + .openapi-generator/VERSION | 2 +- README.md | 71 +- api/openapi.yaml | 2459 +++++++++++++++-- api_access_rules.go | 119 + api_event_streams.go | 440 +++ api_groups.go | 19 + api_opal_queries.go | 134 + api_requests.go | 20 + api_resources.go | 450 +++ api_tokens.go | 256 ++ api_users.go | 18 + client.go | 9 + docs/AccessEntityFilters.md | 316 +++ docs/AccessRelationshipFilters.md | 82 + docs/AccessRulesAPI.md | 69 + docs/ApiAccessLevelEnum.md | 13 + docs/AppTypeEnum.md | 8 + docs/CreateEventStreamInfo.md | 124 + docs/CreateResourceCustomAccessLevelInfo.md | 129 + docs/EntityItemTypeEnum.md | 177 ++ docs/EntityNameFilter.md | 72 + docs/EntityTagFilter.md | 103 + docs/EventStream.md | 72 + docs/EventStreamConnection.md | 145 + docs/EventStreamConnectionTypeEnum.md | 11 + docs/EventStreamList.md | 51 + docs/EventStreamsAPI.md | 279 ++ docs/GroupRemoteInfo.md | 156 ++ docs/GroupRemoteInfoClickhouseRole.md | 51 + docs/GroupRemoteInfoGithubTeam.md | 26 + docs/GroupRemoteInfoGrafanaTeam.md | 51 + docs/GroupRemoteInfoTwingateGroup.md | 51 + docs/GroupRemoteInfoTwingateGroupSynced.md | 51 + docs/GroupRemoteInfoZendeskGroup.md | 51 + docs/GroupRemoteInfoZendeskOrganization.md | 51 + docs/GroupTypeEnum.md | 12 + docs/GroupsAPI.md | 6 +- docs/OpalNodeQuery.md | 129 + docs/OpalNodeQueryBody.md | 82 + docs/OpalNodeQueryResults.md | 93 + docs/OpalQueriesAPI.md | 75 + docs/OpalQueryResultEdge.md | 72 + docs/OpalQueryResultNode.md | 114 + docs/OpalQueryResults.md | 93 + docs/PaginatedAccessRulesList.md | 103 + docs/PaginatedTokensList.md | 103 + docs/RequestsAPI.md | 8 +- docs/ResourceCustomAccessLevelList.md | 51 + docs/ResourceCustomAccessLevelResponse.md | 244 ++ docs/ResourceRemoteInfo.md | 234 ++ docs/ResourceRemoteInfoClickhouseDatabase.md | 51 + docs/ResourceRemoteInfoClickhouseTable.md | 72 + docs/ResourceRemoteInfoDatadogRole.md | 51 + docs/ResourceRemoteInfoGithubOrgRole.md | 26 + docs/ResourceRemoteInfoGithubRepo.md | 26 + docs/ResourceRemoteInfoGrafanaDashboard.md | 51 + docs/ResourceRemoteInfoGrafanaFolder.md | 51 + docs/ResourceRemoteInfoGrafanaRole.md | 51 + docs/ResourceRemoteInfoNetsuiteRole.md | 51 + docs/ResourceRemoteInfoTwingateResource.md | 51 + docs/ResourceRemoteInfoZendeskRole.md | 51 + docs/ResourceTypeEnum.md | 20 + docs/ResourcesAPI.md | 302 +- docs/ReviewerStage.md | 28 +- docs/RuleDisjunction.md | 26 + docs/RunOpalQueryRequest.md | 129 + docs/StringMatchType.md | 17 + docs/Token.md | 208 ++ docs/TokensAPI.md | 150 + docs/UpdateEventStreamInfo.md | 134 + docs/UpdateGroupUserRequest.md | 2 +- docs/UpdateResourceCustomAccessLevelInfo.md | 160 ++ docs/UpdateResourceInfo.md | 26 + docs/UserAttributeSelector.md | 72 + docs/UsersAPI.md | 6 +- docs/WebhookApiKeyCredential.md | 114 + docs/WebhookApiKeyLocationEnum.md | 13 + docs/WebhookAuthTypeEnum.md | 15 + docs/WebhookCredentials.md | 129 + docs/WebhookHmacCredential.md | 93 + model_access_entity_filters.go | 535 ++++ model_access_relationship_filters.go | 195 ++ model_access_rule.go | 2 +- model_api_access_level_enum.go | 112 + model_app_type_enum.go | 8 + model_create_event_stream_info.go | 274 ++ ...reate_resource_custom_access_level_info.go | 283 ++ model_entity_item_type_enum.go | 276 ++ model_entity_name_filter.go | 199 ++ model_entity_tag_filter.go | 246 ++ model_event_stream.go | 199 ++ model_event_stream_connection.go | 304 ++ model_event_stream_connection_type_enum.go | 110 + model_event_stream_list.go | 169 ++ model_group.go | 4 + model_group_remote_info.go | 222 ++ model_group_remote_info_clickhouse_role.go | 170 ++ model_group_remote_info_github_team.go | 38 + model_group_remote_info_grafana_team.go | 170 ++ model_group_remote_info_twingate_group.go | 170 ++ ...group_remote_info_twingate_group_synced.go | 170 ++ model_group_remote_info_zendesk_group.go | 170 ++ ..._group_remote_info_zendesk_organization.go | 170 ++ model_group_type_enum.go | 12 + model_opal_node_query.go | 282 ++ model_opal_node_query_body.go | 193 ++ model_opal_node_query_results.go | 228 ++ model_opal_query_result_edge.go | 199 ++ model_opal_query_result_node.go | 259 ++ model_opal_query_results.go | 228 ++ model_paginated_access_rules_list.go | 245 ++ model_paginated_tokens_list.go | 245 ++ model_resource.go | 4 + model_resource_custom_access_level_list.go | 169 ++ ...l_resource_custom_access_level_response.go | 448 +++ model_resource_remote_info.go | 333 +++ ...esource_remote_info_clickhouse_database.go | 170 ++ ...l_resource_remote_info_clickhouse_table.go | 200 ++ model_resource_remote_info_datadog_role.go | 170 ++ model_resource_remote_info_github_org_role.go | 38 + model_resource_remote_info_github_repo.go | 38 + ..._resource_remote_info_grafana_dashboard.go | 170 ++ model_resource_remote_info_grafana_folder.go | 170 ++ model_resource_remote_info_grafana_role.go | 170 ++ model_resource_remote_info_netsuite_role.go | 170 ++ ..._resource_remote_info_twingate_resource.go | 170 ++ model_resource_remote_info_zendesk_role.go | 170 ++ model_resource_type_enum.go | 20 + model_reviewer_stage.go | 39 + model_rule_disjunction.go | 37 + model_run_opal_query_request.go | 282 ++ model_string_match_type.go | 116 + model_token.go | 396 +++ model_update_event_stream_info.go | 270 ++ model_update_group_user_request.go | 2 +- ...pdate_resource_custom_access_level_info.go | 309 +++ model_update_resource_info.go | 38 + model_user_attribute_selector.go | 198 ++ model_webhook_api_key_credential.go | 259 ++ model_webhook_api_key_location_enum.go | 112 + model_webhook_auth_type_enum.go | 114 + model_webhook_credentials.go | 283 ++ model_webhook_hmac_credential.go | 231 ++ 144 files changed, 20912 insertions(+), 304 deletions(-) create mode 100644 api_event_streams.go create mode 100644 api_opal_queries.go create mode 100644 api_tokens.go create mode 100644 docs/AccessEntityFilters.md create mode 100644 docs/AccessRelationshipFilters.md create mode 100644 docs/ApiAccessLevelEnum.md create mode 100644 docs/CreateEventStreamInfo.md create mode 100644 docs/CreateResourceCustomAccessLevelInfo.md create mode 100644 docs/EntityItemTypeEnum.md create mode 100644 docs/EntityNameFilter.md create mode 100644 docs/EntityTagFilter.md create mode 100644 docs/EventStream.md create mode 100644 docs/EventStreamConnection.md create mode 100644 docs/EventStreamConnectionTypeEnum.md create mode 100644 docs/EventStreamList.md create mode 100644 docs/EventStreamsAPI.md create mode 100644 docs/GroupRemoteInfoClickhouseRole.md create mode 100644 docs/GroupRemoteInfoGrafanaTeam.md create mode 100644 docs/GroupRemoteInfoTwingateGroup.md create mode 100644 docs/GroupRemoteInfoTwingateGroupSynced.md create mode 100644 docs/GroupRemoteInfoZendeskGroup.md create mode 100644 docs/GroupRemoteInfoZendeskOrganization.md create mode 100644 docs/OpalNodeQuery.md create mode 100644 docs/OpalNodeQueryBody.md create mode 100644 docs/OpalNodeQueryResults.md create mode 100644 docs/OpalQueriesAPI.md create mode 100644 docs/OpalQueryResultEdge.md create mode 100644 docs/OpalQueryResultNode.md create mode 100644 docs/OpalQueryResults.md create mode 100644 docs/PaginatedAccessRulesList.md create mode 100644 docs/PaginatedTokensList.md create mode 100644 docs/ResourceCustomAccessLevelList.md create mode 100644 docs/ResourceCustomAccessLevelResponse.md create mode 100644 docs/ResourceRemoteInfoClickhouseDatabase.md create mode 100644 docs/ResourceRemoteInfoClickhouseTable.md create mode 100644 docs/ResourceRemoteInfoDatadogRole.md create mode 100644 docs/ResourceRemoteInfoGrafanaDashboard.md create mode 100644 docs/ResourceRemoteInfoGrafanaFolder.md create mode 100644 docs/ResourceRemoteInfoGrafanaRole.md create mode 100644 docs/ResourceRemoteInfoNetsuiteRole.md create mode 100644 docs/ResourceRemoteInfoTwingateResource.md create mode 100644 docs/ResourceRemoteInfoZendeskRole.md create mode 100644 docs/RunOpalQueryRequest.md create mode 100644 docs/StringMatchType.md create mode 100644 docs/Token.md create mode 100644 docs/TokensAPI.md create mode 100644 docs/UpdateEventStreamInfo.md create mode 100644 docs/UpdateResourceCustomAccessLevelInfo.md create mode 100644 docs/UserAttributeSelector.md create mode 100644 docs/WebhookApiKeyCredential.md create mode 100644 docs/WebhookApiKeyLocationEnum.md create mode 100644 docs/WebhookAuthTypeEnum.md create mode 100644 docs/WebhookCredentials.md create mode 100644 docs/WebhookHmacCredential.md create mode 100644 model_access_entity_filters.go create mode 100644 model_access_relationship_filters.go create mode 100644 model_api_access_level_enum.go create mode 100644 model_create_event_stream_info.go create mode 100644 model_create_resource_custom_access_level_info.go create mode 100644 model_entity_item_type_enum.go create mode 100644 model_entity_name_filter.go create mode 100644 model_entity_tag_filter.go create mode 100644 model_event_stream.go create mode 100644 model_event_stream_connection.go create mode 100644 model_event_stream_connection_type_enum.go create mode 100644 model_event_stream_list.go create mode 100644 model_group_remote_info_clickhouse_role.go create mode 100644 model_group_remote_info_grafana_team.go create mode 100644 model_group_remote_info_twingate_group.go create mode 100644 model_group_remote_info_twingate_group_synced.go create mode 100644 model_group_remote_info_zendesk_group.go create mode 100644 model_group_remote_info_zendesk_organization.go create mode 100644 model_opal_node_query.go create mode 100644 model_opal_node_query_body.go create mode 100644 model_opal_node_query_results.go create mode 100644 model_opal_query_result_edge.go create mode 100644 model_opal_query_result_node.go create mode 100644 model_opal_query_results.go create mode 100644 model_paginated_access_rules_list.go create mode 100644 model_paginated_tokens_list.go create mode 100644 model_resource_custom_access_level_list.go create mode 100644 model_resource_custom_access_level_response.go create mode 100644 model_resource_remote_info_clickhouse_database.go create mode 100644 model_resource_remote_info_clickhouse_table.go create mode 100644 model_resource_remote_info_datadog_role.go create mode 100644 model_resource_remote_info_grafana_dashboard.go create mode 100644 model_resource_remote_info_grafana_folder.go create mode 100644 model_resource_remote_info_grafana_role.go create mode 100644 model_resource_remote_info_netsuite_role.go create mode 100644 model_resource_remote_info_twingate_resource.go create mode 100644 model_resource_remote_info_zendesk_role.go create mode 100644 model_run_opal_query_request.go create mode 100644 model_string_match_type.go create mode 100644 model_token.go create mode 100644 model_update_event_stream_info.go create mode 100644 model_update_resource_custom_access_level_info.go create mode 100644 model_user_attribute_selector.go create mode 100644 model_webhook_api_key_credential.go create mode 100644 model_webhook_api_key_location_enum.go create mode 100644 model_webhook_auth_type_enum.go create mode 100644 model_webhook_credentials.go create mode 100644 model_webhook_hmac_credential.go diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 24a3c4a..164aa41 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -4,6 +4,7 @@ api_apps.go api_bundles.go api_configuration_templates.go api_delegations.go +api_event_streams.go api_events.go api_group_bindings.go api_groups.go @@ -11,17 +12,21 @@ api_idp_group_mappings.go api_message_channels.go api_non_human_identities.go api_on_call_schedules.go +api_opal_queries.go api_owners.go api_requests.go api_resources.go api_sessions.go api_tags.go +api_tokens.go api_uars.go api_users.go client.go configuration.go docs/Access.md +docs/AccessEntityFilters.md docs/AccessList.md +docs/AccessRelationshipFilters.md docs/AccessRule.md docs/AccessRulesAPI.md docs/AddBundleGroupRequest.md @@ -30,6 +35,7 @@ docs/AddGroupResourceRequest.md docs/AddGroupUserRequest.md docs/AddResourceNhiRequest.md docs/AddResourceUserRequest.md +docs/ApiAccessLevelEnum.md docs/App.md docs/AppTypeEnum.md docs/AppValidation.md @@ -51,6 +57,7 @@ docs/ConfigurationTemplatesAPI.md docs/CreateBundleInfo.md docs/CreateConfigurationTemplateInfo.md docs/CreateDelegationRequest.md +docs/CreateEventStreamInfo.md docs/CreateGroupBindingInfo.md docs/CreateGroupBindingInfoGroupsInner.md docs/CreateGroupInfo.md @@ -66,14 +73,23 @@ docs/CreateRequestInfoCustomMetadataInner.md docs/CreateRequestInfoGroupsInner.md docs/CreateRequestInfoResourcesInner.md docs/CreateRequestInfoSupportTicket.md +docs/CreateResourceCustomAccessLevelInfo.md docs/CreateResourceInfo.md docs/CreateTagInfo.md docs/CreateUARInfo.md docs/Delegation.md docs/DelegationsAPI.md docs/DenyRequestRequest.md +docs/EntityItemTypeEnum.md +docs/EntityNameFilter.md +docs/EntityTagFilter.md docs/EntityTypeEnum.md docs/Event.md +docs/EventStream.md +docs/EventStreamConnection.md +docs/EventStreamConnectionTypeEnum.md +docs/EventStreamList.md +docs/EventStreamsAPI.md docs/EventsAPI.md docs/GetResourceUser200Response.md docs/Group.md @@ -88,6 +104,7 @@ docs/GroupRemoteInfoActiveDirectoryGroup.md docs/GroupRemoteInfoAwsSsoGroup.md docs/GroupRemoteInfoAzureAdMicrosoft365Group.md docs/GroupRemoteInfoAzureAdSecurityGroup.md +docs/GroupRemoteInfoClickhouseRole.md docs/GroupRemoteInfoConnectorGroup.md docs/GroupRemoteInfoDatabricksAccountGroup.md docs/GroupRemoteInfoDevinGroup.md @@ -96,6 +113,7 @@ docs/GroupRemoteInfoGithubEnterpriseTeam.md docs/GroupRemoteInfoGithubTeam.md docs/GroupRemoteInfoGitlabGroup.md docs/GroupRemoteInfoGoogleGroup.md +docs/GroupRemoteInfoGrafanaTeam.md docs/GroupRemoteInfoIncidentioOnCallSchedule.md docs/GroupRemoteInfoLdapGroup.md docs/GroupRemoteInfoOktaGroup.md @@ -104,7 +122,11 @@ docs/GroupRemoteInfoPagerdutyOnCallSchedule.md docs/GroupRemoteInfoRootlyOnCallSchedule.md docs/GroupRemoteInfoSnowflakeRole.md docs/GroupRemoteInfoTailscaleGroup.md +docs/GroupRemoteInfoTwingateGroup.md +docs/GroupRemoteInfoTwingateGroupSynced.md docs/GroupRemoteInfoWorkdayUserSecurityGroup.md +docs/GroupRemoteInfoZendeskGroup.md +docs/GroupRemoteInfoZendeskOrganization.md docs/GroupResource.md docs/GroupResourceList.md docs/GroupTypeEnum.md @@ -126,9 +148,17 @@ docs/OnCallScheduleIDList.md docs/OnCallScheduleList.md docs/OnCallScheduleProviderEnum.md docs/OnCallSchedulesAPI.md +docs/OpalNodeQuery.md +docs/OpalNodeQueryBody.md +docs/OpalNodeQueryResults.md +docs/OpalQueriesAPI.md +docs/OpalQueryResultEdge.md +docs/OpalQueryResultNode.md +docs/OpalQueryResults.md docs/Owner.md docs/OwnersAPI.md docs/PageInfo.md +docs/PaginatedAccessRulesList.md docs/PaginatedAssignedRequestList.md docs/PaginatedBundleGroupList.md docs/PaginatedBundleList.md @@ -142,6 +172,7 @@ docs/PaginatedOwnersList.md docs/PaginatedRemoteUsersList.md docs/PaginatedResourcesList.md docs/PaginatedTagsList.md +docs/PaginatedTokensList.md docs/PaginatedUARsList.md docs/PaginatedUsersList.md docs/PropagationStatus.md @@ -170,6 +201,8 @@ docs/Resource.md docs/ResourceAccessLevel.md docs/ResourceAccessUser.md docs/ResourceAccessUserList.md +docs/ResourceCustomAccessLevelList.md +docs/ResourceCustomAccessLevelResponse.md docs/ResourceNHI.md docs/ResourceRemoteInfo.md docs/ResourceRemoteInfoAnthropicWorkspace.md @@ -194,10 +227,13 @@ docs/ResourceRemoteInfoAzureStorageContainer.md docs/ResourceRemoteInfoAzureSubscription.md docs/ResourceRemoteInfoAzureUserAssignedManagedIdentity.md docs/ResourceRemoteInfoAzureVirtualMachine.md +docs/ResourceRemoteInfoClickhouseDatabase.md +docs/ResourceRemoteInfoClickhouseTable.md docs/ResourceRemoteInfoCoupaRole.md docs/ResourceRemoteInfoCursorOrganization.md docs/ResourceRemoteInfoCustomConnector.md docs/ResourceRemoteInfoDatabricksAccountServicePrincipal.md +docs/ResourceRemoteInfoDatadogRole.md docs/ResourceRemoteInfoDatastaxAstraRole.md docs/ResourceRemoteInfoDevinOrganization.md docs/ResourceRemoteInfoDevinRole.md @@ -217,7 +253,11 @@ docs/ResourceRemoteInfoGithubOrgRole.md docs/ResourceRemoteInfoGithubRepo.md docs/ResourceRemoteInfoGitlabProject.md docs/ResourceRemoteInfoGoogleWorkspaceRole.md +docs/ResourceRemoteInfoGrafanaDashboard.md +docs/ResourceRemoteInfoGrafanaFolder.md +docs/ResourceRemoteInfoGrafanaRole.md docs/ResourceRemoteInfoIlevelAdvancedRole.md +docs/ResourceRemoteInfoNetsuiteRole.md docs/ResourceRemoteInfoOktaApp.md docs/ResourceRemoteInfoOktaCustomRole.md docs/ResourceRemoteInfoOktaStandardRole.md @@ -233,7 +273,9 @@ docs/ResourceRemoteInfoSnowflakeSchema.md docs/ResourceRemoteInfoSnowflakeTable.md docs/ResourceRemoteInfoTailscaleSsh.md docs/ResourceRemoteInfoTeleportRole.md +docs/ResourceRemoteInfoTwingateResource.md docs/ResourceRemoteInfoWorkdayRole.md +docs/ResourceRemoteInfoZendeskRole.md docs/ResourceTypeEnum.md docs/ResourceUser.md docs/ResourceUserAccessStatus.md @@ -250,11 +292,13 @@ docs/RolePermissionTargetTypeEnum.md docs/RuleClauses.md docs/RuleConjunction.md docs/RuleDisjunction.md +docs/RunOpalQueryRequest.md docs/ScopedRolePermission.md docs/ScopedRolePermissionList.md docs/Session.md docs/SessionsAPI.md docs/SessionsList.md +docs/StringMatchType.md docs/SubEvent.md docs/SyncError.md docs/SyncErrorList.md @@ -267,12 +311,15 @@ docs/TagsList.md docs/ThirdPartyProviderEnum.md docs/TicketPropagationConfiguration.md docs/TicketingProviderEnum.md +docs/Token.md +docs/TokensAPI.md docs/UAR.md docs/UARReviewerAssignmentPolicyEnum.md docs/UARScope.md docs/UarsAPI.md docs/UpdateAccessRuleInfo.md docs/UpdateConfigurationTemplateInfo.md +docs/UpdateEventStreamInfo.md docs/UpdateGroupBindingInfo.md docs/UpdateGroupBindingInfoList.md docs/UpdateGroupInfo.md @@ -283,19 +330,28 @@ docs/UpdateIdpGroupMappingsRequest.md docs/UpdateIdpGroupMappingsRequestMappingsInner.md docs/UpdateOwnerInfo.md docs/UpdateOwnerInfoList.md +docs/UpdateResourceCustomAccessLevelInfo.md docs/UpdateResourceInfo.md docs/UpdateResourceInfoList.md docs/UpdateResourceUserRequest.md docs/User.md +docs/UserAttributeSelector.md docs/UserHrIdpStatusEnum.md docs/UserIDList.md docs/UserList.md docs/UsersAPI.md docs/VisibilityInfo.md docs/VisibilityTypeEnum.md +docs/WebhookApiKeyCredential.md +docs/WebhookApiKeyLocationEnum.md +docs/WebhookAuthTypeEnum.md +docs/WebhookCredentials.md +docs/WebhookHmacCredential.md go.sum model_access.go +model_access_entity_filters.go model_access_list.go +model_access_relationship_filters.go model_access_rule.go model_add_bundle_group_request.go model_add_bundle_resource_request.go @@ -303,6 +359,7 @@ model_add_group_resource_request.go model_add_group_user_request.go model_add_resource_nhi_request.go model_add_resource_user_request.go +model_api_access_level_enum.go model_app.go model_app_type_enum.go model_app_validation.go @@ -321,6 +378,7 @@ model_configuration_template.go model_create_bundle_info.go model_create_configuration_template_info.go model_create_delegation_request.go +model_create_event_stream_info.go model_create_group_binding_info.go model_create_group_binding_info_groups_inner.go model_create_group_info.go @@ -336,13 +394,21 @@ model_create_request_info_custom_metadata_inner.go model_create_request_info_groups_inner.go model_create_request_info_resources_inner.go model_create_request_info_support_ticket.go +model_create_resource_custom_access_level_info.go model_create_resource_info.go model_create_tag_info.go model_create_uar_info.go model_delegation.go model_deny_request_request.go +model_entity_item_type_enum.go +model_entity_name_filter.go +model_entity_tag_filter.go model_entity_type_enum.go model_event.go +model_event_stream.go +model_event_stream_connection.go +model_event_stream_connection_type_enum.go +model_event_stream_list.go model_get_resource_user_200_response.go model_group.go model_group_access_level.go @@ -355,6 +421,7 @@ model_group_remote_info_active_directory_group.go model_group_remote_info_aws_sso_group.go model_group_remote_info_azure_ad_microsoft_365_group.go model_group_remote_info_azure_ad_security_group.go +model_group_remote_info_clickhouse_role.go model_group_remote_info_connector_group.go model_group_remote_info_databricks_account_group.go model_group_remote_info_devin_group.go @@ -363,6 +430,7 @@ model_group_remote_info_github_enterprise_team.go model_group_remote_info_github_team.go model_group_remote_info_gitlab_group.go model_group_remote_info_google_group.go +model_group_remote_info_grafana_team.go model_group_remote_info_incidentio_on_call_schedule.go model_group_remote_info_ldap_group.go model_group_remote_info_okta_group.go @@ -371,7 +439,11 @@ model_group_remote_info_pagerduty_on_call_schedule.go model_group_remote_info_rootly_on_call_schedule.go model_group_remote_info_snowflake_role.go model_group_remote_info_tailscale_group.go +model_group_remote_info_twingate_group.go +model_group_remote_info_twingate_group_synced.go model_group_remote_info_workday_user_security_group.go +model_group_remote_info_zendesk_group.go +model_group_remote_info_zendesk_organization.go model_group_resource.go model_group_resource_list.go model_group_type_enum.go @@ -388,8 +460,15 @@ model_on_call_schedule.go model_on_call_schedule_id_list.go model_on_call_schedule_list.go model_on_call_schedule_provider_enum.go +model_opal_node_query.go +model_opal_node_query_body.go +model_opal_node_query_results.go +model_opal_query_result_edge.go +model_opal_query_result_node.go +model_opal_query_results.go model_owner.go model_page_info.go +model_paginated_access_rules_list.go model_paginated_assigned_request_list.go model_paginated_bundle_group_list.go model_paginated_bundle_list.go @@ -403,6 +482,7 @@ model_paginated_owners_list.go model_paginated_remote_users_list.go model_paginated_resources_list.go model_paginated_tags_list.go +model_paginated_tokens_list.go model_paginated_uars_list.go model_paginated_users_list.go model_propagation_status.go @@ -430,6 +510,8 @@ model_resource.go model_resource_access_level.go model_resource_access_user.go model_resource_access_user_list.go +model_resource_custom_access_level_list.go +model_resource_custom_access_level_response.go model_resource_nhi.go model_resource_remote_info.go model_resource_remote_info_anthropic_workspace.go @@ -454,10 +536,13 @@ model_resource_remote_info_azure_storage_container.go model_resource_remote_info_azure_subscription.go model_resource_remote_info_azure_user_assigned_managed_identity.go model_resource_remote_info_azure_virtual_machine.go +model_resource_remote_info_clickhouse_database.go +model_resource_remote_info_clickhouse_table.go model_resource_remote_info_coupa_role.go model_resource_remote_info_cursor_organization.go model_resource_remote_info_custom_connector.go model_resource_remote_info_databricks_account_service_principal.go +model_resource_remote_info_datadog_role.go model_resource_remote_info_datastax_astra_role.go model_resource_remote_info_devin_organization.go model_resource_remote_info_devin_role.go @@ -477,7 +562,11 @@ model_resource_remote_info_github_org_role.go model_resource_remote_info_github_repo.go model_resource_remote_info_gitlab_project.go model_resource_remote_info_google_workspace_role.go +model_resource_remote_info_grafana_dashboard.go +model_resource_remote_info_grafana_folder.go +model_resource_remote_info_grafana_role.go model_resource_remote_info_ilevel_advanced_role.go +model_resource_remote_info_netsuite_role.go model_resource_remote_info_okta_app.go model_resource_remote_info_okta_custom_role.go model_resource_remote_info_okta_standard_role.go @@ -493,7 +582,9 @@ model_resource_remote_info_snowflake_schema.go model_resource_remote_info_snowflake_table.go model_resource_remote_info_tailscale_ssh.go model_resource_remote_info_teleport_role.go +model_resource_remote_info_twingate_resource.go model_resource_remote_info_workday_role.go +model_resource_remote_info_zendesk_role.go model_resource_type_enum.go model_resource_user.go model_resource_user_access_status.go @@ -509,10 +600,12 @@ model_role_permission_target_type_enum.go model_rule_clauses.go model_rule_conjunction.go model_rule_disjunction.go +model_run_opal_query_request.go model_scoped_role_permission.go model_scoped_role_permission_list.go model_session.go model_sessions_list.go +model_string_match_type.go model_sub_event.go model_sync_error.go model_sync_error_list.go @@ -524,11 +617,13 @@ model_tags_list.go model_third_party_provider_enum.go model_ticket_propagation_configuration.go model_ticketing_provider_enum.go +model_token.go model_uar.go model_uar_reviewer_assignment_policy_enum.go model_uar_scope.go model_update_access_rule_info.go model_update_configuration_template_info.go +model_update_event_stream_info.go model_update_group_binding_info.go model_update_group_binding_info_list.go model_update_group_info.go @@ -539,14 +634,21 @@ model_update_idp_group_mappings_request.go model_update_idp_group_mappings_request_mappings_inner.go model_update_owner_info.go model_update_owner_info_list.go +model_update_resource_custom_access_level_info.go model_update_resource_info.go model_update_resource_info_list.go model_update_resource_user_request.go model_user.go +model_user_attribute_selector.go model_user_hr_idp_status_enum.go model_user_id_list.go model_user_list.go model_visibility_info.go model_visibility_type_enum.go +model_webhook_api_key_credential.go +model_webhook_api_key_location_enum.go +model_webhook_auth_type_enum.go +model_webhook_credentials.go +model_webhook_hmac_credential.go response.go utils.go diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 3821090..696eaac 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.19.0 +7.22.0 diff --git a/README.md b/README.md index e95ad90..39af8c7 100644 --- a/README.md +++ b/README.md @@ -7,20 +7,13 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0 - Package version: 1.0.0 -- Generator version: 7.19.0 +- Generator version: 7.22.0 - Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit [https://www.opal.dev/](https://www.opal.dev/) ## Installation -Install the following dependencies: - -```sh -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: +Import the package in a go file in your project and run `go mod tidy`: ```go import opal "github.com/opalsecurity/opal-go" @@ -81,6 +74,7 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AccessRulesAPI* | [**CreateAccessRule**](docs/AccessRulesAPI.md#createaccessrule) | **Post** /access-rules | *AccessRulesAPI* | [**GetAccessRule**](docs/AccessRulesAPI.md#getaccessrule) | **Get** /access-rules/{access_rule_id} | +*AccessRulesAPI* | [**GetAccessRules**](docs/AccessRulesAPI.md#getaccessrules) | **Get** /access-rules | *AccessRulesAPI* | [**UpdateAccessRule**](docs/AccessRulesAPI.md#updateaccessrule) | **Put** /access-rules/{access_rule_id} | *AppsAPI* | [**GetApp**](docs/AppsAPI.md#getapp) | **Get** /apps/{app_id} | Get app by ID *AppsAPI* | [**GetApps**](docs/AppsAPI.md#getapps) | **Get** /apps | Get apps @@ -106,6 +100,10 @@ Class | Method | HTTP request | Description *DelegationsAPI* | [**DeleteDelegation**](docs/DelegationsAPI.md#deletedelegation) | **Delete** /delegations/{delegation_id} | *DelegationsAPI* | [**GetDelegation**](docs/DelegationsAPI.md#getdelegation) | **Get** /delegations/{delegation_id} | Get delegation by ID *DelegationsAPI* | [**GetDelegations**](docs/DelegationsAPI.md#getdelegations) | **Get** /delegations | Get delegations +*EventStreamsAPI* | [**CreateEventStream**](docs/EventStreamsAPI.md#createeventstream) | **Post** /event-streams | Create event stream +*EventStreamsAPI* | [**DeleteEventStream**](docs/EventStreamsAPI.md#deleteeventstream) | **Delete** /event-streams/{event_stream_id} | Delete event stream +*EventStreamsAPI* | [**GetEventStreams**](docs/EventStreamsAPI.md#geteventstreams) | **Get** /event-streams | Get event streams +*EventStreamsAPI* | [**UpdateEventStream**](docs/EventStreamsAPI.md#updateeventstream) | **Put** /event-streams/{event_stream_id} | Update event stream *EventsAPI* | [**Events**](docs/EventsAPI.md#events) | **Get** /events | *EventsAPI* | [**GetEvent**](docs/EventsAPI.md#getevent) | **Get** /events/{event_id} | Get event by ID *GroupBindingsAPI* | [**CreateGroupBinding**](docs/GroupBindingsAPI.md#creategroupbinding) | **Post** /group-bindings | @@ -153,6 +151,7 @@ Class | Method | HTTP request | Description *OnCallSchedulesAPI* | [**CreateOnCallSchedule**](docs/OnCallSchedulesAPI.md#createoncallschedule) | **Post** /on-call-schedules | *OnCallSchedulesAPI* | [**GetOnCallSchedule**](docs/OnCallSchedulesAPI.md#getoncallschedule) | **Get** /on-call-schedules/{on_call_schedule_id} | Get on call schedule by ID *OnCallSchedulesAPI* | [**GetOnCallSchedules**](docs/OnCallSchedulesAPI.md#getoncallschedules) | **Get** /on-call-schedules | Get on call schedules +*OpalQueriesAPI* | [**RunOpalQuery**](docs/OpalQueriesAPI.md#runopalquery) | **Post** /queries/run | Run an ad-hoc OpalQuery *OwnersAPI* | [**CreateOwner**](docs/OwnersAPI.md#createowner) | **Post** /owners | *OwnersAPI* | [**DeleteOwner**](docs/OwnersAPI.md#deleteowner) | **Delete** /owners/{owner_id} | *OwnersAPI* | [**GetOwner**](docs/OwnersAPI.md#getowner) | **Get** /owners/{owner_id} | Get owner by ID @@ -172,10 +171,13 @@ Class | Method | HTTP request | Description *ResourcesAPI* | [**AddResourceNhi**](docs/ResourcesAPI.md#addresourcenhi) | **Post** /resources/{resource_id}/non-human-identities/{non_human_identity_id} | *ResourcesAPI* | [**AddResourceUser**](docs/ResourcesAPI.md#addresourceuser) | **Post** /resources/{resource_id}/users/{user_id} | *ResourcesAPI* | [**CreateResource**](docs/ResourcesAPI.md#createresource) | **Post** /resources | +*ResourcesAPI* | [**CreateResourceCustomAccessLevel**](docs/ResourcesAPI.md#createresourcecustomaccesslevel) | **Post** /resources/{resource_id}/custom-access-levels | *ResourcesAPI* | [**DeleteResource**](docs/ResourcesAPI.md#deleteresource) | **Delete** /resources/{resource_id} | +*ResourcesAPI* | [**DeleteResourceCustomAccessLevel**](docs/ResourcesAPI.md#deleteresourcecustomaccesslevel) | **Delete** /resources/{resource_id}/custom-access-levels/{access_level_remote_id} | *ResourcesAPI* | [**DeleteResourceNhi**](docs/ResourcesAPI.md#deleteresourcenhi) | **Delete** /resources/{resource_id}/non-human-identities/{non_human_identity_id} | *ResourcesAPI* | [**DeleteResourceUser**](docs/ResourcesAPI.md#deleteresourceuser) | **Delete** /resources/{resource_id}/users/{user_id} | *ResourcesAPI* | [**GetResource**](docs/ResourcesAPI.md#getresource) | **Get** /resources/{resource_id} | Get resource by ID +*ResourcesAPI* | [**GetResourceCustomAccessLevels**](docs/ResourcesAPI.md#getresourcecustomaccesslevels) | **Get** /resources/{resource_id}/custom-access-levels | *ResourcesAPI* | [**GetResourceGroups**](docs/ResourcesAPI.md#getresourcegroups) | **Get** /resources/{resource_id}/groups | *ResourcesAPI* | [**GetResourceMessageChannels**](docs/ResourcesAPI.md#getresourcemessagechannels) | **Get** /resources/{resource_id}/message-channels | *ResourcesAPI* | [**GetResourceNhis**](docs/ResourcesAPI.md#getresourcenhis) | **Get** /resources/{resource_id}/non-human-identities | @@ -194,6 +196,7 @@ Class | Method | HTTP request | Description *ResourcesAPI* | [**SetResourceReviewers**](docs/ResourcesAPI.md#setresourcereviewers) | **Put** /resources/{resource_id}/reviewers | *ResourcesAPI* | [**SetResourceScopedRolePermissions**](docs/ResourcesAPI.md#setresourcescopedrolepermissions) | **Put** /resources/{resource_id}/scoped-role-permissions | *ResourcesAPI* | [**SetResourceVisibility**](docs/ResourcesAPI.md#setresourcevisibility) | **Put** /resources/{resource_id}/visibility | +*ResourcesAPI* | [**UpdateResourceCustomAccessLevel**](docs/ResourcesAPI.md#updateresourcecustomaccesslevel) | **Patch** /resources/{resource_id}/custom-access-levels/{access_level_remote_id} | *ResourcesAPI* | [**UpdateResourceUser**](docs/ResourcesAPI.md#updateresourceuser) | **Put** /resources/{resource_id}/users/{user_id} | *ResourcesAPI* | [**UpdateResources**](docs/ResourcesAPI.md#updateresources) | **Put** /resources | *SessionsAPI* | [**Sessions**](docs/SessionsAPI.md#sessions) | **Get** /sessions | @@ -208,6 +211,8 @@ Class | Method | HTTP request | Description *TagsAPI* | [**RemoveGroupTag**](docs/TagsAPI.md#removegrouptag) | **Delete** /tags/{tag_id}/groups/{group_id} | *TagsAPI* | [**RemoveResourceTag**](docs/TagsAPI.md#removeresourcetag) | **Delete** /tags/{tag_id}/resources/{resource_id} | *TagsAPI* | [**RemoveUserTag**](docs/TagsAPI.md#removeusertag) | **Delete** /tags/{tag_id}/users/{user_id} | +*TokensAPI* | [**DeleteToken**](docs/TokensAPI.md#deletetoken) | **Delete** /tokens/{token_id} | Delete token +*TokensAPI* | [**GetTokens**](docs/TokensAPI.md#gettokens) | **Get** /tokens | Get tokens *UarsAPI* | [**CreateUar**](docs/UarsAPI.md#createuar) | **Post** /uar | *UarsAPI* | [**GetUARs**](docs/UarsAPI.md#getuars) | **Get** /uars | *UarsAPI* | [**GetUar**](docs/UarsAPI.md#getuar) | **Get** /uar/{uar_id} | @@ -220,7 +225,9 @@ Class | Method | HTTP request | Description ## Documentation For Models - [Access](docs/Access.md) + - [AccessEntityFilters](docs/AccessEntityFilters.md) - [AccessList](docs/AccessList.md) + - [AccessRelationshipFilters](docs/AccessRelationshipFilters.md) - [AccessRule](docs/AccessRule.md) - [AddBundleGroupRequest](docs/AddBundleGroupRequest.md) - [AddBundleResourceRequest](docs/AddBundleResourceRequest.md) @@ -228,6 +235,7 @@ Class | Method | HTTP request | Description - [AddGroupUserRequest](docs/AddGroupUserRequest.md) - [AddResourceNhiRequest](docs/AddResourceNhiRequest.md) - [AddResourceUserRequest](docs/AddResourceUserRequest.md) + - [ApiAccessLevelEnum](docs/ApiAccessLevelEnum.md) - [App](docs/App.md) - [AppTypeEnum](docs/AppTypeEnum.md) - [AppValidation](docs/AppValidation.md) @@ -246,6 +254,7 @@ Class | Method | HTTP request | Description - [CreateBundleInfo](docs/CreateBundleInfo.md) - [CreateConfigurationTemplateInfo](docs/CreateConfigurationTemplateInfo.md) - [CreateDelegationRequest](docs/CreateDelegationRequest.md) + - [CreateEventStreamInfo](docs/CreateEventStreamInfo.md) - [CreateGroupBindingInfo](docs/CreateGroupBindingInfo.md) - [CreateGroupBindingInfoGroupsInner](docs/CreateGroupBindingInfoGroupsInner.md) - [CreateGroupInfo](docs/CreateGroupInfo.md) @@ -261,13 +270,21 @@ Class | Method | HTTP request | Description - [CreateRequestInfoGroupsInner](docs/CreateRequestInfoGroupsInner.md) - [CreateRequestInfoResourcesInner](docs/CreateRequestInfoResourcesInner.md) - [CreateRequestInfoSupportTicket](docs/CreateRequestInfoSupportTicket.md) + - [CreateResourceCustomAccessLevelInfo](docs/CreateResourceCustomAccessLevelInfo.md) - [CreateResourceInfo](docs/CreateResourceInfo.md) - [CreateTagInfo](docs/CreateTagInfo.md) - [CreateUARInfo](docs/CreateUARInfo.md) - [Delegation](docs/Delegation.md) - [DenyRequestRequest](docs/DenyRequestRequest.md) + - [EntityItemTypeEnum](docs/EntityItemTypeEnum.md) + - [EntityNameFilter](docs/EntityNameFilter.md) + - [EntityTagFilter](docs/EntityTagFilter.md) - [EntityTypeEnum](docs/EntityTypeEnum.md) - [Event](docs/Event.md) + - [EventStream](docs/EventStream.md) + - [EventStreamConnection](docs/EventStreamConnection.md) + - [EventStreamConnectionTypeEnum](docs/EventStreamConnectionTypeEnum.md) + - [EventStreamList](docs/EventStreamList.md) - [GetResourceUser200Response](docs/GetResourceUser200Response.md) - [Group](docs/Group.md) - [GroupAccessLevel](docs/GroupAccessLevel.md) @@ -280,6 +297,7 @@ Class | Method | HTTP request | Description - [GroupRemoteInfoAwsSsoGroup](docs/GroupRemoteInfoAwsSsoGroup.md) - [GroupRemoteInfoAzureAdMicrosoft365Group](docs/GroupRemoteInfoAzureAdMicrosoft365Group.md) - [GroupRemoteInfoAzureAdSecurityGroup](docs/GroupRemoteInfoAzureAdSecurityGroup.md) + - [GroupRemoteInfoClickhouseRole](docs/GroupRemoteInfoClickhouseRole.md) - [GroupRemoteInfoConnectorGroup](docs/GroupRemoteInfoConnectorGroup.md) - [GroupRemoteInfoDatabricksAccountGroup](docs/GroupRemoteInfoDatabricksAccountGroup.md) - [GroupRemoteInfoDevinGroup](docs/GroupRemoteInfoDevinGroup.md) @@ -288,6 +306,7 @@ Class | Method | HTTP request | Description - [GroupRemoteInfoGithubTeam](docs/GroupRemoteInfoGithubTeam.md) - [GroupRemoteInfoGitlabGroup](docs/GroupRemoteInfoGitlabGroup.md) - [GroupRemoteInfoGoogleGroup](docs/GroupRemoteInfoGoogleGroup.md) + - [GroupRemoteInfoGrafanaTeam](docs/GroupRemoteInfoGrafanaTeam.md) - [GroupRemoteInfoIncidentioOnCallSchedule](docs/GroupRemoteInfoIncidentioOnCallSchedule.md) - [GroupRemoteInfoLdapGroup](docs/GroupRemoteInfoLdapGroup.md) - [GroupRemoteInfoOktaGroup](docs/GroupRemoteInfoOktaGroup.md) @@ -296,7 +315,11 @@ Class | Method | HTTP request | Description - [GroupRemoteInfoRootlyOnCallSchedule](docs/GroupRemoteInfoRootlyOnCallSchedule.md) - [GroupRemoteInfoSnowflakeRole](docs/GroupRemoteInfoSnowflakeRole.md) - [GroupRemoteInfoTailscaleGroup](docs/GroupRemoteInfoTailscaleGroup.md) + - [GroupRemoteInfoTwingateGroup](docs/GroupRemoteInfoTwingateGroup.md) + - [GroupRemoteInfoTwingateGroupSynced](docs/GroupRemoteInfoTwingateGroupSynced.md) - [GroupRemoteInfoWorkdayUserSecurityGroup](docs/GroupRemoteInfoWorkdayUserSecurityGroup.md) + - [GroupRemoteInfoZendeskGroup](docs/GroupRemoteInfoZendeskGroup.md) + - [GroupRemoteInfoZendeskOrganization](docs/GroupRemoteInfoZendeskOrganization.md) - [GroupResource](docs/GroupResource.md) - [GroupResourceList](docs/GroupResourceList.md) - [GroupTypeEnum](docs/GroupTypeEnum.md) @@ -313,8 +336,15 @@ Class | Method | HTTP request | Description - [OnCallScheduleIDList](docs/OnCallScheduleIDList.md) - [OnCallScheduleList](docs/OnCallScheduleList.md) - [OnCallScheduleProviderEnum](docs/OnCallScheduleProviderEnum.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) - [Owner](docs/Owner.md) - [PageInfo](docs/PageInfo.md) + - [PaginatedAccessRulesList](docs/PaginatedAccessRulesList.md) - [PaginatedAssignedRequestList](docs/PaginatedAssignedRequestList.md) - [PaginatedBundleGroupList](docs/PaginatedBundleGroupList.md) - [PaginatedBundleList](docs/PaginatedBundleList.md) @@ -328,6 +358,7 @@ Class | Method | HTTP request | Description - [PaginatedRemoteUsersList](docs/PaginatedRemoteUsersList.md) - [PaginatedResourcesList](docs/PaginatedResourcesList.md) - [PaginatedTagsList](docs/PaginatedTagsList.md) + - [PaginatedTokensList](docs/PaginatedTokensList.md) - [PaginatedUARsList](docs/PaginatedUARsList.md) - [PaginatedUsersList](docs/PaginatedUsersList.md) - [PropagationStatus](docs/PropagationStatus.md) @@ -355,6 +386,8 @@ Class | Method | HTTP request | Description - [ResourceAccessLevel](docs/ResourceAccessLevel.md) - [ResourceAccessUser](docs/ResourceAccessUser.md) - [ResourceAccessUserList](docs/ResourceAccessUserList.md) + - [ResourceCustomAccessLevelList](docs/ResourceCustomAccessLevelList.md) + - [ResourceCustomAccessLevelResponse](docs/ResourceCustomAccessLevelResponse.md) - [ResourceNHI](docs/ResourceNHI.md) - [ResourceRemoteInfo](docs/ResourceRemoteInfo.md) - [ResourceRemoteInfoAnthropicWorkspace](docs/ResourceRemoteInfoAnthropicWorkspace.md) @@ -379,10 +412,13 @@ Class | Method | HTTP request | Description - [ResourceRemoteInfoAzureSubscription](docs/ResourceRemoteInfoAzureSubscription.md) - [ResourceRemoteInfoAzureUserAssignedManagedIdentity](docs/ResourceRemoteInfoAzureUserAssignedManagedIdentity.md) - [ResourceRemoteInfoAzureVirtualMachine](docs/ResourceRemoteInfoAzureVirtualMachine.md) + - [ResourceRemoteInfoClickhouseDatabase](docs/ResourceRemoteInfoClickhouseDatabase.md) + - [ResourceRemoteInfoClickhouseTable](docs/ResourceRemoteInfoClickhouseTable.md) - [ResourceRemoteInfoCoupaRole](docs/ResourceRemoteInfoCoupaRole.md) - [ResourceRemoteInfoCursorOrganization](docs/ResourceRemoteInfoCursorOrganization.md) - [ResourceRemoteInfoCustomConnector](docs/ResourceRemoteInfoCustomConnector.md) - [ResourceRemoteInfoDatabricksAccountServicePrincipal](docs/ResourceRemoteInfoDatabricksAccountServicePrincipal.md) + - [ResourceRemoteInfoDatadogRole](docs/ResourceRemoteInfoDatadogRole.md) - [ResourceRemoteInfoDatastaxAstraRole](docs/ResourceRemoteInfoDatastaxAstraRole.md) - [ResourceRemoteInfoDevinOrganization](docs/ResourceRemoteInfoDevinOrganization.md) - [ResourceRemoteInfoDevinRole](docs/ResourceRemoteInfoDevinRole.md) @@ -402,7 +438,11 @@ Class | Method | HTTP request | Description - [ResourceRemoteInfoGithubRepo](docs/ResourceRemoteInfoGithubRepo.md) - [ResourceRemoteInfoGitlabProject](docs/ResourceRemoteInfoGitlabProject.md) - [ResourceRemoteInfoGoogleWorkspaceRole](docs/ResourceRemoteInfoGoogleWorkspaceRole.md) + - [ResourceRemoteInfoGrafanaDashboard](docs/ResourceRemoteInfoGrafanaDashboard.md) + - [ResourceRemoteInfoGrafanaFolder](docs/ResourceRemoteInfoGrafanaFolder.md) + - [ResourceRemoteInfoGrafanaRole](docs/ResourceRemoteInfoGrafanaRole.md) - [ResourceRemoteInfoIlevelAdvancedRole](docs/ResourceRemoteInfoIlevelAdvancedRole.md) + - [ResourceRemoteInfoNetsuiteRole](docs/ResourceRemoteInfoNetsuiteRole.md) - [ResourceRemoteInfoOktaApp](docs/ResourceRemoteInfoOktaApp.md) - [ResourceRemoteInfoOktaCustomRole](docs/ResourceRemoteInfoOktaCustomRole.md) - [ResourceRemoteInfoOktaStandardRole](docs/ResourceRemoteInfoOktaStandardRole.md) @@ -418,7 +458,9 @@ Class | Method | HTTP request | Description - [ResourceRemoteInfoSnowflakeTable](docs/ResourceRemoteInfoSnowflakeTable.md) - [ResourceRemoteInfoTailscaleSsh](docs/ResourceRemoteInfoTailscaleSsh.md) - [ResourceRemoteInfoTeleportRole](docs/ResourceRemoteInfoTeleportRole.md) + - [ResourceRemoteInfoTwingateResource](docs/ResourceRemoteInfoTwingateResource.md) - [ResourceRemoteInfoWorkdayRole](docs/ResourceRemoteInfoWorkdayRole.md) + - [ResourceRemoteInfoZendeskRole](docs/ResourceRemoteInfoZendeskRole.md) - [ResourceTypeEnum](docs/ResourceTypeEnum.md) - [ResourceUser](docs/ResourceUser.md) - [ResourceUserAccessStatus](docs/ResourceUserAccessStatus.md) @@ -434,10 +476,12 @@ Class | Method | HTTP request | Description - [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) + - [StringMatchType](docs/StringMatchType.md) - [SubEvent](docs/SubEvent.md) - [SyncError](docs/SyncError.md) - [SyncErrorList](docs/SyncErrorList.md) @@ -449,11 +493,13 @@ Class | Method | HTTP request | Description - [ThirdPartyProviderEnum](docs/ThirdPartyProviderEnum.md) - [TicketPropagationConfiguration](docs/TicketPropagationConfiguration.md) - [TicketingProviderEnum](docs/TicketingProviderEnum.md) + - [Token](docs/Token.md) - [UAR](docs/UAR.md) - [UARReviewerAssignmentPolicyEnum](docs/UARReviewerAssignmentPolicyEnum.md) - [UARScope](docs/UARScope.md) - [UpdateAccessRuleInfo](docs/UpdateAccessRuleInfo.md) - [UpdateConfigurationTemplateInfo](docs/UpdateConfigurationTemplateInfo.md) + - [UpdateEventStreamInfo](docs/UpdateEventStreamInfo.md) - [UpdateGroupBindingInfo](docs/UpdateGroupBindingInfo.md) - [UpdateGroupBindingInfoList](docs/UpdateGroupBindingInfoList.md) - [UpdateGroupInfo](docs/UpdateGroupInfo.md) @@ -464,15 +510,22 @@ Class | Method | HTTP request | Description - [UpdateIdpGroupMappingsRequestMappingsInner](docs/UpdateIdpGroupMappingsRequestMappingsInner.md) - [UpdateOwnerInfo](docs/UpdateOwnerInfo.md) - [UpdateOwnerInfoList](docs/UpdateOwnerInfoList.md) + - [UpdateResourceCustomAccessLevelInfo](docs/UpdateResourceCustomAccessLevelInfo.md) - [UpdateResourceInfo](docs/UpdateResourceInfo.md) - [UpdateResourceInfoList](docs/UpdateResourceInfoList.md) - [UpdateResourceUserRequest](docs/UpdateResourceUserRequest.md) - [User](docs/User.md) + - [UserAttributeSelector](docs/UserAttributeSelector.md) - [UserHrIdpStatusEnum](docs/UserHrIdpStatusEnum.md) - [UserIDList](docs/UserIDList.md) - [UserList](docs/UserList.md) - [VisibilityInfo](docs/VisibilityInfo.md) - [VisibilityTypeEnum](docs/VisibilityTypeEnum.md) + - [WebhookApiKeyCredential](docs/WebhookApiKeyCredential.md) + - [WebhookApiKeyLocationEnum](docs/WebhookApiKeyLocationEnum.md) + - [WebhookAuthTypeEnum](docs/WebhookAuthTypeEnum.md) + - [WebhookCredentials](docs/WebhookCredentials.md) + - [WebhookHmacCredential](docs/WebhookHmacCredential.md) ## Documentation For Authorization diff --git a/api/openapi.yaml b/api/openapi.yaml index 34c8556..b7df0f7 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -4,7 +4,9 @@ info: email: hello@opal.dev name: Opal Team url: https://www.opal.dev/ - description: The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + description: + The Opal API is a RESTful API that allows you to interact with the + Opal Security platform programmatically. title: Opal API version: "1.0" servers: @@ -22,6 +24,8 @@ tags: description: Operations related to configuration templates - name: delegations description: Operations related to request reviewer delegations + - name: event-streams + description: Operations related to event streaming connections - name: events description: Operations related to events - name: groups @@ -36,6 +40,8 @@ tags: description: Operations related to non-human identities - name: on-call-schedules description: Operations related to on-call schedules + - name: opal-queries + description: Operations related to OpalQuery - name: owners description: Operations related to owners - name: requests @@ -46,6 +52,8 @@ tags: description: Operations related to sessions - name: tags description: Operations related to tags + - name: tokens + description: Operations related to API tokens - name: uars description: Operations related to UARs - name: users @@ -124,7 +132,9 @@ paths: description: Returns a list of `Bundle` objects. operationId: getBundles parameters: - - description: The maximum number of bundles to return from the beginning of the list. Default is 200, max is 1000. + - description: + The maximum number of bundles to return from the beginning of the + list. Default is 200, max is 1000. example: 200 explode: true in: query @@ -133,7 +143,9 @@ paths: schema: type: integer style: form - - description: A cursor indicating where to start fetching items after a specific point. + - description: + A cursor indicating where to start fetching items after a specific + point. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true in: query @@ -276,7 +288,9 @@ paths: format: uuid type: string style: simple - - description: The maximum number of resources to return from the beginning of the list. Default is 200, max is 1000. + - description: + The maximum number of resources to return from the beginning of the + list. Default is 200, max is 1000. example: 200 explode: true in: query @@ -285,7 +299,9 @@ paths: schema: type: integer style: form - - description: A cursor indicating where to start fetching items after a specific point. + - description: + A cursor indicating where to start fetching items after a specific + point. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true in: query @@ -329,11 +345,17 @@ paths: format: uuid type: string access_level_remote_id: - description: The remote ID of the access level to grant to this user. Required if the resource being added requires an access level. If omitted, the default access level remote ID value (empty string) is used. + description: + The remote ID of the access level to grant to this user. Required + if the resource being added requires an access level. If + omitted, the default access level remote ID value (empty + string) is used. example: arn:aws:iam::590304332660:role/AdministratorAccess type: string access_level_name: - description: The name of the access level to grant to this user. If omitted, the default access level name value (empty string) is used. + description: + The name of the access level to grant to this user. If omitted, the + default access level name value (empty string) is used. example: AdministratorAccess type: string required: @@ -370,7 +392,9 @@ paths: schema: format: uuid type: string - - description: The remote ID of the access level to grant. If omitted, the default access level remote ID value (empty string) is used. + - description: + The remote ID of the access level to grant. If omitted, the default + access level remote ID value (empty string) is used. example: arn:aws:iam::590304332660:role/AdministratorAccess explode: true in: query @@ -400,7 +424,9 @@ paths: format: uuid type: string style: simple - - description: The maximum number of groups to return from the beginning of the list. Default is 200, max is 1000. + - description: + The maximum number of groups to return from the beginning of the + list. Default is 200, max is 1000. example: 200 explode: true in: query @@ -409,7 +435,9 @@ paths: schema: type: integer style: form - - description: A cursor indicating where to start fetching items after a specific point. + - description: + A cursor indicating where to start fetching items after a specific + point. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true in: query @@ -453,11 +481,17 @@ paths: format: uuid type: string access_level_remote_id: - description: The remote ID of the access level to grant to this user. Required if the group being added requires an access level. If omitted, the default access level remote ID value (empty string) is used. + description: + The remote ID of the access level to grant to this user. Required + if the group being added requires an access level. If + omitted, the default access level remote ID value (empty + string) is used. example: arn:aws:iam::590304332660:role/AdministratorAccess type: string access_level_name: - description: The name of the access level to grant to this user. If omitted, the default access level name value (empty string) is used. + description: + The name of the access level to grant to this user. If omitted, the + default access level name value (empty string) is used. example: AdministratorAccess type: string required: @@ -552,7 +586,10 @@ paths: content: application/json: schema: - description: The visibility details of the bundle. Setting to LIMITED visibility with no visibility groups will make bundle only visible to admins and users with access. + description: + The visibility details of the bundle. Setting to LIMITED visibility + with no visibility groups will make bundle only visible to + admins and users with access. $ref: "#/components/schemas/VisibilityInfo" responses: "200": @@ -639,6 +676,98 @@ paths: - 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 + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/EventStreamList" + description: A list of event streams for your organization. + security: + - BearerAuth: [] + tags: + - 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/CreateEventStreamInfo" + 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. + security: + - BearerAuth: [] + tags: + - event-streams + /event-streams/{event_stream_id}: + put: + summary: Update event stream + description: Updates an existing event streaming connection. + operationId: updateEventStream + parameters: + - description: The ID of the event stream. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: event_stream_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateEventStreamInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/EventStream" + description: The updated event stream. + security: + - BearerAuth: [] + tags: + - event-streams + delete: + summary: Delete event stream + description: Deletes an event streaming connection. + operationId: deleteEventStream + parameters: + - description: The ID of the event stream. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: event_stream_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: The event stream was successfully deleted. + security: + - BearerAuth: [] + tags: + - event-streams /events: get: description: Returns a list of `Event` objects. @@ -703,7 +832,9 @@ paths: schema: type: string style: form - - description: An API filter for the events. Supply the name and preview of the API token. + - description: + An API filter for the events. Supply the name and preview of the + API token. example: fullaccess:**************************M_g== explode: true in: query @@ -829,6 +960,17 @@ paths: schema: type: string style: form + - description: + 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 responses: "200": content: @@ -862,7 +1004,8 @@ paths: tags: - groups post: - description: Creates an Opal group or [imports a remote group](https://docs.opal.dev/reference/end-system-objects). + description: Creates an Opal group or [imports a remote + group](https://docs.opal.dev/reference/end-system-objects). operationId: createGroup requestBody: required: true @@ -1275,7 +1418,10 @@ paths: 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. + - 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 @@ -1295,11 +1441,16 @@ paths: 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. + 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. + 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 @@ -1610,7 +1761,10 @@ paths: 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. + 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 @@ -1655,7 +1809,9 @@ paths: format: uuid type: string style: simple - - description: The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite. + - description: + The duration for which the group can be accessed (in minutes). Use + 0 to set to indefinite. example: 60 explode: true in: query @@ -1666,7 +1822,10 @@ paths: 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 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 @@ -1686,11 +1845,16 @@ paths: 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. + 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. + 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: @@ -1731,7 +1895,10 @@ paths: 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. + - 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 @@ -1914,7 +2081,9 @@ paths: - group-bindings /idp-group-mappings/{app_resource_id}: get: - description: Returns the configured set of available `IdpGroupMapping` objects for an Okta app. + description: + Returns the configured set of available `IdpGroupMapping` objects + for an Okta app. operationId: getIdpGroupMappings parameters: - description: The ID of the Okta app. @@ -1933,7 +2102,9 @@ paths: application/json: schema: $ref: "#/components/schemas/IdpGroupMappingList" - description: The configured set of available `IdpGroupMapping` objects for an Okta app. + description: + The configured set of available `IdpGroupMapping` objects for an + Okta app. security: - BearerAuth: [] tags: @@ -1975,7 +2146,9 @@ paths: type: object responses: "200": - description: The updated set of available `IdpGroupMapping` objects for an Okta app. + description: + The updated set of available `IdpGroupMapping` objects for an Okta + app. security: - BearerAuth: [] tags: @@ -2242,7 +2415,9 @@ paths: - owners /owners/name/{owner_name}: get: - description: Returns an `Owner` object. Does not support owners with `/` in their name, use /owners?name=... instead. + description: + Returns an `Owner` object. Does not support owners with `/` in + their name, use /owners?name=... instead. operationId: getOwnerFromName parameters: - description: The name of the owner. @@ -2267,7 +2442,9 @@ paths: - owners /owners/{owner_id}/users: get: - description: Gets the list of users for this owner, in escalation priority order if applicable. + 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. @@ -2292,7 +2469,11 @@ paths: 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. + 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. @@ -2325,7 +2506,9 @@ paths: /requests: get: summary: Get requests - description: Returns a list of requests for your organization that is visible by the admin. + 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. @@ -2376,6 +2559,24 @@ paths: 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 @@ -2446,7 +2647,8 @@ paths: operationId: getRequestsRelay deprecated: true parameters: - - description: Number of results to return after the cursor. Use either first/after or last/before, not both. + - description: Number of results to return after the cursor. Use either + first/after or last/before, not both. example: 10 in: query name: first @@ -2455,14 +2657,19 @@ paths: type: integer minimum: 1 maximum: 100 - - description: Cursor to fetch results after. Used with 'first' for forward pagination. - example: "Y3Vyc29yOnYyOpK5MjAyMS0wMS0wN1QwNzo0MToyNy4xMTlaFjYwZmM2YmJlZjk4YzE1N2ZhNjFhYjk4Nw==" + - 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. + - description: Number of results to return before the cursor. Use either + first/after or last/before, not both. example: 10 in: query name: last @@ -2471,8 +2678,12 @@ paths: type: integer minimum: 1 maximum: 100 - - description: Cursor to fetch results before. Used with 'last' for backward pagination. - example: "Y3Vyc29yOnYyOpK5MjAyMS0wMS0wN1QwNzo0MToyNy4xMTlaFjYwZmM2YmJlZjk4YzE1N2ZhNjFhYjk4Nw==" + - description: + Cursor to fetch results before. Used with 'last' for backward + pagination. + example: + "Y3Vyc29yOnYyOpK5MjAyMS0wMS0wN1QwNzo0MToyNy4xMTlaFjYwZmM2YmJlZjk4YzE1N\ + 2ZhNjFhYjk4Nw==" in: query name: before required: false @@ -2641,7 +2852,6 @@ paths: content: application/json: schema: - type: object $ref: "#/components/schemas/RequestCommentList" security: - BearerAuth: [] @@ -2754,7 +2964,9 @@ paths: format: uuid type: string style: form - - description: The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. + - 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 @@ -2765,13 +2977,28 @@ paths: 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. + - 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 responses: "200": content: @@ -2805,7 +3032,9 @@ paths: tags: - resources post: - description: Creates a resource. See [here](https://docs.opal.dev/reference/end-system-objects) for details about importing resources. + description: Creates a resource. See + [here](https://docs.opal.dev/reference/end-system-objects) for details + about importing resources. operationId: createResource requestBody: required: true @@ -3259,12 +3488,16 @@ paths: 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. + 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. + 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: @@ -3276,7 +3509,9 @@ paths: application/json: schema: $ref: "#/components/schemas/ResourceNHI" - description: Details about the access that the non-human identity was granted to the resource. + description: + Details about the access that the non-human identity was granted to + the resource. security: - BearerAuth: [] tags: @@ -3295,7 +3530,9 @@ paths: format: uuid type: string style: simple - - description: The resource ID of the non-human identity to remove from this resource. + - description: + The resource ID of the non-human identity to remove from this + resource. example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 explode: false in: path @@ -3305,7 +3542,10 @@ paths: 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. + - 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 @@ -3316,7 +3556,9 @@ paths: style: form responses: "200": - description: This non-human identity's access was successfully removed from this resource. + description: + This non-human identity's access was successfully removed from this + resource. security: - BearerAuth: [] tags: @@ -3346,7 +3588,9 @@ paths: format: uuid type: string style: simple - - description: The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. + - description: + The duration for which the resource can be accessed (in minutes). + Use 0 to set to indefinite. example: 60 explode: true in: query @@ -3357,7 +3601,10 @@ paths: 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 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 @@ -3377,12 +3624,17 @@ paths: 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. + 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. + 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: @@ -3432,7 +3684,9 @@ paths: 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. + 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 @@ -3477,7 +3731,10 @@ paths: 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. + - 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 @@ -3579,7 +3836,10 @@ paths: 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. + - 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 @@ -3646,7 +3906,9 @@ paths: - 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. + 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. @@ -3674,7 +3936,9 @@ paths: 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. + - 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 @@ -3701,6 +3965,140 @@ paths: - 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. @@ -3830,7 +4228,10 @@ paths: 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. + - 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 @@ -3874,6 +4275,18 @@ 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: @@ -3978,6 +4391,39 @@ paths: 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 @@ -4000,7 +4446,9 @@ paths: - access-rules /access-rules/{access_rule_id}: get: - description: Returns a list of access rule config given the group_id of the access rule. + 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. @@ -4547,10 +4995,38 @@ paths: - BearerAuth: [] tags: - on-call-schedules - /uars: + /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" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OpalQueryResults" + description: The results of the OpalQuery. + security: + - BearerAuth: [] + tags: + - opal-queries + /tokens: get: - description: Returns a list of `UAR` objects. - operationId: getUARs + 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 @@ -4571,11 +5047,96 @@ paths: type: integer maximum: 1000 style: form - responses: - "200": - content: - application/json: - schema: + - 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 + /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: + 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. + 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: @@ -4632,7 +5193,9 @@ paths: - uars /sync_errors: get: - description: Returns a list of recent sync errors that have occurred since the last successful sync. + 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. @@ -4681,10 +5244,14 @@ paths: /delegations: get: summary: Get delegations - description: Returns a list of request reviewer delegations configured for your organization. + 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. + - 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 @@ -4694,7 +5261,9 @@ paths: format: uuid type: string style: form - - description: The delegate user ID to filter delegations by the user being delegated to. + - description: + The delegate user ID to filter delegations by the user being + delegated to. example: 29827fb8-f2dd-4e80-9576-28e31e9934ac explode: true in: query @@ -4735,7 +5304,9 @@ paths: tags: - delegations post: - description: Creates a new request reviewer delegation to delegate access review requests from one user to another. + description: + Creates a new request reviewer delegation to delegate access review + requests from one user to another. operationId: createDelegation requestBody: required: true @@ -4805,6 +5376,291 @@ paths: 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 + 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" + 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 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 + + OpalNodeQuery: + type: object + required: + - type + description: + Request body for a NODE-type OpalQuery. Returns entities (users, + resources, groups) matching the given filters. + 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" + discriminator: + propertyName: type + mapping: + NODE: "#/components/schemas/OpalNodeQueryResults" + + 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" + + 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 + + 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 any value for the + given key. + example: platform + connectionId: + 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: type: object required: @@ -4868,7 +5724,9 @@ components: 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. + 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: @@ -4899,18 +5757,25 @@ components: 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. + 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. + 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. + description: + This access review will include resources and groups with ids in + the given strings. items: example: f454d283-as87-4a8a-bdbb-df212eca5353 type: string @@ -4924,7 +5789,9 @@ components: 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. + 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 @@ -4944,12 +5811,16 @@ components: type: boolean example: False tags: - description: This access review will include resources and groups who are tagged with one of the given 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. + description: + This access review will include resources and groups whose name + contains one of the given strings. items: example: demo type: string @@ -4996,8 +5867,8 @@ components: properties: next: description: - The cursor with which to continue pagination if additional - result pages exist. + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -5045,7 +5916,9 @@ components: reviewer_assignment_policy: $ref: "#/components/schemas/UARReviewerAssignmentPolicyEnum" send_reviewer_assignment_notification: - description: A bool representing whether to send a notification to reviewers when they're assigned a new review. Default is False. + description: + A bool representing whether to send a notification to reviewers + when they're assigned a new review. Default is False. example: False type: boolean deadline: @@ -5054,15 +5927,22 @@ components: type: string format: date-time time_zone: - description: The time zone name (as defined by the IANA Time Zone database) used in the access review deadline and exported audit report. Default is America/Los_Angeles. + description: + The time zone name (as defined by the IANA Time Zone database) used + in the access review deadline and exported audit report. Default is + America/Los_Angeles. example: America/Los_Angeles type: string self_review_allowed: - description: A bool representing whether to present a warning when a user is the only reviewer for themself. Default is False. + description: + A bool representing whether to present a warning when a user is the + only reviewer for themself. Default is False. example: False type: boolean instantly_action_reviews: - description: A bool representing whether to instantly action changes when reviewers submit their decision. Default is False. + description: + A bool representing whether to instantly action changes when + reviewers submit their decision. Default is False. type: boolean example: False uar_scope: @@ -5106,7 +5986,9 @@ components: reviewer_assignment_policy: $ref: "#/components/schemas/UARReviewerAssignmentPolicyEnum" send_reviewer_assignment_notification: - description: A bool representing whether to send a notification to reviewers when they're assigned a new review. Default is False. + description: + A bool representing whether to send a notification to reviewers + when they're assigned a new review. Default is False. example: False type: boolean deadline: @@ -5115,15 +5997,22 @@ components: type: string format: date-time time_zone: - description: The time zone name (as defined by the IANA Time Zone database) used in the access review deadline and exported audit report. Default is America/Los_Angeles. + description: + The time zone name (as defined by the IANA Time Zone database) used + in the access review deadline and exported audit report. Default is + America/Los_Angeles. example: America/Los_Angeles type: string self_review_allowed: - description: A bool representing whether to present a warning when a user is the only reviewer for themself. Default is False. + description: + A bool representing whether to present a warning when a user is the + only reviewer for themself. Default is False. example: False type: boolean instantly_action_reviews: - description: A bool representing whether to instantly action changes when reviewers submit their decision. Default is False. + description: + A bool representing whether to instantly action changes when + reviewers submit their decision. Default is False. type: boolean example: False reminder_schedule: @@ -5144,7 +6033,14 @@ components: - self_review_allowed type: object UARReviewerAssignmentPolicyEnum: - description: 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. + description: + 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. enum: - MANUALLY - BY_OWNING_TEAM_ADMIN @@ -5250,6 +6146,7 @@ components: - COUPA - CURSOR - CUSTOM + - CUSTOM_CONNECTOR - DATABRICKS - DATASTAX_ASTRA - DUO @@ -5265,6 +6162,8 @@ components: - MONGO - MONGO_ATLAS - MYSQL + - NETSUITE + - DATADOG - OKTA_DIRECTORY - OPENAI_PLATFORM - OPAL @@ -5273,6 +6172,7 @@ components: - SNOWFLAKE - TAILSCALE - TELEPORT + - TWINGATE - WORKDAY example: OKTA_DIRECTORY type: string @@ -5360,7 +6260,9 @@ components: key: "iam:GetRole" name: "Opal's service account is missing the 'iam:GetRole' permission." usage_reason: "Opal uses the 'iam:GetRole' permissions to view access to resources." - details: "403 Google API Error. Service account is not authorized to access role assignments." + details: + "403 Google API Error. Service account is not authorized to access role + assignments." severity: HIGH status: FAILED updated_at: 2021-01-06T20:00:00Z @@ -5370,15 +6272,21 @@ components: example: "iam:GetUser" type: string name: - description: The human-readable description of whether the validation has the permissions. + description: + The human-readable description of whether the validation has the + permissions. example: "Opal's service account is missing the 'iam:GetUser' description." usage_reason: description: The reason for needing the validation. example: Opal uses the 'iam:GetUser' permission to import users. type: string details: - description: Extra details regarding the validation. Could be an error message or restrictions on permissions. - example: 403 Google API Error. Service account is not authorized to access role assignments. + description: + Extra details regarding the validation. Could be an error message + or restrictions on permissions. + example: + 403 Google API Error. Service account is not authorized to access role + assignments. type: string severity: $ref: "#/components/schemas/AppValidationSeverityEnum" @@ -5450,8 +6358,8 @@ components: properties: next: description: - The cursor with which to continue pagination if additional - result pages exist. + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -5485,8 +6393,8 @@ components: properties: next: description: - The cursor with which to continue pagination if additional - result pages exist. + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -5500,6 +6408,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 @@ -5667,11 +6668,15 @@ components: nullable: true type: string has_direct_access: - description: The user has direct access to this resources (vs. indirectly, like through a group). + description: + The user has direct access to this resources (vs. indirectly, like + through a group). example: true type: boolean num_access_paths: - description: The number of ways in which the user has access through this resource (directly and indirectly). + description: + The number of ways in which the user has access through this + resource (directly and indirectly). example: 3 format: int32 type: integer @@ -5749,11 +6754,15 @@ components: nullable: true type: string has_direct_access: - description: The principal has direct access to this entity (vs. inherited access). + description: + The principal has direct access to this entity (vs. inherited + access). example: true type: boolean num_access_paths: - description: The number of ways in which the principal has access to this entity (directly and inherited). + description: + The number of ways in which the principal has access to this entity + (directly and inherited). example: 3 format: int32 type: integer @@ -5813,8 +6822,8 @@ components: properties: next: description: - The cursor with which to continue pagination if additional - result pages exist. + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -5888,8 +6897,8 @@ components: properties: next: description: - The cursor with which to continue pagination if additional - result pages exist. + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -5919,8 +6928,8 @@ components: properties: next: description: - The cursor with which to continue pagination if additional - result pages exist. + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -6077,22 +7086,52 @@ components: results: - group_id: f454d283-ca87-4a8a-bdbb-df212eca5353 app_id: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd - description: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases. + name: Payments Production Admin + description: + This group represents Active Directory group "Payments Production + Admin". We use this AD group to facilitate staging deployments and + qualifying new releases. admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8 + group_leader_user_ids: + - 7c86c85d-0651-43e2-a748-d69d658418e8 + remote_id: 037m2jsg218b2wb + remote_name: Finance Team + group_type: ACTIVE_DIRECTORY_GROUP max_duration: 120 + recommended_duration: 60 + extensions_duration_in_minutes: 60 require_manager_approval: False require_support_ticket: False + require_mfa_to_approve: False + require_mfa_to_request: False + auto_approval: False + is_requestable: True - group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b - description: Manages the Integrations Team on-call privileged resources. This group is automatically synced with the on-call rotation defined in PagerDuty. + app_id: a7c3e291-1234-4abc-9def-1234567890ab + name: Integrations On-Call + description: + Manages the Integrations Team on-call privileged resources. This + group is automatically synced with the on-call rotation defined in + PagerDuty. admin_owner_id: 4220bc12-ab8a-4b5d-be7b-f6bbcf9159f3 + group_leader_user_ids: [] + remote_id: pagerduty-schedule:P123XYZ + remote_name: Integrations On-Call + group_type: PAGERDUTY_ON_CALL_SCHEDULE max_duration: 360 + recommended_duration: 120 + extensions_duration_in_minutes: 0 require_manager_approval: False require_support_ticket: True + require_mfa_to_approve: False + require_mfa_to_request: False + auto_approval: False + is_requestable: True properties: next: description: - The cursor with which to continue pagination if additional - result pages exist. + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -6163,7 +7202,9 @@ components: format: uuid type: string duration_minutes: - description: The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite. + description: + The updated duration for which the group can be accessed (in + minutes). Use 0 for indefinite. type: integer maximum: 525960 # One year example: 120 @@ -6185,13 +7226,26 @@ components: example: group_id: f454d283-ca87-4a8a-bdbb-df212eca5353 app_id: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd + name: Payments Production Admin + description: + This group represents Active Directory group "Payments Production + Admin". We use this AD group to facilitate staging deployments and + qualifying new releases. + admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8 + group_leader_user_ids: + - 7c86c85d-0651-43e2-a748-d69d658418e8 remote_id: 037m2jsg218b2wb remote_name: Finance Team - description: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases. - admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8 + group_type: ACTIVE_DIRECTORY_GROUP max_duration: 120 + recommended_duration: 60 + extensions_duration_in_minutes: 60 require_manager_approval: False require_support_ticket: False + require_mfa_to_approve: False + require_mfa_to_request: False + auto_approval: False + is_requestable: True properties: group_id: description: The ID of the group. @@ -6209,7 +7263,10 @@ components: type: string description: description: A description of the group. - example: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases. + example: + This group represents Active Directory group "Payments Production + Admin". We use this AD group to facilitate staging deployments and + qualifying new releases. type: string admin_owner_id: description: The ID of the owner of the group. @@ -6233,36 +7290,53 @@ components: group_type: $ref: "#/components/schemas/GroupTypeEnum" max_duration: - description: The maximum duration for which the group can be requested (in minutes). + description: + The maximum duration for which the group can be requested (in + minutes). type: integer example: 120 recommended_duration: - description: The recommended duration for which the group should be requested (in minutes). -1 represents an indefinite duration. + description: + The recommended duration for which the group should be requested + (in minutes). -1 represents an indefinite duration. type: integer example: 120 extensions_duration_in_minutes: - 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. + 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. type: integer example: 120 require_manager_approval: - description: A bool representing whether or not access requests to the group require manager approval. + description: + A bool representing whether or not access requests to the group + require manager approval. example: False type: boolean deprecated: true require_support_ticket: - description: A bool representing whether or not access requests to the group require an access ticket. + description: + A bool representing whether or not access requests to the group + require an access ticket. example: False type: boolean require_mfa_to_approve: - description: A bool representing whether or not to require MFA for reviewers to approve requests for this group. + description: + A bool representing whether or not to require MFA for reviewers to + approve requests for this group. example: False type: boolean require_mfa_to_request: - description: A bool representing whether or not to require MFA for requesting access to this group. + description: + A bool representing whether or not to require MFA for requesting + access to this group. example: False type: boolean auto_approval: - description: A bool representing whether or not to automatically approve requests to this group. + description: + A bool representing whether or not to automatically approve + requests to this group. example: False type: boolean request_template_id: @@ -6281,7 +7355,9 @@ components: format: uuid type: string is_requestable: - description: A bool representing whether or not to allow access requests to this group. + description: + A bool representing whether or not to allow access requests to this + group. example: False type: boolean request_configurations: @@ -6291,14 +7367,20 @@ components: items: $ref: "#/components/schemas/RequestConfiguration" request_configuration_list: - description: A list of request configurations for this group. Deprecated in favor of `request_configurations`. + description: + A list of request configurations for this group. Deprecated in + favor of `request_configurations`. deprecated: true example: [] type: array items: $ref: "#/components/schemas/RequestConfiguration" metadata: - 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. + 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. deprecated: true example: |- { "okta_directory_group": { "group_id": "00g4bs66kwtpe1g12345" } } @@ -6306,13 +7388,17 @@ components: remote_info: $ref: "#/components/schemas/GroupRemoteInfo" custom_request_notification: - description: Custom request notification sent to the requester when the request is approved. + description: + Custom request notification sent to the requester when the request + is approved. type: string maxLength: 800 nullable: true example: "Check your email to register your account." risk_sensitivity: - description: The risk sensitivity level for the group. When an override is set, this field will match that. + description: + The risk sensitivity level for the group. When an override is set, + this field will match that. readOnly: true allOf: - $ref: "#/components/schemas/RiskSensitivityEnum" @@ -6348,8 +7434,8 @@ components: type: array next: description: - The cursor with which to continue pagination if additional - result pages exist. + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -6445,14 +7531,18 @@ components: - description type: object PropagationStatus: - description: The state of whether the push action was propagated to the remote system. If this is null, the access was synced from the remote system. + description: + The state of whether the push action was propagated to the remote + system. If this is null, the access was synced from the remote system. properties: status: $ref: "#/components/schemas/PropagationStatusEnum" required: - status PropagationStatusEnum: - description: The status of whether the user has been synced to the group or resource in the remote system. + description: + The status of whether the user has been synced to the group or + resource in the remote system. enum: - SUCCESS - ERR_REMOTE_INTERNAL_ERROR @@ -6482,14 +7572,20 @@ components: example: groups: - group_id: f454d283-ca87-4a8a-bdbb-df212eca5353 - description: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases. + description: + This group represents Active Directory group "Payments Production + Admin". We use this AD group to facilitate staging deployments and + qualifying new releases. name: api-group admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8 max_duration: 120 require_manager_approval: False require_support_ticket: False - group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b - description: Manages the Integrations Team on-call privileged resources. This group is automatically synced with the on-call rotation defined in PagerDuty. + description: + Manages the Integrations Team on-call privileged resources. This + group is automatically synced with the on-call rotation defined in + PagerDuty. name: on-call-integrations admin_owner_id: 4220bc12-ab8a-4b5d-be7b-f6bbcf9159f3 max_duration: 360 @@ -6511,7 +7607,10 @@ components: The `UpdateGroupInfo` object is used as an input to the UpdateGroup API. example: group_id: f454d283-ca87-4a87-bdbb-df212eca5353 - description: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases. + description: + This group represents Active Directory group "Payments Production + Admin". We use this AD group to facilitate staging deployments and + qualifying new releases. name: api-group admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8 max_duration: 120 @@ -6529,7 +7628,10 @@ components: type: string description: description: A description of the group. - example: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases. + example: + This group represents Active Directory group "Payments Production + Admin". We use this AD group to facilitate staging deployments and + qualifying new releases. type: string admin_owner_id: description: The ID of the owner of the group. @@ -6537,22 +7639,35 @@ components: format: uuid type: string max_duration: - description: The maximum duration for which the group can be requested (in minutes). Use -1 to set to indefinite. Deprecated in favor of `request_configurations`. + description: + The maximum duration for which the group can be requested (in + minutes). Use -1 to set to indefinite. Deprecated in favor of + `request_configurations`. type: integer example: 120 deprecated: true recommended_duration: - description: The recommended duration for which the group should be requested (in minutes). Will be the default value in a request. Use -1 to set to indefinite and 0 to unset. Deprecated in favor of `request_configurations`. + description: + The recommended duration for which the group should be requested + (in minutes). Will be the default value in a request. Use -1 to set + to indefinite and 0 to unset. Deprecated in favor of + `request_configurations`. type: integer example: 120 deprecated: true require_manager_approval: - description: A bool representing whether or not access requests to the group require manager approval. Deprecated in favor of `request_configurations`. + description: + A bool representing whether or not access requests to the group + require manager approval. Deprecated in favor of + `request_configurations`. example: False type: boolean deprecated: true require_support_ticket: - description: A bool representing whether or not access requests to the group require an access ticket. Deprecated in favor of `request_configurations`. + description: + A bool representing whether or not access requests to the group + require an access ticket. Deprecated in favor of + `request_configurations`. example: False type: boolean deprecated: true @@ -6563,16 +7678,24 @@ components: type: string deprecated: true require_mfa_to_approve: - description: A bool representing whether or not to require MFA for reviewers to approve requests for this group. + description: + A bool representing whether or not to require MFA for reviewers to + approve requests for this group. example: False type: boolean require_mfa_to_request: - description: A bool representing whether or not to require MFA for requesting access to this group. Deprecated in favor of `request_configurations`. + description: + A bool representing whether or not to require MFA for requesting + access to this group. Deprecated in favor of + `request_configurations`. example: False type: boolean deprecated: true auto_approval: - description: A bool representing whether or not to automatically approve requests to this group. Deprecated in favor of `request_configurations`. + description: + A bool representing whether or not to automatically approve + requests to this group. Deprecated in favor of + `request_configurations`. example: False type: boolean deprecated: true @@ -6582,13 +7705,17 @@ components: format: uuid type: string request_template_id: - description: The ID of the associated request template. Deprecated in favor of `request_configurations`. + description: + The ID of the associated request template. Deprecated in favor of + `request_configurations`. example: 06851574-e50d-40ca-8c78-f72ae6ab4304 format: uuid type: string deprecated: true is_requestable: - description: A bool representing whether or not to allow access requests to this group. Deprecated in favor of `request_configurations`. + description: + A bool representing whether or not to allow access requests to this + group. Deprecated in favor of `request_configurations`. example: False type: boolean deprecated: true @@ -6599,7 +7726,10 @@ components: format: uuid type: array extensions_duration_in_minutes: - 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. + 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. type: integer example: 120 deprecated: true @@ -6607,9 +7737,14 @@ components: type: array items: $ref: "#/components/schemas/RequestConfiguration" - description: The request configuration list of the configuration template. If not provided, the default request configuration will be used. + description: + The request configuration list of the configuration template. If + not provided, the default request configuration will be used. request_configuration_list: - 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`. + 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`. $ref: "#/components/schemas/CreateRequestConfigurationInfoList" deprecated: true example: @@ -6648,7 +7783,9 @@ components: stage: 1 priority: 1 custom_request_notification: - description: Custom request notification sent to the requester when the request is approved. + description: + Custom request notification sent to the requester when the request + is approved. type: string maxLength: 800 nullable: true @@ -6686,6 +7823,12 @@ components: - ROOTLY_ON_CALL_SCHEDULE - DEVIN_GROUP - GIT_HUB_ENTERPRISE_TEAM + - GRAFANA_TEAM + - CLICKHOUSE_ROLE + - TWINGATE_GROUP + - TWINGATE_GROUP_SYNCED + - ZENDESK_GROUP + - ZENDESK_ORGANIZATION example: OPAL_GROUP type: string ResourceTypeEnum: @@ -6734,6 +7877,8 @@ components: - GOOGLE_WORKSPACE_ROLE - MONGO_INSTANCE - MONGO_ATLAS_INSTANCE + - NETSUITE_ROLE + - DATADOG_ROLE - OKTA_APP - OKTA_ROLE - OPAL_ROLE @@ -6766,8 +7911,105 @@ components: - VAULT_POLICY - VAULT_OIDC_ROLE - GIT_HUB_ENTERPRISE_ROLE + - GRAFANA_FOLDER + - GRAFANA_DASHBOARD + - GRAFANA_BASIC_ROLE + - GRAFANA_ROLE + - CLICKHOUSE_DATABASE + - CLICKHOUSE_TABLE + - TWINGATE_RESOURCE + - ZENDESK_ROLE example: AWS_IAM_ROLE type: string + EntityItemTypeEnum: + description: Granular subtype of an entity. + enum: + - USER + - SERVICE_USER + - ACTIVE_DIRECTORY_GROUP + - AWS_SSO_GROUP + - DUO_GROUP + - GIT_HUB_TEAM + - GIT_LAB_GROUP + - GOOGLE_GROUPS_GROUP + - GOOGLE_GROUPS_GKE_GROUP + - LDAP_GROUP + - OKTA_GROUP + - OKTA_GROUP_RULE + - TAILSCALE_GROUP + - TWINGATE_GROUP + - TWINGATE_GROUP_SYNCED + - OPAL_GROUP + - OPAL_ACCESS_RULE + - AZURE_AD_SECURITY_GROUP + - AZURE_AD_MICROSOFT_365_GROUP + - CONNECTOR_GROUP + - SNOWFLAKE_ROLE + - WORKDAY_USER_SECURITY_GROUP + - DATABRICKS_ACCOUNT_GROUP + - AWS_IAM_ROLE + - AWS_EC2_INSTANCE + - AWS_EKS_CLUSTER + - AWS_RDS_POSTGRES_INSTANCE + - AWS_RDS_POSTGRES_CLUSTER + - AWS_RDS_MYSQL_INSTANCE + - AWS_RDS_MYSQL_CLUSTER + - AWS_ACCOUNT + - AWS_SSO_PERMISSION_SET + - AZURE_MANAGEMENT_GROUP + - AZURE_RESOURCE_GROUP + - AZURE_SUBSCRIPTION + - AZURE_VIRTUAL_MACHINE + - AZURE_STORAGE_ACCOUNT + - AZURE_STORAGE_CONTAINER + - AZURE_SQL_SERVER + - AZURE_SQL_MANAGED_INSTANCE + - AZURE_SQL_DATABASE + - AZURE_SQL_MANAGED_DATABASE + - AZURE_USER_ASSIGNED_MANAGED_Identity + - AZURE_ENTRA_ID_ROLE + - AZURE_ENTERPRISE_APP + - CUSTOM + - 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_CLOUD_SQL_POSTGRES_INSTANCE + - GCP_CLOUD_SQL_MYSQL_INSTANCE + - GCP_SERVICE_ACCOUNT + - GIT_HUB_REPO + - GIT_HUB_ORG_ROLE + - GIT_LAB_PROJECT + - GOOGLE_WORKSPACE_ROLE + - MONGO_INSTANCE + - MONGO_ATLAS_INSTANCE + - OKTA_APP + - OKTA_ROLE + - OPAL_ROLE + - OPAL_SCOPED_ROLE + - PAGERDUTY_ROLE + - TAILSCALE_SSH + - TWINGATE_RESOURCE + - SALESFORCE_PERMISSION_SET + - SALESFORCE_PROFILE + - SALESFORCE_ROLE + - SNOWFLAKE_DATABASE + - SNOWFLAKE_SCHEMA + - SNOWFLAKE_TABLE + - WORKDAY_ROLE + - MYSQL_INSTANCE + - MARIADB_INSTANCE + - POSTGRES_INSTANCE + - TELEPORT_ROLE + - DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL + - ILEVEL_ADVANCED_ROLE + example: OPAL_ROLE + type: string VisibilityTypeEnum: description: The visibility level of the entity. enum: @@ -6849,7 +8091,9 @@ components: example: finance-team type: string hidden_from_end_user: - description: A bool representing whether or not the group is hidden from the end user. + description: + A bool representing whether or not the group is hidden from the end + user. example: False type: boolean required: @@ -7013,7 +8257,9 @@ components: required: - message_channel_ids OnCallScheduleIDList: - description: A list of on call schedule Opal UUIDs. To get the matching remote IDs, use the /on-call-schedules endpoints. + description: + A list of on call schedule Opal UUIDs. To get the matching remote + IDs, use the /on-call-schedules endpoints. example: on_call_schedule_ids: - 9546209c-42c2-4801-96d7-9ec42df0f59c @@ -7058,6 +8304,8 @@ components: owner_ids: - 7870617d-e72a-47f5-a84c-693817ab4567 - 1520617d-e72a-47f5-a84c-693817ab48ad2 + service_user_ids: + - 7870617d-e72a-47f5-a84c-693817ab4568 properties: require_manager_approval: description: Whether this reviewer stage should require manager approval. @@ -7068,13 +8316,22 @@ components: example: False type: boolean operator: - description: The operator of the reviewer stage. Admin and manager approval are also treated as reviewers. + description: + The operator of the reviewer stage. Admin and manager approval are + also treated as reviewers. enum: - AND - OR example: AND type: string owner_ids: + description: The IDs of owners assigned as reviewers for this stage. + items: + type: string + format: uuid + type: array + service_user_ids: + description: The IDs of service users assigned as reviewers for this stage. items: type: string format: uuid @@ -7218,7 +8475,11 @@ components: description: "The database engine for the RDS instance." enum: [MYSQL, POSTGRESQL] GroupRemoteInfo: - description: Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. If remote_info is provided, a group will be imported into Opal. For group types that support group creation through Opal, a new group will be created if remote_info is not provided. + description: Information that defines the remote group. This replaces the + deprecated remote_id and metadata fields. If remote_info is provided, a + group will be imported into Opal. For group types that support group + creation through Opal, a new group will be created if remote_info is not + provided. properties: active_directory_group: description: Remote info for Active Directory group. @@ -7240,6 +8501,26 @@ components: type: object required: - group_id + twingate_group: + description: Remote info for Twingate group. + properties: + group_id: + description: The id of the Twingate group. + example: R3JvdXA6MTIzNA== + type: string + type: object + required: + - group_id + twingate_group_synced: + description: Remote info for Twingate synced group. + properties: + group_id: + description: The id of the Twingate synced group. + example: R3JvdXA6MTIzNA== + type: string + type: object + required: + - group_id aws_sso_group: description: Remote info for AWS SSO group. properties: @@ -7282,6 +8563,9 @@ components: description: The slug of the GitHub team. example: opal-security type: string + org_name: + description: GitHub team's org name, required only for Enterprise + type: string type: object required: - team_slug @@ -7435,9 +8719,51 @@ components: type: object required: - group_name + clickhouse_role: + description: Remote info for ClickHouse role. + properties: + role_id: + description: The name of the ClickHouse role. + example: my_clickhouse_role + type: string + type: object + required: + - role_id + grafana_team: + description: Remote info for Grafana team. + properties: + team_id: + description: The ID of the team. + example: 2323 + type: string + type: object + required: + - team_id + zendesk_group: + description: Remote info for Zendesk group. + properties: + group_id: + description: The ID of the Zendesk group. + example: "12345" + 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 type: object ResourceRemoteInfo: - description: Information that defines the remote resource. This replaces the deprecated remote_id and metadata fields. + description: + Information that defines the remote resource. This replaces the + deprecated remote_id and metadata fields. properties: databricks_account_service_principal: description: Remote info for Databricks account service principal. @@ -7568,7 +8894,9 @@ components: description: Remote info for Azure Enterprise App. properties: resource_id: - description: The remote application identifier (service principal or application object ID). + description: + The remote application identifier (service principal or application + object ID). example: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee type: string type: object @@ -7606,7 +8934,9 @@ components: example: 234234234234 type: string organizational_unit_id: - description: The id of the AWS organizational unit. Required only if customer has OUs enabled. + description: + The id of the AWS organizational unit. Required only if customer + has OUs enabled. example: ou-1234 type: string type: object @@ -7620,7 +8950,9 @@ components: example: arn:aws:sso:::permissionSet/asdf-32139302d201d32/ps-f03323201211e1b9 type: string account_id: - description: The ID of an AWS account to which this permission set is provisioned. + description: + The ID of an AWS account to which this permission set is + provisioned. example: 234234234234 type: string type: object @@ -7680,7 +9012,9 @@ components: example: 234234234234 type: string database_name: - description: The name of the database in the RDS cluster. This can be the value of the tag `opal:database-name` or the database name. + description: + The name of the database in the RDS cluster. This can be the value + of the tag `opal:database-name` or the database name. example: mydatabase type: string engine: @@ -7740,7 +9074,9 @@ components: example: 01fa7402-01d8-103b-8deb-5f3a0ab7884 type: string can_have_usage_events: - description: A bool representing whether or not the resource can have usage data. + description: + A bool representing whether or not the resource can have usage + data. example: False type: boolean type: object @@ -7876,7 +9212,7 @@ components: type: string service_account_id: description: The id of the service account. - example: 103561576023829463298 + example: 103561576023829460000 type: string project_id: description: The id of the project the service account is in. @@ -7909,6 +9245,9 @@ components: description: The name of the repository. example: Opal Security type: string + org_name: + description: GitHub repo's org name, required only for Enterprise. + type: string type: object required: - repo_name @@ -7919,6 +9258,9 @@ components: description: The id of the role. example: 112233 type: string + org_name: + description: GitHub org role's org name, required only for Enterprise. + type: string type: object required: - role_id @@ -8047,6 +9389,16 @@ components: type: object required: - tag_name + twingate_resource: + description: Remote info for Twingate resource. + properties: + resource_id: + description: The id of the Twingate resource. + example: UmVzb3VyY2U6MTIzNA== + type: string + type: object + required: + - resource_id pagerduty_role: description: Remote info for Pagerduty role. properties: @@ -8160,50 +9512,135 @@ components: 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 + 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 + 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_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: - - project_id - - service_account_id - anthropic_workspace: - description: Remote info for Anthropic workspace. + - database_name + - table_name + grafana_folder: + description: Remote info for Grafana folder. properties: - workspace_id: - description: The id of the workspace. - example: ws-123456 + folder_uid: + description: The UID of the Grafana folder. + example: fffRTXX type: string type: object required: - - workspace_id - oracle_fusion_role: - description: Remote info for Oracle Fusion role. + - folder_uid + grafana_dashboard: + description: Remote info for Grafana dashboard. properties: - role_id: - description: The id of the role. - example: 123e4567-e89b-12d3-a456-426614174000 + dashboard_uid: + description: The UID of the Grafana dashboard. + example: dddRTXX type: string type: object required: - - role_id - devin_organization: - description: Remote info for Devin organization. + - dashboard_uid + grafana_role: + description: Remote info for Grafana role(fixed or custom). properties: - org_id: - description: The id of the organization. - example: devin-org-01 + role_uid: + description: The UID of the Grafana role. + example: rrfRTXX type: string type: object required: - - org_id - devin_role: - description: Remote info for Devin role. + - role_uid + zendesk_role: + description: Remote info for Zendesk custom role. properties: role_id: - description: The id of the role. - example: devin-role-01 + description: The ID of the Zendesk custom role. + example: "12345" type: string type: object required: @@ -8211,7 +9648,9 @@ components: type: object RiskSensitivityEnum: type: string - description: "Indicates the level of potential impact misuse or unauthorized access may incur." + description: + "Indicates the level of potential impact misuse or unauthorized + access may incur." enum: [UNKNOWN, CRITICAL, HIGH, MEDIUM, LOW, NONE] CreateResourceInfo: description: |- @@ -8255,7 +9694,11 @@ components: $ref: "#/components/schemas/ResourceRemoteInfo" remote_resource_id: deprecated: true - 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. + 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. example: API_ACCESS_MANAGEMENT_ADMIN-51d203da-313a-4fd9-8fcf-420ce6312345 type: string metadata: @@ -8569,7 +10012,11 @@ components: $ref: "#/components/schemas/GroupRemoteInfo" remote_group_id: deprecated: true - 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. + 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. example: 00g4fixjd6Bc9w012345 type: string metadata: @@ -8705,8 +10152,8 @@ components: properties: next: description: - The cursor with which to continue pagination if additional - result pages exist. + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -8833,7 +10280,9 @@ components: description: The stages configuration for this request $ref: "#/components/schemas/RequestItemStages" reviewer_stages: - description: The configured reviewer stages for every item in this request, or an error message if reviewers could not be loaded + description: + The configured reviewer stages for every item in this request, or + an error message if reviewers could not be loaded oneOf: - type: array items: @@ -9108,7 +10557,9 @@ components: items: $ref: "#/components/schemas/Request" cursor: - description: The cursor to use in the next request to get the next page of results. + description: + The cursor to use in the next request to get the next page of + results. type: string example: eyJjcmVhdGVkX2F0IjoiMjAyMS0wMS0wNlQyMDo0NzowMFoiLCJ2YWx1ZSI6ImFkbWluIn0= Resource: @@ -9169,40 +10620,59 @@ components: resource_type: $ref: "#/components/schemas/ResourceTypeEnum" max_duration: - description: The maximum duration for which the resource can be requested (in minutes). + description: + The maximum duration for which the resource can be requested (in + minutes). type: integer example: 120 recommended_duration: - description: The recommended duration for which the resource should be requested (in minutes). -1 represents an indefinite duration. + description: + The recommended duration for which the resource should be requested + (in minutes). -1 represents an indefinite duration. type: integer example: 120 extensions_duration_in_minutes: - 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. + 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. type: integer example: 120 require_manager_approval: - description: A bool representing whether or not access requests to the resource require manager approval. + description: + A bool representing whether or not access requests to the resource + require manager approval. example: False type: boolean deprecated: true require_support_ticket: - description: A bool representing whether or not access requests to the resource require an access ticket. + description: + A bool representing whether or not access requests to the resource + require an access ticket. example: False type: boolean require_mfa_to_approve: - description: A bool representing whether or not to require MFA for reviewers to approve requests for this resource. + description: + A bool representing whether or not to require MFA for reviewers to + approve requests for this resource. example: False type: boolean require_mfa_to_request: - description: A bool representing whether or not to require MFA for requesting access to this resource. + description: + A bool representing whether or not to require MFA for requesting + access to this resource. example: False type: boolean require_mfa_to_connect: - description: A bool representing whether or not to require MFA to connect to this resource. + description: + A bool representing whether or not to require MFA to connect to + this resource. example: False type: boolean auto_approval: - description: A bool representing whether or not to automatically approve requests to this resource. + description: + A bool representing whether or not to automatically approve + requests to this resource. example: False type: boolean request_template_id: @@ -9211,7 +10681,9 @@ components: format: uuid type: string is_requestable: - description: A bool representing whether or not to allow access requests to this resource. + description: + A bool representing whether or not to allow access requests to this + resource. example: False type: boolean parent_resource_id: @@ -9230,7 +10702,9 @@ components: $ref: "#/components/schemas/RequestConfiguration" description: A list of configurations for requests to this resource. request_configuration_list: - description: A list of configurations for requests to this resource. Deprecated in favor of `request_configurations`. + description: + A list of configurations for requests to this resource. Deprecated + in favor of `request_configurations`. deprecated: true items: $ref: "#/components/schemas/RequestConfiguration" @@ -9243,7 +10717,9 @@ components: maxLength: 800 nullable: true risk_sensitivity: - description: The risk sensitivity level for the resource. When an override is set, this field will match that. + description: + The risk sensitivity level for the resource. When an override is + set, this field will match that. readOnly: true allOf: - $ref: "#/components/schemas/RiskSensitivityEnum" @@ -9251,7 +10727,11 @@ components: allOf: - $ref: "#/components/schemas/RiskSensitivityEnum" metadata: - 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. + 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. deprecated: true example: |- { @@ -9300,7 +10780,9 @@ components: example: arn:aws:sso:::permissionSet/asdf-32139302d201d32/ps-f03323201211e1b9 type: string account_id: - description: The ID of an AWS account to which this permission set is provisioned. + description: + The ID of an AWS account to which this permission set is + provisioned. example: 234234234234 type: string required: @@ -9368,22 +10850,34 @@ components: format: uuid type: string max_duration: - description: The maximum duration for which the resource can be requested (in minutes). Use -1 to set to indefinite. Deprecated in favor of `request_configurations`. + description: + The maximum duration for which the resource can be requested (in + minutes). Use -1 to set to indefinite. Deprecated in favor of + `request_configurations`. type: integer example: 120 deprecated: true recommended_duration: - description: The recommended duration for which the resource should be requested (in minutes). Will be the default value in a request. Use -1 to set to indefinite and 0 to unset. Deprecated in favor of `request_configurations`. + description: + The recommended duration for which the resource should be requested + (in minutes). Will be the default value in a request. Use -1 to set + to indefinite and 0 to unset. Deprecated in favor of + `request_configurations`. type: integer example: 120 deprecated: true require_manager_approval: - description: A bool representing whether or not access requests to the resource require manager approval. + description: + A bool representing whether or not access requests to the resource + require manager approval. example: False type: boolean deprecated: true require_support_ticket: - description: A bool representing whether or not access requests to the resource require an access ticket. Deprecated in favor of `request_configurations`. + description: + A bool representing whether or not access requests to the resource + require an access ticket. Deprecated in favor of + `request_configurations`. example: False type: boolean deprecated: true @@ -9394,20 +10888,30 @@ components: type: string deprecated: true require_mfa_to_approve: - description: A bool representing whether or not to require MFA for reviewers to approve requests for this resource. + description: + A bool representing whether or not to require MFA for reviewers to + approve requests for this resource. example: False type: boolean require_mfa_to_request: - description: A bool representing whether or not to require MFA for requesting access to this resource. Deprecated in favor of `request_configurations`. + description: + A bool representing whether or not to require MFA for requesting + access to this resource. Deprecated in favor of + `request_configurations`. example: False type: boolean deprecated: true require_mfa_to_connect: - description: A bool representing whether or not to require MFA to connect to this resource. + description: + A bool representing whether or not to require MFA to connect to + this resource. example: False type: boolean auto_approval: - description: A bool representing whether or not to automatically approve requests to this resource. Deprecated in favor of `request_configurations`. + description: + A bool representing whether or not to automatically approve + requests to this resource. Deprecated in favor of + `request_configurations`. example: False type: boolean deprecated: true @@ -9428,28 +10932,46 @@ components: format: uuid type: string request_template_id: - description: The ID of the associated request template. Deprecated in favor of `request_configurations`. + description: + The ID of the associated request template. Deprecated in favor of + `request_configurations`. example: 06851574-e50d-40ca-8c78-f72ae6ab4304 format: uuid type: string deprecated: true is_requestable: - description: A bool representing whether or not to allow access requests to this resource. Deprecated in favor of `request_configurations`. + description: + A bool representing whether or not to allow access requests to this + resource. Deprecated in favor of `request_configurations`. example: False type: boolean deprecated: true extensions_duration_in_minutes: - 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. + 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. type: integer example: 120 deprecated: true + parent_resource_id: + description: The ID of the parent resource. + example: f454d283-ca67-4a8a-bdbb-df212eca5345 + format: uuid + type: string + nullable: true request_configurations: type: array items: $ref: "#/components/schemas/RequestConfiguration" - description: A list of configurations for requests to this resource. If not provided, the default request configuration will be used. + description: + A list of configurations for requests to this resource. If not + provided, the default request configuration will be used. request_configuration_list: - 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`. + 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`. $ref: "#/components/schemas/CreateRequestConfigurationInfoList" deprecated: true example: @@ -9512,8 +11034,8 @@ components: properties: next: description: - The cursor with which to continue pagination if additional - result pages exist. + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -9650,8 +11172,8 @@ components: properties: next: description: - The cursor with which to continue pagination if additional - result pages exist. + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -9866,6 +11388,23 @@ components: - name - admin_owner_id - description + PaginatedAccessRulesList: + properties: + next: + description: The cursor with which to continue pagination if additional result pages exist. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + type: string + previous: + description: The cursor used to retrieve the previous page of results. + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + type: string + results: + items: + $ref: "#/components/schemas/AccessRule" + type: array + required: + - results + type: object AccessRule: description: |- # Access Rule Object @@ -9873,7 +11412,7 @@ components: The `AccessRule` object is used to represent an access rule configuration. ### Usage Example - Get access rule configurations from the `GET Access Rule Configs` endpoint. + List access rules from the `GET /access-rules` endpoint, or retrieve a single access rule from the `GET /access-rules/{access_rule_id}` endpoint. properties: access_rule_id: description: The ID (group ID) of the access rule. @@ -9932,6 +11471,10 @@ components: type: array items: $ref: "#/components/schemas/TagSelector" + attribute_selectors: + type: array + items: + $ref: "#/components/schemas/UserAttributeSelector" required: - selectors TagSelector: @@ -9947,6 +11490,19 @@ components: - key - value - connection_id + UserAttributeSelector: + properties: + attribute: + type: string + enum: + - HR_IDP_STATUS + values: + type: array + items: + type: string + required: + - attribute + - values PaginatedOwnersList: example: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -9963,8 +11519,8 @@ components: properties: next: description: - The cursor with which to continue pagination if additional - result pages exist. + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -10005,7 +11561,9 @@ components: example: This owner represents the API team owners. type: string access_request_escalation_period: - description: The amount of time (in minutes) before the next reviewer is notified. Use 0 to remove escalation policy. + description: + The amount of time (in minutes) before the next reviewer is + notified. Use 0 to remove escalation policy. type: integer example: 120 reviewer_message_channel_id: @@ -10043,11 +11601,15 @@ components: example: This owner represents the API team owners. type: string access_request_escalation_period: - description: The amount of time (in minutes) before the next reviewer is notified. Use 0 to remove escalation policy. + description: + The amount of time (in minutes) before the next reviewer is + notified. Use 0 to remove escalation policy. type: integer example: 120 user_ids: - description: Users to add to the created owner. If setting a source_group_id this list must be empty. + description: + Users to add to the created owner. If setting a source_group_id + this list must be empty. example: - 7870617d-e72a-47f5-a84c-693817ab4567 - 1520617d-e72a-47f5-a84c-693817ab48ad2 @@ -10113,15 +11675,21 @@ components: example: This owner represents the API team owners. type: string access_request_escalation_period: - description: The amount of time (in minutes) before the next reviewer is notified. Use 0 to remove escalation policy. + description: + The amount of time (in minutes) before the next reviewer is + notified. Use 0 to remove escalation policy. example: 120 type: integer reviewer_message_channel_id: - description: The message channel id for the reviewer channel. Use "" to remove an existing message channel. + description: + The message channel id for the reviewer channel. Use "" to remove + an existing message channel. example: 37cb7e41-12ba-46da-92ff-030abe0450b1 type: string source_group_id: - description: Sync this owner's user list with a source group. Use "" to remove an existing source group. + description: + Sync this owner's user list with a source group. Use "" to remove + an existing source group. example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 format: uuid type: string @@ -10190,31 +11758,46 @@ components: description: The condition for the request configuration. $ref: "#/components/schemas/Condition" allow_requests: - description: A bool representing whether or not to allow requests for this resource. + description: + A bool representing whether or not to allow requests for this + resource. example: True type: boolean auto_approval: - description: A bool representing whether or not to automatically approve requests for this resource. + description: + A bool representing whether or not to automatically approve + requests for this resource. example: False type: boolean require_mfa_to_request: - description: A bool representing whether or not to require MFA for requesting access to this resource. + description: + A bool representing whether or not to require MFA for requesting + access to this resource. example: False type: boolean max_duration_minutes: - description: The maximum duration for which the resource can be requested (in minutes). + description: + The maximum duration for which the resource can be requested (in + minutes). type: integer example: 120 recommended_duration_minutes: - description: The recommended duration for which the resource should be requested (in minutes). -1 represents an indefinite duration. + description: + The recommended duration for which the resource should be requested + (in minutes). -1 represents an indefinite duration. type: integer example: 120 require_support_ticket: - description: A bool representing whether or not access requests to the resource require an access ticket. + description: + A bool representing whether or not access requests to the resource + require an access ticket. example: False type: boolean extensions_duration_in_minutes: - 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. + 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. type: integer example: 120 request_template_id: @@ -10343,7 +11926,9 @@ components: example: private $ref: "#/components/schemas/VisibilityInfo" linked_audit_message_channel_ids: - description: The IDs of the audit message channels linked to the configuration template. + description: + The IDs of the audit message channels linked to the configuration + template. example: - 37cb7e41-12ba-46da-92ff-030abe0450b1 - 37cb7e41-12ba-46da-92ff-030abe0450b2 @@ -10352,7 +11937,9 @@ components: format: uuid type: array member_oncall_schedule_ids: - description: The IDs of the on-call schedules linked to the configuration template. + description: + The IDs of the on-call schedules linked to the configuration + template. example: - 37cb7e41-12ba-46da-92ff-030abe0450b1 - 37cb7e41-12ba-46da-92ff-030abe0450b2 @@ -10361,7 +11948,9 @@ components: format: uuid type: array break_glass_user_ids: - description: The IDs of the break glass users linked to the configuration template. + description: + The IDs of the break glass users linked to the configuration + template. example: - 37cb7e41-12ba-46da-92ff-030abe0450b1 - 37cb7e41-12ba-46da-92ff-030abe0450b2 @@ -10370,11 +11959,15 @@ components: format: uuid type: array require_mfa_to_approve: - description: A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template. + description: + A bool representing whether or not to require MFA for reviewers to + approve requests for this configuration template. example: False type: boolean require_mfa_to_connect: - description: A bool representing whether or not to require MFA to connect to resources associated with this configuration template. + description: + A bool representing whether or not to require MFA to connect to + resources associated with this configuration template. example: False type: boolean name: @@ -10385,9 +11978,14 @@ components: type: array items: $ref: "#/components/schemas/RequestConfiguration" - description: The request configuration list of the configuration template. If not provided, the default request configuration will be used. + description: + The request configuration list of the configuration template. If + not provided, the default request configuration will be used. request_configuration_list: - 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`. + 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`. $ref: "#/components/schemas/CreateRequestConfigurationInfoList" deprecated: true example: @@ -10428,7 +12026,9 @@ components: ticket_propagation: $ref: "#/components/schemas/TicketPropagationConfiguration" custom_request_notification: - description: Custom request notification sent upon request approval for this configuration template. + description: + Custom request notification sent upon request approval for this + configuration template. type: string maxLength: 800 nullable: true @@ -10478,7 +12078,9 @@ components: example: private $ref: "#/components/schemas/VisibilityInfo" linked_audit_message_channel_ids: - description: The IDs of the audit message channels linked to the configuration template. + description: + The IDs of the audit message channels linked to the configuration + template. example: - 37cb7e41-12ba-46da-92ff-030abe0450b1 - 37cb7e41-12ba-46da-92ff-030abe0450b2 @@ -10487,12 +12089,16 @@ components: format: uuid type: array request_configuration_id: - description: The ID of the request configuration linked to the configuration template. + description: + The ID of the request configuration linked to the configuration + template. example: 7c86c85d-0651-43e2-a748-d69d658418e8 format: uuid type: string member_oncall_schedule_ids: - description: The IDs of the on-call schedules linked to the configuration template. + description: + The IDs of the on-call schedules linked to the configuration + template. example: - 37cb7e41-12ba-46da-92ff-030abe0450b1 - 7c86c85d-0651-43e2-a748-d69d658418e8 @@ -10501,7 +12107,9 @@ components: format: uuid type: array break_glass_user_ids: - description: The IDs of the break glass users linked to the configuration template. + description: + The IDs of the break glass users linked to the configuration + template. example: - 37cb7e41-12ba-46da-92ff-030abe0450b1 - 37cb7e41-12ba-46da-92ff-030abe0450b2 @@ -10510,23 +12118,31 @@ components: format: uuid type: array require_mfa_to_approve: - description: A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template. + description: + A bool representing whether or not to require MFA for reviewers to + approve requests for this configuration template. example: False type: boolean require_mfa_to_connect: - description: A bool representing whether or not to require MFA to connect to resources associated with this configuration template. + description: + A bool representing whether or not to require MFA to connect to + resources associated with this configuration template. example: False type: boolean ticket_propagation: $ref: "#/components/schemas/TicketPropagationConfiguration" custom_request_notification: - description: Custom request notification sent upon request approval for this configuration template. + description: + Custom request notification sent upon request approval for this + configuration template. type: string maxLength: 800 nullable: true example: "Check your email to register your account." TicketPropagationConfiguration: - description: Configuration for ticket propagation, when enabled, a ticket will be created for access changes related to the users in this resource. + description: + Configuration for ticket propagation, when enabled, a ticket will + be created for access changes related to the users in this resource. type: object properties: enabled_on_grant: @@ -10587,7 +12203,9 @@ components: example: private $ref: "#/components/schemas/VisibilityInfo" linked_audit_message_channel_ids: - description: The IDs of the audit message channels linked to the configuration template. + description: + The IDs of the audit message channels linked to the configuration + template. example: - 37cb7e41-12ba-46da-92ff-030abe0450b1 - 37cb7e41-12ba-46da-92ff-030abe0450b2 @@ -10601,7 +12219,9 @@ components: $ref: "#/components/schemas/RequestConfiguration" description: The request configuration list linked to the configuration template. request_configuration_list: - description: The request configuration list linked to the configuration template. Deprecated in favor of `request_configurations`. + description: + The request configuration list linked to the configuration + template. Deprecated in favor of `request_configurations`. $ref: "#/components/schemas/CreateRequestConfigurationInfoList" deprecated: true example: @@ -10640,7 +12260,9 @@ components: stage: 1 priority: 1 member_oncall_schedule_ids: - description: The IDs of the on-call schedules linked to the configuration template. + description: + The IDs of the on-call schedules linked to the configuration + template. example: - 37cb7e41-12ba-46da-92ff-030abe0450b1 - 7c86c85d-0651-43e2-a748-d69d658418e8 @@ -10649,7 +12271,9 @@ components: format: uuid type: array break_glass_user_ids: - description: The IDs of the break glass users linked to the configuration template. + description: + The IDs of the break glass users linked to the configuration + template. example: - 37cb7e41-12ba-46da-92ff-030abe0450b1 - 37cb7e41-12ba-46da-92ff-030abe0450b2 @@ -10658,17 +12282,23 @@ components: format: uuid type: array require_mfa_to_approve: - description: A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template. + description: + A bool representing whether or not to require MFA for reviewers to + approve requests for this configuration template. example: False type: boolean require_mfa_to_connect: - description: A bool representing whether or not to require MFA to connect to resources associated with this configuration template. + description: + A bool representing whether or not to require MFA to connect to + resources associated with this configuration template. example: False type: boolean ticket_propagation: $ref: "#/components/schemas/TicketPropagationConfiguration" custom_request_notification: - description: Custom request notification sent upon request approval for this configuration template. + description: + Custom request notification sent upon request approval for this + configuration template. type: string maxLength: 800 nullable: true @@ -10712,7 +12342,9 @@ components: type: object properties: id: - description: The ID of the resource requested. Should not be specified if group_id is specified. + description: + The ID of the resource requested. Should not be specified if + group_id is specified. example: group283-ca87-4a8a-bdbb-df212eca5353 format: uuid type: string @@ -10721,7 +12353,10 @@ components: example: arn:aws:iam::490306337630:role/SupportUser type: string access_level_name: - description: The ID of the access level requested on the remote system. This field is deprecated and no longer required. We will populate based on the access_level_remote_id. + description: + The ID of the access level requested on the remote system. This + field is deprecated and no longer required. We will populate + based on the access_level_remote_id. example: arn:aws:iam::490306337630:role/SupportUser type: string deprecated: true @@ -10731,7 +12366,9 @@ components: type: object properties: id: - description: The ID of the group requested. Should not be specified if resource_id is specified. + description: + The ID of the group requested. Should not be specified if + resource_id is specified. example: f454d283-ca87-4a8a-bdbb-df212eca5353 format: uuid type: string @@ -10746,12 +12383,16 @@ components: required: - id target_user_id: - description: The ID of the user to be granted access. Should not be specified if target_group_id is specified. + description: + The ID of the user to be granted access. Should not be specified if + target_group_id is specified. example: userd283-ca87-4a8a-bdbb-df212eca5353 format: uuid type: string target_group_id: - description: The ID of the group the request is for. Should not be specified if target_user_id is specified. + description: + The ID of the group the request is for. Should not be specified if + target_user_id is specified. example: userd283-ca87-4a8a-bdbb-df212eca5353 format: uuid type: string @@ -10774,7 +12415,9 @@ components: - identifier - url duration_minutes: - description: The duration of the request in minutes. -1 represents an indefinite duration + description: + The duration of the request in minutes. -1 represents an indefinite + duration type: integer minimum: -1 custom_metadata: @@ -10929,8 +12572,8 @@ components: type: string next: description: - The cursor with which to continue pagination if additional - result pages exist. + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -10985,8 +12628,8 @@ components: type: string next: description: - The cursor with which to continue pagination if additional - result pages exist. + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -11041,8 +12684,8 @@ components: type: string next: description: - The cursor with which to continue pagination if additional - result pages exist. + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -11077,7 +12720,9 @@ components: type: object properties: target_ids: - description: The IDs of the entities that this permission applies to. If empty of missing, the permission will have untargeted scope. + description: + The IDs of the entities that this permission applies to. If empty + of missing, the permission will have untargeted scope. example: - a381e7a3-e5e0-4c48-b1d6-4ccb4c191bc1 - 8294e9c9-deb6-48e9-9c99-da2a1e04a87f @@ -11097,7 +12742,9 @@ components: - allow_all SyncTask: type: object - description: Represents a sync task that has been completed, either successfully or with errors. + description: + Represents a sync task that has been completed, either successfully + or with errors. properties: id: description: The ID of the sync task. @@ -11189,7 +12836,9 @@ components: items: $ref: "#/components/schemas/Delegation" next: - description: The cursor with which to continue pagination if additional result pages exist. + description: + The cursor with which to continue pagination if additional result + pages exist. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw nullable: true type: string @@ -11204,7 +12853,8 @@ components: type: integer CreateDelegationRequest: type: object - description: Request body for creating a new delegation of access review requests from one user to another. + description: Request body for creating a new delegation of access review + requests from one user to another. properties: delegator_user_id: description: The ID of the user delegating their access review requests. @@ -11236,6 +12886,255 @@ components: - start_time - end_time - reason + ApiAccessLevelEnum: + description: The access level of an API token. + enum: + - READ_ONLY + - FULL_ACCESS + type: string + EventStreamConnectionTypeEnum: + description: The type of event stream connection. + enum: + - WEBHOOK + type: string + WebhookAuthTypeEnum: + description: The authentication type for webhook connections. + enum: + - NONE + - API_KEY + - HMAC + type: string + WebhookApiKeyLocationEnum: + description: Where the API key is placed in webhook requests. + enum: + - HEADER + - QUERY_PARAM + type: string + WebhookApiKeyCredential: + description: An API key credential for webhook authentication. + properties: + id: + description: The unique identifier for the credential. + format: uuid + type: string + name: + description: The name of the API key. + type: string + value: + description: The value of the API key. + type: string + location: + $ref: "#/components/schemas/WebhookApiKeyLocationEnum" + required: + - id + - name + - value + - location + type: object + WebhookHmacCredential: + description: An HMAC credential for webhook authentication. + properties: + id: + description: The unique identifier for the credential. + format: uuid + type: string + secret: + description: The HMAC secret value. + type: string + created_at: + description: When the credential was created. + format: date-time + type: string + required: + - id + - secret + - created_at + type: object + WebhookCredentials: + description: Authentication credentials for a webhook connection. + properties: + auth_type: + $ref: "#/components/schemas/WebhookAuthTypeEnum" + api_key_credentials: + description: API key credentials, present when auth_type is API_KEY. + items: + $ref: "#/components/schemas/WebhookApiKeyCredential" + type: array + hmac_credential_1: + description: Primary HMAC credential, present when auth_type is HMAC. + nullable: true + $ref: "#/components/schemas/WebhookHmacCredential" + hmac_credential_2: + description: Secondary HMAC credential for rotation, present when auth_type is HMAC. + nullable: true + $ref: "#/components/schemas/WebhookHmacCredential" + required: + - auth_type + type: object + EventStreamConnection: + description: The connection configuration for an event stream. + properties: + name: + description: The name of the connection. + type: string + connection_type: + $ref: "#/components/schemas/EventStreamConnectionTypeEnum" + enabled: + description: Whether the connection is enabled. + type: boolean + webhook_url: + description: The webhook URL, present when connection_type is WEBHOOK. + type: string + credentials: + $ref: "#/components/schemas/WebhookCredentials" + required: + - name + - connection_type + - enabled + type: object + EventStream: + description: An event streaming connection that publishes events to an external system. + properties: + event_stream_id: + description: The ID of the event stream. + format: uuid + type: string + connection: + $ref: "#/components/schemas/EventStreamConnection" + required: + - event_stream_id + - connection + type: object + EventStreamList: + description: A list of event streams. + properties: + event_streams: + items: + $ref: "#/components/schemas/EventStream" + type: array + required: + - event_streams + type: object + CreateEventStreamInfo: + description: Information needed to create an event stream. + properties: + name: + description: The name for the event stream. + type: string + connection_type: + $ref: "#/components/schemas/EventStreamConnectionTypeEnum" + webhook_url: + description: The webhook URL. Required when connection_type is WEBHOOK. + type: string + credentials: + $ref: "#/components/schemas/WebhookCredentials" + required: + - name + - connection_type + type: object + UpdateEventStreamInfo: + description: Information needed to update an event stream. + properties: + name: + description: Updated name for the event stream. + type: string + enabled: + description: Whether the event stream should be enabled. + type: boolean + webhook_url: + description: Updated webhook URL. + type: string + credentials: + $ref: "#/components/schemas/WebhookCredentials" + type: object + Token: + description: A first-party API token. + example: + token_id: f454d283-ca87-4a8a-bdbb-df212eca5353 + created_at: 2022-01-23T04:56:07Z + 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 + properties: + token_id: + description: The ID of the API token. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + format: uuid + type: string + created_at: + description: The date and time the token was created. + example: 2022-01-23T04:56:07Z + format: date-time + type: string + token_label: + description: A human-readable label for the token. + example: My API Token + type: string + creator_user_id: + description: The ID of the user who created the token. + example: d4a7d928-783e-4599-8ec6-088d635a5bcc + format: uuid + type: string + user_id: + description: The ID of the user the token authenticates as. + example: d4a7d928-783e-4599-8ec6-088d635a5bcc + format: uuid + type: string + last_used_at: + description: The date and time the token was last used. + example: 2022-01-23T04:56:07Z + format: date-time + nullable: true + type: string + access_level: + $ref: "#/components/schemas/ApiAccessLevelEnum" + expires_at: + description: The date and time the token expires. + example: 2023-01-23T04:56:07Z + format: date-time + nullable: true + type: string + required: + - token_id + - created_at + - token_label + - creator_user_id + - user_id + - access_level + type: object + PaginatedTokensList: + example: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - token_id: f454d283-ca87-4a8a-bdbb-df212eca5353 + created_at: 2022-01-23T04:56:07Z + token_label: My API Token + creator_user_id: d4a7d928-783e-4599-8ec6-088d635a5bcc + user_id: d4a7d928-783e-4599-8ec6-088d635a5bcc + access_level: READ_ONLY + 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/Token" + type: array + required: + - results + type: object securitySchemes: BearerAuth: scheme: bearer diff --git a/api_access_rules.go b/api_access_rules.go index 80c87af..8903389 100644 --- a/api_access_rules.go +++ b/api_access_rules.go @@ -237,6 +237,125 @@ func (a *AccessRulesAPIService) GetAccessRuleExecute(r ApiGetAccessRuleRequest) return localVarReturnValue, localVarHTTPResponse, nil } +type ApiGetAccessRulesRequest struct { + ctx context.Context + ApiService *AccessRulesAPIService + cursor *string + pageSize *int32 +} + +// The pagination cursor value. +func (r ApiGetAccessRulesRequest) Cursor(cursor string) ApiGetAccessRulesRequest { + r.cursor = &cursor + return r +} + +// Number of results to return per page. Default is 200. +func (r ApiGetAccessRulesRequest) PageSize(pageSize int32) ApiGetAccessRulesRequest { + r.pageSize = &pageSize + return r +} + +func (r ApiGetAccessRulesRequest) Execute() (*PaginatedAccessRulesList, *http.Response, error) { + return r.ApiService.GetAccessRulesExecute(r) +} + +/* +GetAccessRules Method for GetAccessRules + +Returns a list of access rules for your organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAccessRulesRequest +*/ +func (a *AccessRulesAPIService) GetAccessRules(ctx context.Context) ApiGetAccessRulesRequest { + return ApiGetAccessRulesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedAccessRulesList +func (a *AccessRulesAPIService) GetAccessRulesExecute(r ApiGetAccessRulesRequest) (*PaginatedAccessRulesList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedAccessRulesList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccessRulesAPIService.GetAccessRules") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/access-rules" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiUpdateAccessRuleRequest struct { ctx context.Context ApiService *AccessRulesAPIService diff --git a/api_event_streams.go b/api_event_streams.go new file mode 100644 index 0000000..73dd574 --- /dev/null +++ b/api_event_streams.go @@ -0,0 +1,440 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// EventStreamsAPIService EventStreamsAPI service +type EventStreamsAPIService service + +type ApiCreateEventStreamRequest struct { + ctx context.Context + ApiService *EventStreamsAPIService + createEventStreamInfo *CreateEventStreamInfo +} + +func (r ApiCreateEventStreamRequest) CreateEventStreamInfo(createEventStreamInfo CreateEventStreamInfo) ApiCreateEventStreamRequest { + r.createEventStreamInfo = &createEventStreamInfo + return r +} + +func (r ApiCreateEventStreamRequest) Execute() (*EventStream, *http.Response, error) { + return r.ApiService.CreateEventStreamExecute(r) +} + +/* +CreateEventStream Create event stream + +Creates a new event streaming connection. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateEventStreamRequest +*/ +func (a *EventStreamsAPIService) CreateEventStream(ctx context.Context) ApiCreateEventStreamRequest { + return ApiCreateEventStreamRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return EventStream +func (a *EventStreamsAPIService) CreateEventStreamExecute(r ApiCreateEventStreamRequest) (*EventStream, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EventStream + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventStreamsAPIService.CreateEventStream") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/event-streams" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createEventStreamInfo == nil { + return localVarReturnValue, nil, reportError("createEventStreamInfo is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createEventStreamInfo + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteEventStreamRequest struct { + ctx context.Context + ApiService *EventStreamsAPIService + eventStreamId string +} + +func (r ApiDeleteEventStreamRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteEventStreamExecute(r) +} + +/* +DeleteEventStream Delete event stream + +Deletes an event streaming connection. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param eventStreamId The ID of the event stream. + @return ApiDeleteEventStreamRequest +*/ +func (a *EventStreamsAPIService) DeleteEventStream(ctx context.Context, eventStreamId string) ApiDeleteEventStreamRequest { + return ApiDeleteEventStreamRequest{ + ApiService: a, + ctx: ctx, + eventStreamId: eventStreamId, + } +} + +// Execute executes the request +func (a *EventStreamsAPIService) DeleteEventStreamExecute(r ApiDeleteEventStreamRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventStreamsAPIService.DeleteEventStream") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/event-streams/{event_stream_id}" + localVarPath = strings.Replace(localVarPath, "{"+"event_stream_id"+"}", url.PathEscape(parameterValueToString(r.eventStreamId, "eventStreamId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetEventStreamsRequest struct { + ctx context.Context + ApiService *EventStreamsAPIService +} + +func (r ApiGetEventStreamsRequest) Execute() (*EventStreamList, *http.Response, error) { + return r.ApiService.GetEventStreamsExecute(r) +} + +/* +GetEventStreams Get event streams + +Returns a list of configured event streaming connections for your organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetEventStreamsRequest +*/ +func (a *EventStreamsAPIService) GetEventStreams(ctx context.Context) ApiGetEventStreamsRequest { + return ApiGetEventStreamsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return EventStreamList +func (a *EventStreamsAPIService) GetEventStreamsExecute(r ApiGetEventStreamsRequest) (*EventStreamList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EventStreamList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventStreamsAPIService.GetEventStreams") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/event-streams" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateEventStreamRequest struct { + ctx context.Context + ApiService *EventStreamsAPIService + eventStreamId string + updateEventStreamInfo *UpdateEventStreamInfo +} + +func (r ApiUpdateEventStreamRequest) UpdateEventStreamInfo(updateEventStreamInfo UpdateEventStreamInfo) ApiUpdateEventStreamRequest { + r.updateEventStreamInfo = &updateEventStreamInfo + return r +} + +func (r ApiUpdateEventStreamRequest) Execute() (*EventStream, *http.Response, error) { + return r.ApiService.UpdateEventStreamExecute(r) +} + +/* +UpdateEventStream Update event stream + +Updates an existing event streaming connection. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param eventStreamId The ID of the event stream. + @return ApiUpdateEventStreamRequest +*/ +func (a *EventStreamsAPIService) UpdateEventStream(ctx context.Context, eventStreamId string) ApiUpdateEventStreamRequest { + return ApiUpdateEventStreamRequest{ + ApiService: a, + ctx: ctx, + eventStreamId: eventStreamId, + } +} + +// Execute executes the request +// @return EventStream +func (a *EventStreamsAPIService) UpdateEventStreamExecute(r ApiUpdateEventStreamRequest) (*EventStream, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EventStream + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventStreamsAPIService.UpdateEventStream") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/event-streams/{event_stream_id}" + localVarPath = strings.Replace(localVarPath, "{"+"event_stream_id"+"}", url.PathEscape(parameterValueToString(r.eventStreamId, "eventStreamId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateEventStreamInfo == nil { + return localVarReturnValue, nil, reportError("updateEventStreamInfo is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateEventStreamInfo + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_groups.go b/api_groups.go index bad3993..0b628ca 100644 --- a/api_groups.go +++ b/api_groups.go @@ -18,6 +18,7 @@ import ( "net/http" "net/url" "strings" + "reflect" ) @@ -1890,6 +1891,7 @@ type ApiGetGroupsRequest struct { groupTypeFilter *GroupTypeEnum groupIds *[]string groupName *string + tagIds *[]string } // The pagination cursor value. @@ -1922,6 +1924,12 @@ func (r ApiGetGroupsRequest) GroupName(groupName string) ApiGetGroupsRequest { return r } +// The IDs of the tags to filter by. Returns only groups that have any of these tags applied. +func (r ApiGetGroupsRequest) TagIds(tagIds []string) ApiGetGroupsRequest { + r.tagIds = &tagIds + return r +} + func (r ApiGetGroupsRequest) Execute() (*PaginatedGroupsList, *http.Response, error) { return r.ApiService.GetGroupsExecute(r) } @@ -1977,6 +1985,17 @@ func (a *GroupsAPIService) GetGroupsExecute(r ApiGetGroupsRequest) (*PaginatedGr if r.groupName != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "group_name", r.groupName, "form", "") } + if r.tagIds != nil { + t := *r.tagIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "tag_ids", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "tag_ids", t, "form", "multi") + } + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/api_opal_queries.go b/api_opal_queries.go new file mode 100644 index 0000000..5ae7e93 --- /dev/null +++ b/api_opal_queries.go @@ -0,0 +1,134 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// OpalQueriesAPIService OpalQueriesAPI service +type OpalQueriesAPIService service + +type ApiRunOpalQueryRequest struct { + ctx context.Context + ApiService *OpalQueriesAPIService + runOpalQueryRequest *RunOpalQueryRequest +} + +func (r ApiRunOpalQueryRequest) RunOpalQueryRequest(runOpalQueryRequest RunOpalQueryRequest) ApiRunOpalQueryRequest { + r.runOpalQueryRequest = &runOpalQueryRequest + return r +} + +func (r ApiRunOpalQueryRequest) Execute() (*OpalQueryResults, *http.Response, error) { + return r.ApiService.RunOpalQueryExecute(r) +} + +/* +RunOpalQuery 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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRunOpalQueryRequest +*/ +func (a *OpalQueriesAPIService) RunOpalQuery(ctx context.Context) ApiRunOpalQueryRequest { + return ApiRunOpalQueryRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OpalQueryResults +func (a *OpalQueriesAPIService) RunOpalQueryExecute(r ApiRunOpalQueryRequest) (*OpalQueryResults, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OpalQueryResults + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OpalQueriesAPIService.RunOpalQuery") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/queries/run" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.runOpalQueryRequest == nil { + return localVarReturnValue, nil, reportError("runOpalQueryRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.runOpalQueryRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_requests.go b/api_requests.go index 3f7e9ba..61811f1 100644 --- a/api_requests.go +++ b/api_requests.go @@ -693,6 +693,8 @@ type ApiGetRequestsRequest struct { endDateFilter *string requesterId *string targetUserId *string + resourceId *string + groupId *string cursor *string pageSize *int32 showPendingOnly *bool @@ -722,6 +724,18 @@ func (r ApiGetRequestsRequest) TargetUserId(targetUserId string) ApiGetRequestsR return r } +// Filter requests by the resource ID that was requested. +func (r ApiGetRequestsRequest) ResourceId(resourceId string) ApiGetRequestsRequest { + r.resourceId = &resourceId + return r +} + +// Filter requests by the group ID that was requested. +func (r ApiGetRequestsRequest) GroupId(groupId string) ApiGetRequestsRequest { + r.groupId = &groupId + return r +} + // The pagination cursor value. func (r ApiGetRequestsRequest) Cursor(cursor string) ApiGetRequestsRequest { r.cursor = &cursor @@ -792,6 +806,12 @@ func (a *RequestsAPIService) GetRequestsExecute(r ApiGetRequestsRequest) (*Reque if r.targetUserId != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "target_user_id", r.targetUserId, "form", "") } + if r.resourceId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "resource_id", r.resourceId, "form", "") + } + if r.groupId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "group_id", r.groupId, "form", "") + } if r.cursor != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") } diff --git a/api_resources.go b/api_resources.go index 0385c1d..f6c22e6 100644 --- a/api_resources.go +++ b/api_resources.go @@ -18,6 +18,7 @@ import ( "net/http" "net/url" "strings" + "reflect" ) @@ -386,6 +387,120 @@ func (a *ResourcesAPIService) CreateResourceExecute(r ApiCreateResourceRequest) return localVarReturnValue, localVarHTTPResponse, nil } +type ApiCreateResourceCustomAccessLevelRequest struct { + ctx context.Context + ApiService *ResourcesAPIService + resourceId string + createResourceCustomAccessLevelInfo *CreateResourceCustomAccessLevelInfo +} + +func (r ApiCreateResourceCustomAccessLevelRequest) CreateResourceCustomAccessLevelInfo(createResourceCustomAccessLevelInfo CreateResourceCustomAccessLevelInfo) ApiCreateResourceCustomAccessLevelRequest { + r.createResourceCustomAccessLevelInfo = &createResourceCustomAccessLevelInfo + return r +} + +func (r ApiCreateResourceCustomAccessLevelRequest) Execute() (*ResourceCustomAccessLevelResponse, *http.Response, error) { + return r.ApiService.CreateResourceCustomAccessLevelExecute(r) +} + +/* +CreateResourceCustomAccessLevel Method for CreateResourceCustomAccessLevel + +Creates a custom access level on a resource. If the resource is a parent type, the role is created on all child resources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param resourceId The ID of the resource. + @return ApiCreateResourceCustomAccessLevelRequest +*/ +func (a *ResourcesAPIService) CreateResourceCustomAccessLevel(ctx context.Context, resourceId string) ApiCreateResourceCustomAccessLevelRequest { + return ApiCreateResourceCustomAccessLevelRequest{ + ApiService: a, + ctx: ctx, + resourceId: resourceId, + } +} + +// Execute executes the request +// @return ResourceCustomAccessLevelResponse +func (a *ResourcesAPIService) CreateResourceCustomAccessLevelExecute(r ApiCreateResourceCustomAccessLevelRequest) (*ResourceCustomAccessLevelResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResourceCustomAccessLevelResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourcesAPIService.CreateResourceCustomAccessLevel") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/resources/{resource_id}/custom-access-levels" + localVarPath = strings.Replace(localVarPath, "{"+"resource_id"+"}", url.PathEscape(parameterValueToString(r.resourceId, "resourceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createResourceCustomAccessLevelInfo == nil { + return localVarReturnValue, nil, reportError("createResourceCustomAccessLevelInfo is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createResourceCustomAccessLevelInfo + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiDeleteResourceRequest struct { ctx context.Context ApiService *ResourcesAPIService @@ -478,6 +593,102 @@ func (a *ResourcesAPIService) DeleteResourceExecute(r ApiDeleteResourceRequest) return localVarHTTPResponse, nil } +type ApiDeleteResourceCustomAccessLevelRequest struct { + ctx context.Context + ApiService *ResourcesAPIService + resourceId string + accessLevelRemoteId string +} + +func (r ApiDeleteResourceCustomAccessLevelRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteResourceCustomAccessLevelExecute(r) +} + +/* +DeleteResourceCustomAccessLevel Method for DeleteResourceCustomAccessLevel + +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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param resourceId The ID of the resource. + @param accessLevelRemoteId The remote ID of the access level. + @return ApiDeleteResourceCustomAccessLevelRequest +*/ +func (a *ResourcesAPIService) DeleteResourceCustomAccessLevel(ctx context.Context, resourceId string, accessLevelRemoteId string) ApiDeleteResourceCustomAccessLevelRequest { + return ApiDeleteResourceCustomAccessLevelRequest{ + ApiService: a, + ctx: ctx, + resourceId: resourceId, + accessLevelRemoteId: accessLevelRemoteId, + } +} + +// Execute executes the request +func (a *ResourcesAPIService) DeleteResourceCustomAccessLevelExecute(r ApiDeleteResourceCustomAccessLevelRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourcesAPIService.DeleteResourceCustomAccessLevel") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/resources/{resource_id}/custom-access-levels/{access_level_remote_id}" + localVarPath = strings.Replace(localVarPath, "{"+"resource_id"+"}", url.PathEscape(parameterValueToString(r.resourceId, "resourceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"access_level_remote_id"+"}", url.PathEscape(parameterValueToString(r.accessLevelRemoteId, "accessLevelRemoteId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + type ApiDeleteResourceNhiRequest struct { ctx context.Context ApiService *ResourcesAPIService @@ -793,6 +1004,109 @@ func (a *ResourcesAPIService) GetResourceExecute(r ApiGetResourceRequest) (*Reso return localVarReturnValue, localVarHTTPResponse, nil } +type ApiGetResourceCustomAccessLevelsRequest struct { + ctx context.Context + ApiService *ResourcesAPIService + resourceId string +} + +func (r ApiGetResourceCustomAccessLevelsRequest) Execute() (*ResourceCustomAccessLevelList, *http.Response, error) { + return r.ApiService.GetResourceCustomAccessLevelsExecute(r) +} + +/* +GetResourceCustomAccessLevels Method for GetResourceCustomAccessLevels + +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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param resourceId The ID of the resource. + @return ApiGetResourceCustomAccessLevelsRequest +*/ +func (a *ResourcesAPIService) GetResourceCustomAccessLevels(ctx context.Context, resourceId string) ApiGetResourceCustomAccessLevelsRequest { + return ApiGetResourceCustomAccessLevelsRequest{ + ApiService: a, + ctx: ctx, + resourceId: resourceId, + } +} + +// Execute executes the request +// @return ResourceCustomAccessLevelList +func (a *ResourcesAPIService) GetResourceCustomAccessLevelsExecute(r ApiGetResourceCustomAccessLevelsRequest) (*ResourceCustomAccessLevelList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResourceCustomAccessLevelList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourcesAPIService.GetResourceCustomAccessLevels") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/resources/{resource_id}/custom-access-levels" + localVarPath = strings.Replace(localVarPath, "{"+"resource_id"+"}", url.PathEscape(parameterValueToString(r.resourceId, "resourceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiGetResourceGroupsRequest struct { ctx context.Context ApiService *ResourcesAPIService @@ -1868,6 +2182,7 @@ type ApiGetResourcesRequest struct { parentResourceId *string ancestorResourceId *string remoteId *string + tagIds *[]string } // The pagination cursor value. @@ -1918,6 +2233,12 @@ func (r ApiGetResourcesRequest) RemoteId(remoteId string) ApiGetResourcesRequest return r } +// The IDs of the tags to filter by. Returns only resources that have any of these tags applied. +func (r ApiGetResourcesRequest) TagIds(tagIds []string) ApiGetResourcesRequest { + r.tagIds = &tagIds + return r +} + func (r ApiGetResourcesRequest) Execute() (*PaginatedResourcesList, *http.Response, error) { return r.ApiService.GetResourcesExecute(r) } @@ -1982,6 +2303,17 @@ func (a *ResourcesAPIService) GetResourcesExecute(r ApiGetResourcesRequest) (*Pa if r.remoteId != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "remote_id", r.remoteId, "form", "") } + if r.tagIds != nil { + t := *r.tagIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "tag_ids", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "tag_ids", t, "form", "multi") + } + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2879,6 +3211,124 @@ func (a *ResourcesAPIService) SetResourceVisibilityExecute(r ApiSetResourceVisib return localVarReturnValue, localVarHTTPResponse, nil } +type ApiUpdateResourceCustomAccessLevelRequest struct { + ctx context.Context + ApiService *ResourcesAPIService + resourceId string + accessLevelRemoteId string + updateResourceCustomAccessLevelInfo *UpdateResourceCustomAccessLevelInfo +} + +func (r ApiUpdateResourceCustomAccessLevelRequest) UpdateResourceCustomAccessLevelInfo(updateResourceCustomAccessLevelInfo UpdateResourceCustomAccessLevelInfo) ApiUpdateResourceCustomAccessLevelRequest { + r.updateResourceCustomAccessLevelInfo = &updateResourceCustomAccessLevelInfo + return r +} + +func (r ApiUpdateResourceCustomAccessLevelRequest) Execute() (*ResourceCustomAccessLevelResponse, *http.Response, error) { + return r.ApiService.UpdateResourceCustomAccessLevelExecute(r) +} + +/* +UpdateResourceCustomAccessLevel Method for UpdateResourceCustomAccessLevel + +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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param resourceId The ID of the resource. + @param accessLevelRemoteId The remote ID of the access level. + @return ApiUpdateResourceCustomAccessLevelRequest +*/ +func (a *ResourcesAPIService) UpdateResourceCustomAccessLevel(ctx context.Context, resourceId string, accessLevelRemoteId string) ApiUpdateResourceCustomAccessLevelRequest { + return ApiUpdateResourceCustomAccessLevelRequest{ + ApiService: a, + ctx: ctx, + resourceId: resourceId, + accessLevelRemoteId: accessLevelRemoteId, + } +} + +// Execute executes the request +// @return ResourceCustomAccessLevelResponse +func (a *ResourcesAPIService) UpdateResourceCustomAccessLevelExecute(r ApiUpdateResourceCustomAccessLevelRequest) (*ResourceCustomAccessLevelResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResourceCustomAccessLevelResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ResourcesAPIService.UpdateResourceCustomAccessLevel") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/resources/{resource_id}/custom-access-levels/{access_level_remote_id}" + localVarPath = strings.Replace(localVarPath, "{"+"resource_id"+"}", url.PathEscape(parameterValueToString(r.resourceId, "resourceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"access_level_remote_id"+"}", url.PathEscape(parameterValueToString(r.accessLevelRemoteId, "accessLevelRemoteId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateResourceCustomAccessLevelInfo == nil { + return localVarReturnValue, nil, reportError("updateResourceCustomAccessLevelInfo is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateResourceCustomAccessLevelInfo + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiUpdateResourceUserRequest struct { ctx context.Context ApiService *ResourcesAPIService diff --git a/api_tokens.go b/api_tokens.go new file mode 100644 index 0000000..07290cd --- /dev/null +++ b/api_tokens.go @@ -0,0 +1,256 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// TokensAPIService TokensAPI service +type TokensAPIService service + +type ApiDeleteTokenRequest struct { + ctx context.Context + ApiService *TokensAPIService + tokenId string +} + +func (r ApiDeleteTokenRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteTokenExecute(r) +} + +/* +DeleteToken Delete token + +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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param tokenId The ID of the token to delete. + @return ApiDeleteTokenRequest +*/ +func (a *TokensAPIService) DeleteToken(ctx context.Context, tokenId string) ApiDeleteTokenRequest { + return ApiDeleteTokenRequest{ + ApiService: a, + ctx: ctx, + tokenId: tokenId, + } +} + +// Execute executes the request +func (a *TokensAPIService) DeleteTokenExecute(r ApiDeleteTokenRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TokensAPIService.DeleteToken") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tokens/{token_id}" + localVarPath = strings.Replace(localVarPath, "{"+"token_id"+"}", url.PathEscape(parameterValueToString(r.tokenId, "tokenId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetTokensRequest struct { + ctx context.Context + ApiService *TokensAPIService + cursor *string + pageSize *int32 + tokenIds *[]string + userId *string +} + +// The pagination cursor value. +func (r ApiGetTokensRequest) Cursor(cursor string) ApiGetTokensRequest { + r.cursor = &cursor + return r +} + +// Number of results to return per page. Default is 200. +func (r ApiGetTokensRequest) PageSize(pageSize int32) ApiGetTokensRequest { + r.pageSize = &pageSize + return r +} + +// Filter by token IDs. +func (r ApiGetTokensRequest) TokenIds(tokenIds []string) ApiGetTokensRequest { + r.tokenIds = &tokenIds + return r +} + +// Filter by user ID. +func (r ApiGetTokensRequest) UserId(userId string) ApiGetTokensRequest { + r.userId = &userId + return r +} + +func (r ApiGetTokensRequest) Execute() (*PaginatedTokensList, *http.Response, error) { + return r.ApiService.GetTokensExecute(r) +} + +/* +GetTokens Get tokens + +Returns a list of first-party API tokens for your organization. Requires admin access. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetTokensRequest +*/ +func (a *TokensAPIService) GetTokens(ctx context.Context) ApiGetTokensRequest { + return ApiGetTokensRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedTokensList +func (a *TokensAPIService) GetTokensExecute(r ApiGetTokensRequest) (*PaginatedTokensList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedTokensList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TokensAPIService.GetTokens") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tokens" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.tokenIds != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "token_ids", r.tokenIds, "form", "csv") + } + if r.userId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "user_id", r.userId, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_users.go b/api_users.go index d8d67e9..c7e9eba 100644 --- a/api_users.go +++ b/api_users.go @@ -306,6 +306,7 @@ type ApiGetUsersRequest struct { ApiService *UsersAPIService cursor *string pageSize *int32 + tagIds *[]string } // The pagination cursor value. @@ -320,6 +321,12 @@ func (r ApiGetUsersRequest) PageSize(pageSize int32) ApiGetUsersRequest { return r } +// The IDs of the tags to filter by. Returns only users that have any of these tags applied. +func (r ApiGetUsersRequest) TagIds(tagIds []string) ApiGetUsersRequest { + r.tagIds = &tagIds + return r +} + func (r ApiGetUsersRequest) Execute() (*PaginatedUsersList, *http.Response, error) { return r.ApiService.GetUsersExecute(r) } @@ -366,6 +373,17 @@ func (a *UsersAPIService) GetUsersExecute(r ApiGetUsersRequest) (*PaginatedUsers if r.pageSize != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") } + if r.tagIds != nil { + t := *r.tagIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "tag_ids", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "tag_ids", t, "form", "multi") + } + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/client.go b/client.go index e638802..6451026 100644 --- a/client.go +++ b/client.go @@ -60,6 +60,8 @@ type APIClient struct { DelegationsAPI *DelegationsAPIService + EventStreamsAPI *EventStreamsAPIService + EventsAPI *EventsAPIService GroupBindingsAPI *GroupBindingsAPIService @@ -74,6 +76,8 @@ type APIClient struct { OnCallSchedulesAPI *OnCallSchedulesAPIService + OpalQueriesAPI *OpalQueriesAPIService + OwnersAPI *OwnersAPIService RequestsAPI *RequestsAPIService @@ -84,6 +88,8 @@ type APIClient struct { TagsAPI *TagsAPIService + TokensAPI *TokensAPIService + UarsAPI *UarsAPIService UsersAPI *UsersAPIService @@ -110,6 +116,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.BundlesAPI = (*BundlesAPIService)(&c.common) c.ConfigurationTemplatesAPI = (*ConfigurationTemplatesAPIService)(&c.common) c.DelegationsAPI = (*DelegationsAPIService)(&c.common) + c.EventStreamsAPI = (*EventStreamsAPIService)(&c.common) c.EventsAPI = (*EventsAPIService)(&c.common) c.GroupBindingsAPI = (*GroupBindingsAPIService)(&c.common) c.GroupsAPI = (*GroupsAPIService)(&c.common) @@ -117,11 +124,13 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.MessageChannelsAPI = (*MessageChannelsAPIService)(&c.common) c.NonHumanIdentitiesAPI = (*NonHumanIdentitiesAPIService)(&c.common) c.OnCallSchedulesAPI = (*OnCallSchedulesAPIService)(&c.common) + c.OpalQueriesAPI = (*OpalQueriesAPIService)(&c.common) c.OwnersAPI = (*OwnersAPIService)(&c.common) c.RequestsAPI = (*RequestsAPIService)(&c.common) c.ResourcesAPI = (*ResourcesAPIService)(&c.common) c.SessionsAPI = (*SessionsAPIService)(&c.common) c.TagsAPI = (*TagsAPIService)(&c.common) + c.TokensAPI = (*TokensAPIService)(&c.common) c.UarsAPI = (*UarsAPIService)(&c.common) c.UsersAPI = (*UsersAPIService)(&c.common) diff --git a/docs/AccessEntityFilters.md b/docs/AccessEntityFilters.md new file mode 100644 index 0000000..dd0a171 --- /dev/null +++ b/docs/AccessEntityFilters.md @@ -0,0 +1,316 @@ +# AccessEntityFilters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EntityTypes** | Pointer to **[]string** | Filter by entity type. Only RESOURCE, GROUP, and USER are queryable via OpalQuery. | [optional] +**EntityItemTypes** | Pointer to [**[]EntityItemTypeEnum**](EntityItemTypeEnum.md) | Filter by entity item types. | [optional] +**EntityName** | Pointer to [**EntityNameFilter**](EntityNameFilter.md) | | [optional] +**EntityTag** | Pointer to [**EntityTagFilter**](EntityTagFilter.md) | | [optional] +**EntityIDs** | Pointer to **[]string** | Filter by specific entity UUIDs. | [optional] +**ImportedFromApp** | Pointer to **[]string** | Filter by app IDs from which returned nodes will be imported from. | [optional] +**RoleRemoteIds** | Pointer to **[]string** | Filter by role remote IDs. Can only be applied within a hasAccessTo clause. | [optional] +**RoleNames** | Pointer to **[]string** | Filter by role display names (e.g. \"Admin\", \"Read\"). Can only be applied within a hasAccessTo clause. | [optional] +**AllOf** | Pointer to [**[]AccessEntityFilters**](AccessEntityFilters.md) | 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`. | [optional] +**AnyOf** | Pointer to [**[]AccessEntityFilters**](AccessEntityFilters.md) | A list of nested filters where at least one must match (logical OR). Each item has the same shape as this object. | [optional] +**Not** | Pointer to **map[string]interface{}** | 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. | [optional] + +## Methods + +### NewAccessEntityFilters + +`func NewAccessEntityFilters() *AccessEntityFilters` + +NewAccessEntityFilters instantiates a new AccessEntityFilters object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAccessEntityFiltersWithDefaults + +`func NewAccessEntityFiltersWithDefaults() *AccessEntityFilters` + +NewAccessEntityFiltersWithDefaults instantiates a new AccessEntityFilters object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEntityTypes + +`func (o *AccessEntityFilters) GetEntityTypes() []string` + +GetEntityTypes returns the EntityTypes field if non-nil, zero value otherwise. + +### GetEntityTypesOk + +`func (o *AccessEntityFilters) GetEntityTypesOk() (*[]string, bool)` + +GetEntityTypesOk returns a tuple with the EntityTypes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEntityTypes + +`func (o *AccessEntityFilters) SetEntityTypes(v []string)` + +SetEntityTypes sets EntityTypes field to given value. + +### HasEntityTypes + +`func (o *AccessEntityFilters) HasEntityTypes() bool` + +HasEntityTypes returns a boolean if a field has been set. + +### GetEntityItemTypes + +`func (o *AccessEntityFilters) GetEntityItemTypes() []EntityItemTypeEnum` + +GetEntityItemTypes returns the EntityItemTypes field if non-nil, zero value otherwise. + +### GetEntityItemTypesOk + +`func (o *AccessEntityFilters) GetEntityItemTypesOk() (*[]EntityItemTypeEnum, bool)` + +GetEntityItemTypesOk returns a tuple with the EntityItemTypes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEntityItemTypes + +`func (o *AccessEntityFilters) SetEntityItemTypes(v []EntityItemTypeEnum)` + +SetEntityItemTypes sets EntityItemTypes field to given value. + +### HasEntityItemTypes + +`func (o *AccessEntityFilters) HasEntityItemTypes() bool` + +HasEntityItemTypes returns a boolean if a field has been set. + +### GetEntityName + +`func (o *AccessEntityFilters) GetEntityName() EntityNameFilter` + +GetEntityName returns the EntityName field if non-nil, zero value otherwise. + +### GetEntityNameOk + +`func (o *AccessEntityFilters) GetEntityNameOk() (*EntityNameFilter, bool)` + +GetEntityNameOk returns a tuple with the EntityName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEntityName + +`func (o *AccessEntityFilters) SetEntityName(v EntityNameFilter)` + +SetEntityName sets EntityName field to given value. + +### HasEntityName + +`func (o *AccessEntityFilters) HasEntityName() bool` + +HasEntityName returns a boolean if a field has been set. + +### GetEntityTag + +`func (o *AccessEntityFilters) GetEntityTag() EntityTagFilter` + +GetEntityTag returns the EntityTag field if non-nil, zero value otherwise. + +### GetEntityTagOk + +`func (o *AccessEntityFilters) GetEntityTagOk() (*EntityTagFilter, bool)` + +GetEntityTagOk returns a tuple with the EntityTag field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEntityTag + +`func (o *AccessEntityFilters) SetEntityTag(v EntityTagFilter)` + +SetEntityTag sets EntityTag field to given value. + +### HasEntityTag + +`func (o *AccessEntityFilters) HasEntityTag() bool` + +HasEntityTag returns a boolean if a field has been set. + +### GetEntityIDs + +`func (o *AccessEntityFilters) GetEntityIDs() []string` + +GetEntityIDs returns the EntityIDs field if non-nil, zero value otherwise. + +### GetEntityIDsOk + +`func (o *AccessEntityFilters) GetEntityIDsOk() (*[]string, bool)` + +GetEntityIDsOk returns a tuple with the EntityIDs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEntityIDs + +`func (o *AccessEntityFilters) SetEntityIDs(v []string)` + +SetEntityIDs sets EntityIDs field to given value. + +### HasEntityIDs + +`func (o *AccessEntityFilters) HasEntityIDs() bool` + +HasEntityIDs returns a boolean if a field has been set. + +### GetImportedFromApp + +`func (o *AccessEntityFilters) GetImportedFromApp() []string` + +GetImportedFromApp returns the ImportedFromApp field if non-nil, zero value otherwise. + +### GetImportedFromAppOk + +`func (o *AccessEntityFilters) GetImportedFromAppOk() (*[]string, bool)` + +GetImportedFromAppOk returns a tuple with the ImportedFromApp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetImportedFromApp + +`func (o *AccessEntityFilters) SetImportedFromApp(v []string)` + +SetImportedFromApp sets ImportedFromApp field to given value. + +### HasImportedFromApp + +`func (o *AccessEntityFilters) HasImportedFromApp() bool` + +HasImportedFromApp returns a boolean if a field has been set. + +### GetRoleRemoteIds + +`func (o *AccessEntityFilters) GetRoleRemoteIds() []string` + +GetRoleRemoteIds returns the RoleRemoteIds field if non-nil, zero value otherwise. + +### GetRoleRemoteIdsOk + +`func (o *AccessEntityFilters) GetRoleRemoteIdsOk() (*[]string, bool)` + +GetRoleRemoteIdsOk returns a tuple with the RoleRemoteIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleRemoteIds + +`func (o *AccessEntityFilters) SetRoleRemoteIds(v []string)` + +SetRoleRemoteIds sets RoleRemoteIds field to given value. + +### HasRoleRemoteIds + +`func (o *AccessEntityFilters) HasRoleRemoteIds() bool` + +HasRoleRemoteIds returns a boolean if a field has been set. + +### GetRoleNames + +`func (o *AccessEntityFilters) GetRoleNames() []string` + +GetRoleNames returns the RoleNames field if non-nil, zero value otherwise. + +### GetRoleNamesOk + +`func (o *AccessEntityFilters) GetRoleNamesOk() (*[]string, bool)` + +GetRoleNamesOk returns a tuple with the RoleNames field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleNames + +`func (o *AccessEntityFilters) SetRoleNames(v []string)` + +SetRoleNames sets RoleNames field to given value. + +### HasRoleNames + +`func (o *AccessEntityFilters) HasRoleNames() bool` + +HasRoleNames returns a boolean if a field has been set. + +### GetAllOf + +`func (o *AccessEntityFilters) GetAllOf() []AccessEntityFilters` + +GetAllOf returns the AllOf field if non-nil, zero value otherwise. + +### GetAllOfOk + +`func (o *AccessEntityFilters) GetAllOfOk() (*[]AccessEntityFilters, bool)` + +GetAllOfOk returns a tuple with the AllOf field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllOf + +`func (o *AccessEntityFilters) SetAllOf(v []AccessEntityFilters)` + +SetAllOf sets AllOf field to given value. + +### HasAllOf + +`func (o *AccessEntityFilters) HasAllOf() bool` + +HasAllOf returns a boolean if a field has been set. + +### GetAnyOf + +`func (o *AccessEntityFilters) GetAnyOf() []AccessEntityFilters` + +GetAnyOf returns the AnyOf field if non-nil, zero value otherwise. + +### GetAnyOfOk + +`func (o *AccessEntityFilters) GetAnyOfOk() (*[]AccessEntityFilters, bool)` + +GetAnyOfOk returns a tuple with the AnyOf field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAnyOf + +`func (o *AccessEntityFilters) SetAnyOf(v []AccessEntityFilters)` + +SetAnyOf sets AnyOf field to given value. + +### HasAnyOf + +`func (o *AccessEntityFilters) HasAnyOf() bool` + +HasAnyOf returns a boolean if a field has been set. + +### GetNot + +`func (o *AccessEntityFilters) GetNot() map[string]interface{}` + +GetNot returns the Not field if non-nil, zero value otherwise. + +### GetNotOk + +`func (o *AccessEntityFilters) GetNotOk() (*map[string]interface{}, bool)` + +GetNotOk returns a tuple with the Not field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNot + +`func (o *AccessEntityFilters) SetNot(v map[string]interface{})` + +SetNot sets Not field to given value. + +### HasNot + +`func (o *AccessEntityFilters) HasNot() bool` + +HasNot returns a boolean if a field has been set. + + +[[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/AccessRelationshipFilters.md b/docs/AccessRelationshipFilters.md new file mode 100644 index 0000000..84cc86f --- /dev/null +++ b/docs/AccessRelationshipFilters.md @@ -0,0 +1,82 @@ +# AccessRelationshipFilters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsAccessibleBy** | Pointer to [**AccessEntityFilters**](AccessEntityFilters.md) | Inbound-edge filter. The returned node must be accessible by at least one entity matching this filter. | [optional] +**HasAccessTo** | Pointer to [**AccessEntityFilters**](AccessEntityFilters.md) | Outbound-edge filter. The returned node must have access to at least one entity matching this filter. | [optional] + +## Methods + +### NewAccessRelationshipFilters + +`func NewAccessRelationshipFilters() *AccessRelationshipFilters` + +NewAccessRelationshipFilters instantiates a new AccessRelationshipFilters object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAccessRelationshipFiltersWithDefaults + +`func NewAccessRelationshipFiltersWithDefaults() *AccessRelationshipFilters` + +NewAccessRelationshipFiltersWithDefaults instantiates a new AccessRelationshipFilters object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIsAccessibleBy + +`func (o *AccessRelationshipFilters) GetIsAccessibleBy() AccessEntityFilters` + +GetIsAccessibleBy returns the IsAccessibleBy field if non-nil, zero value otherwise. + +### GetIsAccessibleByOk + +`func (o *AccessRelationshipFilters) GetIsAccessibleByOk() (*AccessEntityFilters, bool)` + +GetIsAccessibleByOk returns a tuple with the IsAccessibleBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsAccessibleBy + +`func (o *AccessRelationshipFilters) SetIsAccessibleBy(v AccessEntityFilters)` + +SetIsAccessibleBy sets IsAccessibleBy field to given value. + +### HasIsAccessibleBy + +`func (o *AccessRelationshipFilters) HasIsAccessibleBy() bool` + +HasIsAccessibleBy returns a boolean if a field has been set. + +### GetHasAccessTo + +`func (o *AccessRelationshipFilters) GetHasAccessTo() AccessEntityFilters` + +GetHasAccessTo returns the HasAccessTo field if non-nil, zero value otherwise. + +### GetHasAccessToOk + +`func (o *AccessRelationshipFilters) GetHasAccessToOk() (*AccessEntityFilters, bool)` + +GetHasAccessToOk returns a tuple with the HasAccessTo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHasAccessTo + +`func (o *AccessRelationshipFilters) SetHasAccessTo(v AccessEntityFilters)` + +SetHasAccessTo sets HasAccessTo field to given value. + +### HasHasAccessTo + +`func (o *AccessRelationshipFilters) HasHasAccessTo() bool` + +HasHasAccessTo returns a boolean if a field has been set. + + +[[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/AccessRulesAPI.md b/docs/AccessRulesAPI.md index 4e81880..1a9115a 100644 --- a/docs/AccessRulesAPI.md +++ b/docs/AccessRulesAPI.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**CreateAccessRule**](AccessRulesAPI.md#CreateAccessRule) | **Post** /access-rules | [**GetAccessRule**](AccessRulesAPI.md#GetAccessRule) | **Get** /access-rules/{access_rule_id} | +[**GetAccessRules**](AccessRulesAPI.md#GetAccessRules) | **Get** /access-rules | [**UpdateAccessRule**](AccessRulesAPI.md#UpdateAccessRule) | **Put** /access-rules/{access_rule_id} | @@ -146,6 +147,74 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## GetAccessRules + +> PaginatedAccessRulesList GetAccessRules(ctx).Cursor(cursor).PageSize(pageSize).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/opalsecurity/opal-go" +) + +func main() { + cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) + pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccessRulesAPI.GetAccessRules(context.Background()).Cursor(cursor).PageSize(pageSize).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccessRulesAPI.GetAccessRules``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAccessRules`: PaginatedAccessRulesList + fmt.Fprintf(os.Stdout, "Response from `AccessRulesAPI.GetAccessRules`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAccessRulesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cursor** | **string** | The pagination cursor value. | + **pageSize** | **int32** | Number of results to return per page. Default is 200. | + +### Return type + +[**PaginatedAccessRulesList**](PaginatedAccessRulesList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + ## UpdateAccessRule > AccessRule UpdateAccessRule(ctx, accessRuleId).UpdateAccessRuleInfo(updateAccessRuleInfo).Execute() diff --git a/docs/ApiAccessLevelEnum.md b/docs/ApiAccessLevelEnum.md new file mode 100644 index 0000000..4437821 --- /dev/null +++ b/docs/ApiAccessLevelEnum.md @@ -0,0 +1,13 @@ +# ApiAccessLevelEnum + +## Enum + + +* `READ_ONLY` (value: `"READ_ONLY"`) + +* `FULL_ACCESS` (value: `"FULL_ACCESS"`) + + +[[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/AppTypeEnum.md b/docs/AppTypeEnum.md index d346585..bc5c57f 100644 --- a/docs/AppTypeEnum.md +++ b/docs/AppTypeEnum.md @@ -19,6 +19,8 @@ * `CUSTOM` (value: `"CUSTOM"`) +* `CUSTOM_CONNECTOR` (value: `"CUSTOM_CONNECTOR"`) + * `DATABRICKS` (value: `"DATABRICKS"`) * `DATASTAX_ASTRA` (value: `"DATASTAX_ASTRA"`) @@ -49,6 +51,10 @@ * `MYSQL` (value: `"MYSQL"`) +* `NETSUITE` (value: `"NETSUITE"`) + +* `DATADOG` (value: `"DATADOG"`) + * `OKTA_DIRECTORY` (value: `"OKTA_DIRECTORY"`) * `OPENAI_PLATFORM` (value: `"OPENAI_PLATFORM"`) @@ -65,6 +71,8 @@ * `TELEPORT` (value: `"TELEPORT"`) +* `TWINGATE` (value: `"TWINGATE"`) + * `WORKDAY` (value: `"WORKDAY"`) diff --git a/docs/CreateEventStreamInfo.md b/docs/CreateEventStreamInfo.md new file mode 100644 index 0000000..e56582e --- /dev/null +++ b/docs/CreateEventStreamInfo.md @@ -0,0 +1,124 @@ +# CreateEventStreamInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name for the event stream. | +**ConnectionType** | [**EventStreamConnectionTypeEnum**](EventStreamConnectionTypeEnum.md) | | +**WebhookUrl** | Pointer to **string** | The webhook URL. Required when connection_type is WEBHOOK. | [optional] +**Credentials** | Pointer to [**WebhookCredentials**](WebhookCredentials.md) | | [optional] + +## Methods + +### NewCreateEventStreamInfo + +`func NewCreateEventStreamInfo(name string, connectionType EventStreamConnectionTypeEnum, ) *CreateEventStreamInfo` + +NewCreateEventStreamInfo instantiates a new CreateEventStreamInfo object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateEventStreamInfoWithDefaults + +`func NewCreateEventStreamInfoWithDefaults() *CreateEventStreamInfo` + +NewCreateEventStreamInfoWithDefaults instantiates a new CreateEventStreamInfo object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CreateEventStreamInfo) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateEventStreamInfo) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateEventStreamInfo) SetName(v string)` + +SetName sets Name field to given value. + + +### GetConnectionType + +`func (o *CreateEventStreamInfo) GetConnectionType() EventStreamConnectionTypeEnum` + +GetConnectionType returns the ConnectionType field if non-nil, zero value otherwise. + +### GetConnectionTypeOk + +`func (o *CreateEventStreamInfo) GetConnectionTypeOk() (*EventStreamConnectionTypeEnum, bool)` + +GetConnectionTypeOk returns a tuple with the ConnectionType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectionType + +`func (o *CreateEventStreamInfo) SetConnectionType(v EventStreamConnectionTypeEnum)` + +SetConnectionType sets ConnectionType field to given value. + + +### GetWebhookUrl + +`func (o *CreateEventStreamInfo) GetWebhookUrl() string` + +GetWebhookUrl returns the WebhookUrl field if non-nil, zero value otherwise. + +### GetWebhookUrlOk + +`func (o *CreateEventStreamInfo) GetWebhookUrlOk() (*string, bool)` + +GetWebhookUrlOk returns a tuple with the WebhookUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWebhookUrl + +`func (o *CreateEventStreamInfo) SetWebhookUrl(v string)` + +SetWebhookUrl sets WebhookUrl field to given value. + +### HasWebhookUrl + +`func (o *CreateEventStreamInfo) HasWebhookUrl() bool` + +HasWebhookUrl returns a boolean if a field has been set. + +### GetCredentials + +`func (o *CreateEventStreamInfo) GetCredentials() WebhookCredentials` + +GetCredentials returns the Credentials field if non-nil, zero value otherwise. + +### GetCredentialsOk + +`func (o *CreateEventStreamInfo) GetCredentialsOk() (*WebhookCredentials, bool)` + +GetCredentialsOk returns a tuple with the Credentials field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredentials + +`func (o *CreateEventStreamInfo) SetCredentials(v WebhookCredentials)` + +SetCredentials sets Credentials field to given value. + +### HasCredentials + +`func (o *CreateEventStreamInfo) HasCredentials() bool` + +HasCredentials returns a boolean if a field has been set. + + +[[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..347f84d --- /dev/null +++ b/docs/CreateResourceCustomAccessLevelInfo.md @@ -0,0 +1,129 @@ +# CreateResourceCustomAccessLevelInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessLevel** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | | +**Policy** | Pointer to **string** | The policy document. | [optional] +**RequestableByDefault** | Pointer to **bool** | Whether the role is requestable. Defaults to false. | [optional] +**StackableSensitivityIndex** | Pointer to **int32** | The sensitivity index. Null to leave unranked. | [optional] + +## Methods + +### NewCreateResourceCustomAccessLevelInfo + +`func NewCreateResourceCustomAccessLevelInfo(accessLevel ResourceAccessLevel, ) *CreateResourceCustomAccessLevelInfo` + +NewCreateResourceCustomAccessLevelInfo instantiates a new CreateResourceCustomAccessLevelInfo object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateResourceCustomAccessLevelInfoWithDefaults + +`func NewCreateResourceCustomAccessLevelInfoWithDefaults() *CreateResourceCustomAccessLevelInfo` + +NewCreateResourceCustomAccessLevelInfoWithDefaults instantiates a new CreateResourceCustomAccessLevelInfo object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessLevel + +`func (o *CreateResourceCustomAccessLevelInfo) GetAccessLevel() ResourceAccessLevel` + +GetAccessLevel returns the AccessLevel field if non-nil, zero value otherwise. + +### GetAccessLevelOk + +`func (o *CreateResourceCustomAccessLevelInfo) GetAccessLevelOk() (*ResourceAccessLevel, bool)` + +GetAccessLevelOk returns a tuple with the AccessLevel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessLevel + +`func (o *CreateResourceCustomAccessLevelInfo) SetAccessLevel(v ResourceAccessLevel)` + +SetAccessLevel sets AccessLevel field to given value. + + +### GetPolicy + +`func (o *CreateResourceCustomAccessLevelInfo) GetPolicy() string` + +GetPolicy returns the Policy field if non-nil, zero value otherwise. + +### GetPolicyOk + +`func (o *CreateResourceCustomAccessLevelInfo) GetPolicyOk() (*string, bool)` + +GetPolicyOk returns a tuple with the Policy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicy + +`func (o *CreateResourceCustomAccessLevelInfo) SetPolicy(v string)` + +SetPolicy sets Policy field to given value. + +### HasPolicy + +`func (o *CreateResourceCustomAccessLevelInfo) HasPolicy() bool` + +HasPolicy returns a boolean if a field has been set. + +### GetRequestableByDefault + +`func (o *CreateResourceCustomAccessLevelInfo) GetRequestableByDefault() bool` + +GetRequestableByDefault returns the RequestableByDefault field if non-nil, zero value otherwise. + +### GetRequestableByDefaultOk + +`func (o *CreateResourceCustomAccessLevelInfo) GetRequestableByDefaultOk() (*bool, bool)` + +GetRequestableByDefaultOk returns a tuple with the RequestableByDefault field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestableByDefault + +`func (o *CreateResourceCustomAccessLevelInfo) SetRequestableByDefault(v bool)` + +SetRequestableByDefault sets RequestableByDefault field to given value. + +### HasRequestableByDefault + +`func (o *CreateResourceCustomAccessLevelInfo) HasRequestableByDefault() bool` + +HasRequestableByDefault returns a boolean if a field has been set. + +### GetStackableSensitivityIndex + +`func (o *CreateResourceCustomAccessLevelInfo) GetStackableSensitivityIndex() int32` + +GetStackableSensitivityIndex returns the StackableSensitivityIndex field if non-nil, zero value otherwise. + +### GetStackableSensitivityIndexOk + +`func (o *CreateResourceCustomAccessLevelInfo) GetStackableSensitivityIndexOk() (*int32, bool)` + +GetStackableSensitivityIndexOk returns a tuple with the StackableSensitivityIndex field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStackableSensitivityIndex + +`func (o *CreateResourceCustomAccessLevelInfo) SetStackableSensitivityIndex(v int32)` + +SetStackableSensitivityIndex sets StackableSensitivityIndex field to given value. + +### HasStackableSensitivityIndex + +`func (o *CreateResourceCustomAccessLevelInfo) HasStackableSensitivityIndex() bool` + +HasStackableSensitivityIndex returns a boolean if a field has been set. + + +[[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 new file mode 100644 index 0000000..126f593 --- /dev/null +++ b/docs/EntityItemTypeEnum.md @@ -0,0 +1,177 @@ +# EntityItemTypeEnum + +## Enum + + +* `USER` (value: `"USER"`) + +* `SERVICE_USER` (value: `"SERVICE_USER"`) + +* `ACTIVE_DIRECTORY_GROUP` (value: `"ACTIVE_DIRECTORY_GROUP"`) + +* `AWS_SSO_GROUP` (value: `"AWS_SSO_GROUP"`) + +* `DUO_GROUP` (value: `"DUO_GROUP"`) + +* `GIT_HUB_TEAM` (value: `"GIT_HUB_TEAM"`) + +* `GIT_LAB_GROUP` (value: `"GIT_LAB_GROUP"`) + +* `GOOGLE_GROUPS_GROUP` (value: `"GOOGLE_GROUPS_GROUP"`) + +* `GOOGLE_GROUPS_GKE_GROUP` (value: `"GOOGLE_GROUPS_GKE_GROUP"`) + +* `LDAP_GROUP` (value: `"LDAP_GROUP"`) + +* `OKTA_GROUP` (value: `"OKTA_GROUP"`) + +* `OKTA_GROUP_RULE` (value: `"OKTA_GROUP_RULE"`) + +* `TAILSCALE_GROUP` (value: `"TAILSCALE_GROUP"`) + +* `TWINGATE_GROUP` (value: `"TWINGATE_GROUP"`) + +* `TWINGATE_GROUP_SYNCED` (value: `"TWINGATE_GROUP_SYNCED"`) + +* `OPAL_GROUP` (value: `"OPAL_GROUP"`) + +* `OPAL_ACCESS_RULE` (value: `"OPAL_ACCESS_RULE"`) + +* `AZURE_AD_SECURITY_GROUP` (value: `"AZURE_AD_SECURITY_GROUP"`) + +* `AZURE_AD_MICROSOFT_365_GROUP` (value: `"AZURE_AD_MICROSOFT_365_GROUP"`) + +* `CONNECTOR_GROUP` (value: `"CONNECTOR_GROUP"`) + +* `SNOWFLAKE_ROLE` (value: `"SNOWFLAKE_ROLE"`) + +* `WORKDAY_USER_SECURITY_GROUP` (value: `"WORKDAY_USER_SECURITY_GROUP"`) + +* `DATABRICKS_ACCOUNT_GROUP` (value: `"DATABRICKS_ACCOUNT_GROUP"`) + +* `AWS_IAM_ROLE` (value: `"AWS_IAM_ROLE"`) + +* `AWS_EC2_INSTANCE` (value: `"AWS_EC2_INSTANCE"`) + +* `AWS_EKS_CLUSTER` (value: `"AWS_EKS_CLUSTER"`) + +* `AWS_RDS_POSTGRES_INSTANCE` (value: `"AWS_RDS_POSTGRES_INSTANCE"`) + +* `AWS_RDS_POSTGRES_CLUSTER` (value: `"AWS_RDS_POSTGRES_CLUSTER"`) + +* `AWS_RDS_MYSQL_INSTANCE` (value: `"AWS_RDS_MYSQL_INSTANCE"`) + +* `AWS_RDS_MYSQL_CLUSTER` (value: `"AWS_RDS_MYSQL_CLUSTER"`) + +* `AWS_ACCOUNT` (value: `"AWS_ACCOUNT"`) + +* `AWS_SSO_PERMISSION_SET` (value: `"AWS_SSO_PERMISSION_SET"`) + +* `AZURE_MANAGEMENT_GROUP` (value: `"AZURE_MANAGEMENT_GROUP"`) + +* `AZURE_RESOURCE_GROUP` (value: `"AZURE_RESOURCE_GROUP"`) + +* `AZURE_SUBSCRIPTION` (value: `"AZURE_SUBSCRIPTION"`) + +* `AZURE_VIRTUAL_MACHINE` (value: `"AZURE_VIRTUAL_MACHINE"`) + +* `AZURE_STORAGE_ACCOUNT` (value: `"AZURE_STORAGE_ACCOUNT"`) + +* `AZURE_STORAGE_CONTAINER` (value: `"AZURE_STORAGE_CONTAINER"`) + +* `AZURE_SQL_SERVER` (value: `"AZURE_SQL_SERVER"`) + +* `AZURE_SQL_MANAGED_INSTANCE` (value: `"AZURE_SQL_MANAGED_INSTANCE"`) + +* `AZURE_SQL_DATABASE` (value: `"AZURE_SQL_DATABASE"`) + +* `AZURE_SQL_MANAGED_DATABASE` (value: `"AZURE_SQL_MANAGED_DATABASE"`) + +* `AZURE_USER_ASSIGNED_MANAGED_IDENTITY` (value: `"AZURE_USER_ASSIGNED_MANAGED_Identity"`) + +* `AZURE_ENTRA_ID_ROLE` (value: `"AZURE_ENTRA_ID_ROLE"`) + +* `AZURE_ENTERPRISE_APP` (value: `"AZURE_ENTERPRISE_APP"`) + +* `CUSTOM` (value: `"CUSTOM"`) + +* `CUSTOM_CONNECTOR` (value: `"CUSTOM_CONNECTOR"`) + +* `GCP_ORGANIZATION` (value: `"GCP_ORGANIZATION"`) + +* `GCP_BUCKET` (value: `"GCP_BUCKET"`) + +* `GCP_COMPUTE_INSTANCE` (value: `"GCP_COMPUTE_INSTANCE"`) + +* `GCP_BIG_QUERY_DATASET` (value: `"GCP_BIG_QUERY_DATASET"`) + +* `GCP_BIG_QUERY_TABLE` (value: `"GCP_BIG_QUERY_TABLE"`) + +* `GCP_FOLDER` (value: `"GCP_FOLDER"`) + +* `GCP_GKE_CLUSTER` (value: `"GCP_GKE_CLUSTER"`) + +* `GCP_PROJECT` (value: `"GCP_PROJECT"`) + +* `GCP_CLOUD_SQL_POSTGRES_INSTANCE` (value: `"GCP_CLOUD_SQL_POSTGRES_INSTANCE"`) + +* `GCP_CLOUD_SQL_MYSQL_INSTANCE` (value: `"GCP_CLOUD_SQL_MYSQL_INSTANCE"`) + +* `GCP_SERVICE_ACCOUNT` (value: `"GCP_SERVICE_ACCOUNT"`) + +* `GIT_HUB_REPO` (value: `"GIT_HUB_REPO"`) + +* `GIT_HUB_ORG_ROLE` (value: `"GIT_HUB_ORG_ROLE"`) + +* `GIT_LAB_PROJECT` (value: `"GIT_LAB_PROJECT"`) + +* `GOOGLE_WORKSPACE_ROLE` (value: `"GOOGLE_WORKSPACE_ROLE"`) + +* `MONGO_INSTANCE` (value: `"MONGO_INSTANCE"`) + +* `MONGO_ATLAS_INSTANCE` (value: `"MONGO_ATLAS_INSTANCE"`) + +* `OKTA_APP` (value: `"OKTA_APP"`) + +* `OKTA_ROLE` (value: `"OKTA_ROLE"`) + +* `OPAL_ROLE` (value: `"OPAL_ROLE"`) + +* `OPAL_SCOPED_ROLE` (value: `"OPAL_SCOPED_ROLE"`) + +* `PAGERDUTY_ROLE` (value: `"PAGERDUTY_ROLE"`) + +* `TAILSCALE_SSH` (value: `"TAILSCALE_SSH"`) + +* `TWINGATE_RESOURCE` (value: `"TWINGATE_RESOURCE"`) + +* `SALESFORCE_PERMISSION_SET` (value: `"SALESFORCE_PERMISSION_SET"`) + +* `SALESFORCE_PROFILE` (value: `"SALESFORCE_PROFILE"`) + +* `SALESFORCE_ROLE` (value: `"SALESFORCE_ROLE"`) + +* `SNOWFLAKE_DATABASE` (value: `"SNOWFLAKE_DATABASE"`) + +* `SNOWFLAKE_SCHEMA` (value: `"SNOWFLAKE_SCHEMA"`) + +* `SNOWFLAKE_TABLE` (value: `"SNOWFLAKE_TABLE"`) + +* `WORKDAY_ROLE` (value: `"WORKDAY_ROLE"`) + +* `MYSQL_INSTANCE` (value: `"MYSQL_INSTANCE"`) + +* `MARIADB_INSTANCE` (value: `"MARIADB_INSTANCE"`) + +* `POSTGRES_INSTANCE` (value: `"POSTGRES_INSTANCE"`) + +* `TELEPORT_ROLE` (value: `"TELEPORT_ROLE"`) + +* `DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL` (value: `"DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL"`) + +* `ILEVEL_ADVANCED_ROLE` (value: `"ILEVEL_ADVANCED_ROLE"`) + + +[[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/EntityNameFilter.md b/docs/EntityNameFilter.md new file mode 100644 index 0000000..7d6590c --- /dev/null +++ b/docs/EntityNameFilter.md @@ -0,0 +1,72 @@ +# EntityNameFilter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StringMatchType** | [**StringMatchType**](StringMatchType.md) | | +**String** | **string** | The string value to match against the entity name. | + +## Methods + +### NewEntityNameFilter + +`func NewEntityNameFilter(stringMatchType StringMatchType, string_ string, ) *EntityNameFilter` + +NewEntityNameFilter instantiates a new EntityNameFilter object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEntityNameFilterWithDefaults + +`func NewEntityNameFilterWithDefaults() *EntityNameFilter` + +NewEntityNameFilterWithDefaults instantiates a new EntityNameFilter object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStringMatchType + +`func (o *EntityNameFilter) GetStringMatchType() StringMatchType` + +GetStringMatchType returns the StringMatchType field if non-nil, zero value otherwise. + +### GetStringMatchTypeOk + +`func (o *EntityNameFilter) GetStringMatchTypeOk() (*StringMatchType, bool)` + +GetStringMatchTypeOk returns a tuple with the StringMatchType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStringMatchType + +`func (o *EntityNameFilter) SetStringMatchType(v StringMatchType)` + +SetStringMatchType sets StringMatchType field to given value. + + +### GetString + +`func (o *EntityNameFilter) GetString() string` + +GetString returns the String field if non-nil, zero value otherwise. + +### GetStringOk + +`func (o *EntityNameFilter) GetStringOk() (*string, bool)` + +GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetString + +`func (o *EntityNameFilter) SetString(v string)` + +SetString sets String field to given value. + + + +[[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 new file mode 100644 index 0000000..0ce9d0a --- /dev/null +++ b/docs/EntityTagFilter.md @@ -0,0 +1,103 @@ +# EntityTagFilter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | The tag key to filter by. | +**Value** | Pointer to **string** | The tag value to filter by. If omitted, matches any value for the given key. | [optional] +**ConnectionId** | Pointer to **string** | If specified, filters by tags associated with this connection. | [optional] + +## Methods + +### NewEntityTagFilter + +`func NewEntityTagFilter(key string, ) *EntityTagFilter` + +NewEntityTagFilter instantiates a new EntityTagFilter object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEntityTagFilterWithDefaults + +`func NewEntityTagFilterWithDefaults() *EntityTagFilter` + +NewEntityTagFilterWithDefaults instantiates a new EntityTagFilter object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetKey + +`func (o *EntityTagFilter) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *EntityTagFilter) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *EntityTagFilter) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetValue + +`func (o *EntityTagFilter) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *EntityTagFilter) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *EntityTagFilter) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *EntityTagFilter) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetConnectionId + +`func (o *EntityTagFilter) GetConnectionId() string` + +GetConnectionId returns the ConnectionId field if non-nil, zero value otherwise. + +### GetConnectionIdOk + +`func (o *EntityTagFilter) GetConnectionIdOk() (*string, bool)` + +GetConnectionIdOk returns a tuple with the ConnectionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectionId + +`func (o *EntityTagFilter) SetConnectionId(v string)` + +SetConnectionId sets ConnectionId field to given value. + +### HasConnectionId + +`func (o *EntityTagFilter) HasConnectionId() bool` + +HasConnectionId returns a boolean if a field has been set. + + +[[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/EventStream.md b/docs/EventStream.md new file mode 100644 index 0000000..014dc83 --- /dev/null +++ b/docs/EventStream.md @@ -0,0 +1,72 @@ +# EventStream + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EventStreamId** | **string** | The ID of the event stream. | +**Connection** | [**EventStreamConnection**](EventStreamConnection.md) | | + +## Methods + +### NewEventStream + +`func NewEventStream(eventStreamId string, connection EventStreamConnection, ) *EventStream` + +NewEventStream instantiates a new EventStream object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEventStreamWithDefaults + +`func NewEventStreamWithDefaults() *EventStream` + +NewEventStreamWithDefaults instantiates a new EventStream object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEventStreamId + +`func (o *EventStream) GetEventStreamId() string` + +GetEventStreamId returns the EventStreamId field if non-nil, zero value otherwise. + +### GetEventStreamIdOk + +`func (o *EventStream) GetEventStreamIdOk() (*string, bool)` + +GetEventStreamIdOk returns a tuple with the EventStreamId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEventStreamId + +`func (o *EventStream) SetEventStreamId(v string)` + +SetEventStreamId sets EventStreamId field to given value. + + +### GetConnection + +`func (o *EventStream) GetConnection() EventStreamConnection` + +GetConnection returns the Connection field if non-nil, zero value otherwise. + +### GetConnectionOk + +`func (o *EventStream) GetConnectionOk() (*EventStreamConnection, bool)` + +GetConnectionOk returns a tuple with the Connection field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnection + +`func (o *EventStream) SetConnection(v EventStreamConnection)` + +SetConnection sets Connection field to given value. + + + +[[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/EventStreamConnection.md b/docs/EventStreamConnection.md new file mode 100644 index 0000000..a8cc936 --- /dev/null +++ b/docs/EventStreamConnection.md @@ -0,0 +1,145 @@ +# EventStreamConnection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the connection. | +**ConnectionType** | [**EventStreamConnectionTypeEnum**](EventStreamConnectionTypeEnum.md) | | +**Enabled** | **bool** | Whether the connection is enabled. | +**WebhookUrl** | Pointer to **string** | The webhook URL, present when connection_type is WEBHOOK. | [optional] +**Credentials** | Pointer to [**WebhookCredentials**](WebhookCredentials.md) | | [optional] + +## Methods + +### NewEventStreamConnection + +`func NewEventStreamConnection(name string, connectionType EventStreamConnectionTypeEnum, enabled bool, ) *EventStreamConnection` + +NewEventStreamConnection instantiates a new EventStreamConnection object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEventStreamConnectionWithDefaults + +`func NewEventStreamConnectionWithDefaults() *EventStreamConnection` + +NewEventStreamConnectionWithDefaults instantiates a new EventStreamConnection object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *EventStreamConnection) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *EventStreamConnection) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *EventStreamConnection) SetName(v string)` + +SetName sets Name field to given value. + + +### GetConnectionType + +`func (o *EventStreamConnection) GetConnectionType() EventStreamConnectionTypeEnum` + +GetConnectionType returns the ConnectionType field if non-nil, zero value otherwise. + +### GetConnectionTypeOk + +`func (o *EventStreamConnection) GetConnectionTypeOk() (*EventStreamConnectionTypeEnum, bool)` + +GetConnectionTypeOk returns a tuple with the ConnectionType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectionType + +`func (o *EventStreamConnection) SetConnectionType(v EventStreamConnectionTypeEnum)` + +SetConnectionType sets ConnectionType field to given value. + + +### GetEnabled + +`func (o *EventStreamConnection) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *EventStreamConnection) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *EventStreamConnection) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + + +### GetWebhookUrl + +`func (o *EventStreamConnection) GetWebhookUrl() string` + +GetWebhookUrl returns the WebhookUrl field if non-nil, zero value otherwise. + +### GetWebhookUrlOk + +`func (o *EventStreamConnection) GetWebhookUrlOk() (*string, bool)` + +GetWebhookUrlOk returns a tuple with the WebhookUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWebhookUrl + +`func (o *EventStreamConnection) SetWebhookUrl(v string)` + +SetWebhookUrl sets WebhookUrl field to given value. + +### HasWebhookUrl + +`func (o *EventStreamConnection) HasWebhookUrl() bool` + +HasWebhookUrl returns a boolean if a field has been set. + +### GetCredentials + +`func (o *EventStreamConnection) GetCredentials() WebhookCredentials` + +GetCredentials returns the Credentials field if non-nil, zero value otherwise. + +### GetCredentialsOk + +`func (o *EventStreamConnection) GetCredentialsOk() (*WebhookCredentials, bool)` + +GetCredentialsOk returns a tuple with the Credentials field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredentials + +`func (o *EventStreamConnection) SetCredentials(v WebhookCredentials)` + +SetCredentials sets Credentials field to given value. + +### HasCredentials + +`func (o *EventStreamConnection) HasCredentials() bool` + +HasCredentials returns a boolean if a field has been set. + + +[[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/EventStreamConnectionTypeEnum.md b/docs/EventStreamConnectionTypeEnum.md new file mode 100644 index 0000000..f8d1680 --- /dev/null +++ b/docs/EventStreamConnectionTypeEnum.md @@ -0,0 +1,11 @@ +# EventStreamConnectionTypeEnum + +## Enum + + +* `WEBHOOK` (value: `"WEBHOOK"`) + + +[[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/EventStreamList.md b/docs/EventStreamList.md new file mode 100644 index 0000000..a5e813c --- /dev/null +++ b/docs/EventStreamList.md @@ -0,0 +1,51 @@ +# EventStreamList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EventStreams** | [**[]EventStream**](EventStream.md) | | + +## Methods + +### NewEventStreamList + +`func NewEventStreamList(eventStreams []EventStream, ) *EventStreamList` + +NewEventStreamList instantiates a new EventStreamList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEventStreamListWithDefaults + +`func NewEventStreamListWithDefaults() *EventStreamList` + +NewEventStreamListWithDefaults instantiates a new EventStreamList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEventStreams + +`func (o *EventStreamList) GetEventStreams() []EventStream` + +GetEventStreams returns the EventStreams field if non-nil, zero value otherwise. + +### GetEventStreamsOk + +`func (o *EventStreamList) GetEventStreamsOk() (*[]EventStream, bool)` + +GetEventStreamsOk returns a tuple with the EventStreams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEventStreams + +`func (o *EventStreamList) SetEventStreams(v []EventStream)` + +SetEventStreams sets EventStreams field to given value. + + + +[[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/EventStreamsAPI.md b/docs/EventStreamsAPI.md new file mode 100644 index 0000000..faa8db2 --- /dev/null +++ b/docs/EventStreamsAPI.md @@ -0,0 +1,279 @@ +# \EventStreamsAPI + +All URIs are relative to *https://api.opal.dev/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateEventStream**](EventStreamsAPI.md#CreateEventStream) | **Post** /event-streams | Create event stream +[**DeleteEventStream**](EventStreamsAPI.md#DeleteEventStream) | **Delete** /event-streams/{event_stream_id} | Delete event stream +[**GetEventStreams**](EventStreamsAPI.md#GetEventStreams) | **Get** /event-streams | Get event streams +[**UpdateEventStream**](EventStreamsAPI.md#UpdateEventStream) | **Put** /event-streams/{event_stream_id} | Update event stream + + + +## CreateEventStream + +> EventStream CreateEventStream(ctx).CreateEventStreamInfo(createEventStreamInfo).Execute() + +Create event stream + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/opalsecurity/opal-go" +) + +func main() { + createEventStreamInfo := *openapiclient.NewCreateEventStreamInfo("Name_example", openapiclient.EventStreamConnectionTypeEnum("WEBHOOK")) // CreateEventStreamInfo | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EventStreamsAPI.CreateEventStream(context.Background()).CreateEventStreamInfo(createEventStreamInfo).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EventStreamsAPI.CreateEventStream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateEventStream`: EventStream + fmt.Fprintf(os.Stdout, "Response from `EventStreamsAPI.CreateEventStream`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateEventStreamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createEventStreamInfo** | [**CreateEventStreamInfo**](CreateEventStreamInfo.md) | | + +### Return type + +[**EventStream**](EventStream.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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) + + +## DeleteEventStream + +> DeleteEventStream(ctx, eventStreamId).Execute() + +Delete event stream + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/opalsecurity/opal-go" +) + +func main() { + eventStreamId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the event stream. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.EventStreamsAPI.DeleteEventStream(context.Background(), eventStreamId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EventStreamsAPI.DeleteEventStream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**eventStreamId** | **string** | The ID of the event stream. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteEventStreamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[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) + + +## GetEventStreams + +> EventStreamList GetEventStreams(ctx).Execute() + +Get event streams + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/opalsecurity/opal-go" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EventStreamsAPI.GetEventStreams(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EventStreamsAPI.GetEventStreams``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetEventStreams`: EventStreamList + fmt.Fprintf(os.Stdout, "Response from `EventStreamsAPI.GetEventStreams`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetEventStreamsRequest struct via the builder pattern + + +### Return type + +[**EventStreamList**](EventStreamList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## UpdateEventStream + +> EventStream UpdateEventStream(ctx, eventStreamId).UpdateEventStreamInfo(updateEventStreamInfo).Execute() + +Update event stream + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/opalsecurity/opal-go" +) + +func main() { + eventStreamId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the event stream. + updateEventStreamInfo := *openapiclient.NewUpdateEventStreamInfo() // UpdateEventStreamInfo | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EventStreamsAPI.UpdateEventStream(context.Background(), eventStreamId).UpdateEventStreamInfo(updateEventStreamInfo).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EventStreamsAPI.UpdateEventStream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateEventStream`: EventStream + fmt.Fprintf(os.Stdout, "Response from `EventStreamsAPI.UpdateEventStream`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**eventStreamId** | **string** | The ID of the event stream. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateEventStreamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **updateEventStreamInfo** | [**UpdateEventStreamInfo**](UpdateEventStreamInfo.md) | | + +### Return type + +[**EventStream**](EventStream.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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/GroupRemoteInfo.md b/docs/GroupRemoteInfo.md index 509e0cf..a8e9e86 100644 --- a/docs/GroupRemoteInfo.md +++ b/docs/GroupRemoteInfo.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ActiveDirectoryGroup** | Pointer to [**GroupRemoteInfoActiveDirectoryGroup**](GroupRemoteInfoActiveDirectoryGroup.md) | | [optional] **TailscaleGroup** | Pointer to [**GroupRemoteInfoTailscaleGroup**](GroupRemoteInfoTailscaleGroup.md) | | [optional] +**TwingateGroup** | Pointer to [**GroupRemoteInfoTwingateGroup**](GroupRemoteInfoTwingateGroup.md) | | [optional] +**TwingateGroupSynced** | Pointer to [**GroupRemoteInfoTwingateGroupSynced**](GroupRemoteInfoTwingateGroupSynced.md) | | [optional] **AwsSsoGroup** | Pointer to [**GroupRemoteInfoAwsSsoGroup**](GroupRemoteInfoAwsSsoGroup.md) | | [optional] **DatabricksAccountGroup** | Pointer to [**GroupRemoteInfoDatabricksAccountGroup**](GroupRemoteInfoDatabricksAccountGroup.md) | | [optional] **ConnectorGroup** | Pointer to [**GroupRemoteInfoConnectorGroup**](GroupRemoteInfoConnectorGroup.md) | | [optional] @@ -25,6 +27,10 @@ Name | Type | Description | Notes **IncidentioOnCallSchedule** | Pointer to [**GroupRemoteInfoIncidentioOnCallSchedule**](GroupRemoteInfoIncidentioOnCallSchedule.md) | | [optional] **RootlyOnCallSchedule** | Pointer to [**GroupRemoteInfoRootlyOnCallSchedule**](GroupRemoteInfoRootlyOnCallSchedule.md) | | [optional] **DevinGroup** | Pointer to [**GroupRemoteInfoDevinGroup**](GroupRemoteInfoDevinGroup.md) | | [optional] +**ClickhouseRole** | Pointer to [**GroupRemoteInfoClickhouseRole**](GroupRemoteInfoClickhouseRole.md) | | [optional] +**GrafanaTeam** | Pointer to [**GroupRemoteInfoGrafanaTeam**](GroupRemoteInfoGrafanaTeam.md) | | [optional] +**ZendeskGroup** | Pointer to [**GroupRemoteInfoZendeskGroup**](GroupRemoteInfoZendeskGroup.md) | | [optional] +**ZendeskOrganization** | Pointer to [**GroupRemoteInfoZendeskOrganization**](GroupRemoteInfoZendeskOrganization.md) | | [optional] ## Methods @@ -95,6 +101,56 @@ SetTailscaleGroup sets TailscaleGroup field to given value. HasTailscaleGroup returns a boolean if a field has been set. +### GetTwingateGroup + +`func (o *GroupRemoteInfo) GetTwingateGroup() GroupRemoteInfoTwingateGroup` + +GetTwingateGroup returns the TwingateGroup field if non-nil, zero value otherwise. + +### GetTwingateGroupOk + +`func (o *GroupRemoteInfo) GetTwingateGroupOk() (*GroupRemoteInfoTwingateGroup, bool)` + +GetTwingateGroupOk returns a tuple with the TwingateGroup field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTwingateGroup + +`func (o *GroupRemoteInfo) SetTwingateGroup(v GroupRemoteInfoTwingateGroup)` + +SetTwingateGroup sets TwingateGroup field to given value. + +### HasTwingateGroup + +`func (o *GroupRemoteInfo) HasTwingateGroup() bool` + +HasTwingateGroup returns a boolean if a field has been set. + +### GetTwingateGroupSynced + +`func (o *GroupRemoteInfo) GetTwingateGroupSynced() GroupRemoteInfoTwingateGroupSynced` + +GetTwingateGroupSynced returns the TwingateGroupSynced field if non-nil, zero value otherwise. + +### GetTwingateGroupSyncedOk + +`func (o *GroupRemoteInfo) GetTwingateGroupSyncedOk() (*GroupRemoteInfoTwingateGroupSynced, bool)` + +GetTwingateGroupSyncedOk returns a tuple with the TwingateGroupSynced field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTwingateGroupSynced + +`func (o *GroupRemoteInfo) SetTwingateGroupSynced(v GroupRemoteInfoTwingateGroupSynced)` + +SetTwingateGroupSynced sets TwingateGroupSynced field to given value. + +### HasTwingateGroupSynced + +`func (o *GroupRemoteInfo) HasTwingateGroupSynced() bool` + +HasTwingateGroupSynced returns a boolean if a field has been set. + ### GetAwsSsoGroup `func (o *GroupRemoteInfo) GetAwsSsoGroup() GroupRemoteInfoAwsSsoGroup` @@ -570,6 +626,106 @@ SetDevinGroup sets DevinGroup field to given value. HasDevinGroup returns a boolean if a field has been set. +### GetClickhouseRole + +`func (o *GroupRemoteInfo) GetClickhouseRole() GroupRemoteInfoClickhouseRole` + +GetClickhouseRole returns the ClickhouseRole field if non-nil, zero value otherwise. + +### GetClickhouseRoleOk + +`func (o *GroupRemoteInfo) GetClickhouseRoleOk() (*GroupRemoteInfoClickhouseRole, bool)` + +GetClickhouseRoleOk returns a tuple with the ClickhouseRole field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClickhouseRole + +`func (o *GroupRemoteInfo) SetClickhouseRole(v GroupRemoteInfoClickhouseRole)` + +SetClickhouseRole sets ClickhouseRole field to given value. + +### HasClickhouseRole + +`func (o *GroupRemoteInfo) HasClickhouseRole() bool` + +HasClickhouseRole returns a boolean if a field has been set. + +### GetGrafanaTeam + +`func (o *GroupRemoteInfo) GetGrafanaTeam() GroupRemoteInfoGrafanaTeam` + +GetGrafanaTeam returns the GrafanaTeam field if non-nil, zero value otherwise. + +### GetGrafanaTeamOk + +`func (o *GroupRemoteInfo) GetGrafanaTeamOk() (*GroupRemoteInfoGrafanaTeam, bool)` + +GetGrafanaTeamOk returns a tuple with the GrafanaTeam field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGrafanaTeam + +`func (o *GroupRemoteInfo) SetGrafanaTeam(v GroupRemoteInfoGrafanaTeam)` + +SetGrafanaTeam sets GrafanaTeam field to given value. + +### HasGrafanaTeam + +`func (o *GroupRemoteInfo) HasGrafanaTeam() bool` + +HasGrafanaTeam returns a boolean if a field has been set. + +### GetZendeskGroup + +`func (o *GroupRemoteInfo) GetZendeskGroup() GroupRemoteInfoZendeskGroup` + +GetZendeskGroup returns the ZendeskGroup field if non-nil, zero value otherwise. + +### GetZendeskGroupOk + +`func (o *GroupRemoteInfo) GetZendeskGroupOk() (*GroupRemoteInfoZendeskGroup, bool)` + +GetZendeskGroupOk returns a tuple with the ZendeskGroup field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetZendeskGroup + +`func (o *GroupRemoteInfo) SetZendeskGroup(v GroupRemoteInfoZendeskGroup)` + +SetZendeskGroup sets ZendeskGroup field to given value. + +### HasZendeskGroup + +`func (o *GroupRemoteInfo) HasZendeskGroup() bool` + +HasZendeskGroup returns a boolean if a field has been set. + +### GetZendeskOrganization + +`func (o *GroupRemoteInfo) GetZendeskOrganization() GroupRemoteInfoZendeskOrganization` + +GetZendeskOrganization returns the ZendeskOrganization field if non-nil, zero value otherwise. + +### GetZendeskOrganizationOk + +`func (o *GroupRemoteInfo) GetZendeskOrganizationOk() (*GroupRemoteInfoZendeskOrganization, bool)` + +GetZendeskOrganizationOk returns a tuple with the ZendeskOrganization field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetZendeskOrganization + +`func (o *GroupRemoteInfo) SetZendeskOrganization(v GroupRemoteInfoZendeskOrganization)` + +SetZendeskOrganization sets ZendeskOrganization field to given value. + +### HasZendeskOrganization + +`func (o *GroupRemoteInfo) HasZendeskOrganization() bool` + +HasZendeskOrganization returns a boolean if a field has been set. + [[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/GroupRemoteInfoClickhouseRole.md b/docs/GroupRemoteInfoClickhouseRole.md new file mode 100644 index 0000000..e2aec60 --- /dev/null +++ b/docs/GroupRemoteInfoClickhouseRole.md @@ -0,0 +1,51 @@ +# GroupRemoteInfoClickhouseRole + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RoleId** | **string** | The name of the ClickHouse role. | + +## Methods + +### NewGroupRemoteInfoClickhouseRole + +`func NewGroupRemoteInfoClickhouseRole(roleId string, ) *GroupRemoteInfoClickhouseRole` + +NewGroupRemoteInfoClickhouseRole instantiates a new GroupRemoteInfoClickhouseRole object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGroupRemoteInfoClickhouseRoleWithDefaults + +`func NewGroupRemoteInfoClickhouseRoleWithDefaults() *GroupRemoteInfoClickhouseRole` + +NewGroupRemoteInfoClickhouseRoleWithDefaults instantiates a new GroupRemoteInfoClickhouseRole object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRoleId + +`func (o *GroupRemoteInfoClickhouseRole) GetRoleId() string` + +GetRoleId returns the RoleId field if non-nil, zero value otherwise. + +### GetRoleIdOk + +`func (o *GroupRemoteInfoClickhouseRole) GetRoleIdOk() (*string, bool)` + +GetRoleIdOk returns a tuple with the RoleId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleId + +`func (o *GroupRemoteInfoClickhouseRole) SetRoleId(v string)` + +SetRoleId sets RoleId field to given value. + + + +[[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/GroupRemoteInfoGithubTeam.md b/docs/GroupRemoteInfoGithubTeam.md index 91dded0..eaf9168 100644 --- a/docs/GroupRemoteInfoGithubTeam.md +++ b/docs/GroupRemoteInfoGithubTeam.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **TeamId** | Pointer to **string** | The id of the GitHub team. | [optional] **TeamSlug** | **string** | The slug of the GitHub team. | +**OrgName** | Pointer to **string** | GitHub team's org name, required only for Enterprise | [optional] ## Methods @@ -71,6 +72,31 @@ and a boolean to check if the value has been set. SetTeamSlug sets TeamSlug field to given value. +### GetOrgName + +`func (o *GroupRemoteInfoGithubTeam) GetOrgName() string` + +GetOrgName returns the OrgName field if non-nil, zero value otherwise. + +### GetOrgNameOk + +`func (o *GroupRemoteInfoGithubTeam) GetOrgNameOk() (*string, bool)` + +GetOrgNameOk returns a tuple with the OrgName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgName + +`func (o *GroupRemoteInfoGithubTeam) SetOrgName(v string)` + +SetOrgName sets OrgName field to given value. + +### HasOrgName + +`func (o *GroupRemoteInfoGithubTeam) HasOrgName() bool` + +HasOrgName returns a boolean if a field has been set. + [[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/GroupRemoteInfoGrafanaTeam.md b/docs/GroupRemoteInfoGrafanaTeam.md new file mode 100644 index 0000000..1086152 --- /dev/null +++ b/docs/GroupRemoteInfoGrafanaTeam.md @@ -0,0 +1,51 @@ +# GroupRemoteInfoGrafanaTeam + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TeamId** | **string** | The ID of the team. | + +## Methods + +### NewGroupRemoteInfoGrafanaTeam + +`func NewGroupRemoteInfoGrafanaTeam(teamId string, ) *GroupRemoteInfoGrafanaTeam` + +NewGroupRemoteInfoGrafanaTeam instantiates a new GroupRemoteInfoGrafanaTeam object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGroupRemoteInfoGrafanaTeamWithDefaults + +`func NewGroupRemoteInfoGrafanaTeamWithDefaults() *GroupRemoteInfoGrafanaTeam` + +NewGroupRemoteInfoGrafanaTeamWithDefaults instantiates a new GroupRemoteInfoGrafanaTeam object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTeamId + +`func (o *GroupRemoteInfoGrafanaTeam) GetTeamId() string` + +GetTeamId returns the TeamId field if non-nil, zero value otherwise. + +### GetTeamIdOk + +`func (o *GroupRemoteInfoGrafanaTeam) GetTeamIdOk() (*string, bool)` + +GetTeamIdOk returns a tuple with the TeamId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTeamId + +`func (o *GroupRemoteInfoGrafanaTeam) SetTeamId(v string)` + +SetTeamId sets TeamId field to given value. + + + +[[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/GroupRemoteInfoTwingateGroup.md b/docs/GroupRemoteInfoTwingateGroup.md new file mode 100644 index 0000000..188cfce --- /dev/null +++ b/docs/GroupRemoteInfoTwingateGroup.md @@ -0,0 +1,51 @@ +# GroupRemoteInfoTwingateGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GroupId** | **string** | The id of the Twingate group. | + +## Methods + +### NewGroupRemoteInfoTwingateGroup + +`func NewGroupRemoteInfoTwingateGroup(groupId string, ) *GroupRemoteInfoTwingateGroup` + +NewGroupRemoteInfoTwingateGroup instantiates a new GroupRemoteInfoTwingateGroup object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGroupRemoteInfoTwingateGroupWithDefaults + +`func NewGroupRemoteInfoTwingateGroupWithDefaults() *GroupRemoteInfoTwingateGroup` + +NewGroupRemoteInfoTwingateGroupWithDefaults instantiates a new GroupRemoteInfoTwingateGroup object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetGroupId + +`func (o *GroupRemoteInfoTwingateGroup) GetGroupId() string` + +GetGroupId returns the GroupId field if non-nil, zero value otherwise. + +### GetGroupIdOk + +`func (o *GroupRemoteInfoTwingateGroup) GetGroupIdOk() (*string, bool)` + +GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupId + +`func (o *GroupRemoteInfoTwingateGroup) SetGroupId(v string)` + +SetGroupId sets GroupId field to given value. + + + +[[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/GroupRemoteInfoTwingateGroupSynced.md b/docs/GroupRemoteInfoTwingateGroupSynced.md new file mode 100644 index 0000000..0e625d1 --- /dev/null +++ b/docs/GroupRemoteInfoTwingateGroupSynced.md @@ -0,0 +1,51 @@ +# GroupRemoteInfoTwingateGroupSynced + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GroupId** | **string** | The id of the Twingate synced group. | + +## Methods + +### NewGroupRemoteInfoTwingateGroupSynced + +`func NewGroupRemoteInfoTwingateGroupSynced(groupId string, ) *GroupRemoteInfoTwingateGroupSynced` + +NewGroupRemoteInfoTwingateGroupSynced instantiates a new GroupRemoteInfoTwingateGroupSynced object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGroupRemoteInfoTwingateGroupSyncedWithDefaults + +`func NewGroupRemoteInfoTwingateGroupSyncedWithDefaults() *GroupRemoteInfoTwingateGroupSynced` + +NewGroupRemoteInfoTwingateGroupSyncedWithDefaults instantiates a new GroupRemoteInfoTwingateGroupSynced object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetGroupId + +`func (o *GroupRemoteInfoTwingateGroupSynced) GetGroupId() string` + +GetGroupId returns the GroupId field if non-nil, zero value otherwise. + +### GetGroupIdOk + +`func (o *GroupRemoteInfoTwingateGroupSynced) GetGroupIdOk() (*string, bool)` + +GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupId + +`func (o *GroupRemoteInfoTwingateGroupSynced) SetGroupId(v string)` + +SetGroupId sets GroupId field to given value. + + + +[[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/GroupRemoteInfoZendeskGroup.md b/docs/GroupRemoteInfoZendeskGroup.md new file mode 100644 index 0000000..5b1a9d8 --- /dev/null +++ b/docs/GroupRemoteInfoZendeskGroup.md @@ -0,0 +1,51 @@ +# GroupRemoteInfoZendeskGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GroupId** | **string** | The ID of the Zendesk group. | + +## Methods + +### NewGroupRemoteInfoZendeskGroup + +`func NewGroupRemoteInfoZendeskGroup(groupId string, ) *GroupRemoteInfoZendeskGroup` + +NewGroupRemoteInfoZendeskGroup instantiates a new GroupRemoteInfoZendeskGroup object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGroupRemoteInfoZendeskGroupWithDefaults + +`func NewGroupRemoteInfoZendeskGroupWithDefaults() *GroupRemoteInfoZendeskGroup` + +NewGroupRemoteInfoZendeskGroupWithDefaults instantiates a new GroupRemoteInfoZendeskGroup object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetGroupId + +`func (o *GroupRemoteInfoZendeskGroup) GetGroupId() string` + +GetGroupId returns the GroupId field if non-nil, zero value otherwise. + +### GetGroupIdOk + +`func (o *GroupRemoteInfoZendeskGroup) GetGroupIdOk() (*string, bool)` + +GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupId + +`func (o *GroupRemoteInfoZendeskGroup) SetGroupId(v string)` + +SetGroupId sets GroupId field to given value. + + + +[[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/GroupRemoteInfoZendeskOrganization.md b/docs/GroupRemoteInfoZendeskOrganization.md new file mode 100644 index 0000000..44538b3 --- /dev/null +++ b/docs/GroupRemoteInfoZendeskOrganization.md @@ -0,0 +1,51 @@ +# GroupRemoteInfoZendeskOrganization + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OrganizationId** | **string** | The ID of the Zendesk organization. | + +## Methods + +### NewGroupRemoteInfoZendeskOrganization + +`func NewGroupRemoteInfoZendeskOrganization(organizationId string, ) *GroupRemoteInfoZendeskOrganization` + +NewGroupRemoteInfoZendeskOrganization instantiates a new GroupRemoteInfoZendeskOrganization object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGroupRemoteInfoZendeskOrganizationWithDefaults + +`func NewGroupRemoteInfoZendeskOrganizationWithDefaults() *GroupRemoteInfoZendeskOrganization` + +NewGroupRemoteInfoZendeskOrganizationWithDefaults instantiates a new GroupRemoteInfoZendeskOrganization object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOrganizationId + +`func (o *GroupRemoteInfoZendeskOrganization) GetOrganizationId() string` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *GroupRemoteInfoZendeskOrganization) GetOrganizationIdOk() (*string, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *GroupRemoteInfoZendeskOrganization) SetOrganizationId(v string)` + +SetOrganizationId sets OrganizationId field to given value. + + + +[[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 3b900ae..9f1f936 100644 --- a/docs/GroupTypeEnum.md +++ b/docs/GroupTypeEnum.md @@ -51,6 +51,18 @@ * `GIT_HUB_ENTERPRISE_TEAM` (value: `"GIT_HUB_ENTERPRISE_TEAM"`) +* `GRAFANA_TEAM` (value: `"GRAFANA_TEAM"`) + +* `CLICKHOUSE_ROLE` (value: `"CLICKHOUSE_ROLE"`) + +* `TWINGATE_GROUP` (value: `"TWINGATE_GROUP"`) + +* `TWINGATE_GROUP_SYNCED` (value: `"TWINGATE_GROUP_SYNCED"`) + +* `ZENDESK_GROUP` (value: `"ZENDESK_GROUP"`) + +* `ZENDESK_ORGANIZATION` (value: `"ZENDESK_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/GroupsAPI.md b/docs/GroupsAPI.md index dc164bc..5d30292 100644 --- a/docs/GroupsAPI.md +++ b/docs/GroupsAPI.md @@ -1251,7 +1251,7 @@ Name | Type | Description | Notes ## GetGroups -> PaginatedGroupsList GetGroups(ctx).Cursor(cursor).PageSize(pageSize).GroupTypeFilter(groupTypeFilter).GroupIds(groupIds).GroupName(groupName).Execute() +> PaginatedGroupsList GetGroups(ctx).Cursor(cursor).PageSize(pageSize).GroupTypeFilter(groupTypeFilter).GroupIds(groupIds).GroupName(groupName).TagIds(tagIds).Execute() Get groups @@ -1275,10 +1275,11 @@ func main() { groupTypeFilter := openapiclient.GroupTypeEnum("ACTIVE_DIRECTORY_GROUP") // GroupTypeEnum | The group type to filter by. (optional) groupIds := []string{"1b978423-db0a-4037-a4cf-f79c60cb67b3"} // []string | The group ids to filter by. (optional) groupName := "example-name" // string | Group name. (optional) + tagIds := []string{"Inner_example"} // []string | The IDs of the tags to filter by. Returns only groups that have any of these tags applied. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.GetGroups(context.Background()).Cursor(cursor).PageSize(pageSize).GroupTypeFilter(groupTypeFilter).GroupIds(groupIds).GroupName(groupName).Execute() + resp, r, err := apiClient.GroupsAPI.GetGroups(context.Background()).Cursor(cursor).PageSize(pageSize).GroupTypeFilter(groupTypeFilter).GroupIds(groupIds).GroupName(groupName).TagIds(tagIds).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GetGroups``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1304,6 +1305,7 @@ Name | Type | Description | Notes **groupTypeFilter** | [**GroupTypeEnum**](GroupTypeEnum.md) | The group type to filter by. | **groupIds** | **[]string** | The group ids to filter by. | **groupName** | **string** | Group name. | + **tagIds** | **[]string** | The IDs of the tags to filter by. Returns only groups that have any of these tags applied. | ### Return type diff --git a/docs/OpalNodeQuery.md b/docs/OpalNodeQuery.md new file mode 100644 index 0000000..58b1f4b --- /dev/null +++ b/docs/OpalNodeQuery.md @@ -0,0 +1,129 @@ +# OpalNodeQuery + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Query** | Pointer to [**OpalNodeQueryBody**](OpalNodeQueryBody.md) | | [optional] +**First** | Pointer to **int32** | Maximum number of results to return. Defaults to 200. | [optional] +**After** | Pointer to **string** | Cursor from a previous response to fetch the next page of results. | [optional] + +## Methods + +### NewOpalNodeQuery + +`func NewOpalNodeQuery(type_ string, ) *OpalNodeQuery` + +NewOpalNodeQuery instantiates a new OpalNodeQuery object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOpalNodeQueryWithDefaults + +`func NewOpalNodeQueryWithDefaults() *OpalNodeQuery` + +NewOpalNodeQueryWithDefaults instantiates a new OpalNodeQuery object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *OpalNodeQuery) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *OpalNodeQuery) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *OpalNodeQuery) SetType(v string)` + +SetType sets Type field to given value. + + +### GetQuery + +`func (o *OpalNodeQuery) GetQuery() OpalNodeQueryBody` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *OpalNodeQuery) GetQueryOk() (*OpalNodeQueryBody, bool)` + +GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuery + +`func (o *OpalNodeQuery) SetQuery(v OpalNodeQueryBody)` + +SetQuery sets Query field to given value. + +### HasQuery + +`func (o *OpalNodeQuery) HasQuery() bool` + +HasQuery returns a boolean if a field has been set. + +### GetFirst + +`func (o *OpalNodeQuery) GetFirst() int32` + +GetFirst returns the First field if non-nil, zero value otherwise. + +### GetFirstOk + +`func (o *OpalNodeQuery) GetFirstOk() (*int32, bool)` + +GetFirstOk returns a tuple with the First field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirst + +`func (o *OpalNodeQuery) SetFirst(v int32)` + +SetFirst sets First field to given value. + +### HasFirst + +`func (o *OpalNodeQuery) HasFirst() bool` + +HasFirst returns a boolean if a field has been set. + +### GetAfter + +`func (o *OpalNodeQuery) GetAfter() string` + +GetAfter returns the After field if non-nil, zero value otherwise. + +### GetAfterOk + +`func (o *OpalNodeQuery) GetAfterOk() (*string, bool)` + +GetAfterOk returns a tuple with the After field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfter + +`func (o *OpalNodeQuery) SetAfter(v string)` + +SetAfter sets After field to given value. + +### HasAfter + +`func (o *OpalNodeQuery) HasAfter() bool` + +HasAfter returns a boolean if a field has been set. + + +[[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/OpalNodeQueryBody.md b/docs/OpalNodeQueryBody.md new file mode 100644 index 0000000..3af285e --- /dev/null +++ b/docs/OpalNodeQueryBody.md @@ -0,0 +1,82 @@ +# OpalNodeQueryBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NodeFilters** | Pointer to [**AccessEntityFilters**](AccessEntityFilters.md) | | [optional] +**AccessFilters** | Pointer to [**AccessRelationshipFilters**](AccessRelationshipFilters.md) | | [optional] + +## Methods + +### NewOpalNodeQueryBody + +`func NewOpalNodeQueryBody() *OpalNodeQueryBody` + +NewOpalNodeQueryBody instantiates a new OpalNodeQueryBody object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOpalNodeQueryBodyWithDefaults + +`func NewOpalNodeQueryBodyWithDefaults() *OpalNodeQueryBody` + +NewOpalNodeQueryBodyWithDefaults instantiates a new OpalNodeQueryBody object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetNodeFilters + +`func (o *OpalNodeQueryBody) GetNodeFilters() AccessEntityFilters` + +GetNodeFilters returns the NodeFilters field if non-nil, zero value otherwise. + +### GetNodeFiltersOk + +`func (o *OpalNodeQueryBody) GetNodeFiltersOk() (*AccessEntityFilters, bool)` + +GetNodeFiltersOk returns a tuple with the NodeFilters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNodeFilters + +`func (o *OpalNodeQueryBody) SetNodeFilters(v AccessEntityFilters)` + +SetNodeFilters sets NodeFilters field to given value. + +### HasNodeFilters + +`func (o *OpalNodeQueryBody) HasNodeFilters() bool` + +HasNodeFilters returns a boolean if a field has been set. + +### GetAccessFilters + +`func (o *OpalNodeQueryBody) GetAccessFilters() AccessRelationshipFilters` + +GetAccessFilters returns the AccessFilters field if non-nil, zero value otherwise. + +### GetAccessFiltersOk + +`func (o *OpalNodeQueryBody) GetAccessFiltersOk() (*AccessRelationshipFilters, bool)` + +GetAccessFiltersOk returns a tuple with the AccessFilters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessFilters + +`func (o *OpalNodeQueryBody) SetAccessFilters(v AccessRelationshipFilters)` + +SetAccessFilters sets AccessFilters field to given value. + +### HasAccessFilters + +`func (o *OpalNodeQueryBody) HasAccessFilters() bool` + +HasAccessFilters returns a boolean if a field has been set. + + +[[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/OpalNodeQueryResults.md b/docs/OpalNodeQueryResults.md new file mode 100644 index 0000000..0553125 --- /dev/null +++ b/docs/OpalNodeQueryResults.md @@ -0,0 +1,93 @@ +# OpalNodeQueryResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Edges** | [**[]OpalQueryResultEdge**](OpalQueryResultEdge.md) | List of matched entities. | +**PageInfo** | [**PageInfo**](PageInfo.md) | | + +## Methods + +### NewOpalNodeQueryResults + +`func NewOpalNodeQueryResults(type_ string, edges []OpalQueryResultEdge, pageInfo PageInfo, ) *OpalNodeQueryResults` + +NewOpalNodeQueryResults instantiates a new OpalNodeQueryResults object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOpalNodeQueryResultsWithDefaults + +`func NewOpalNodeQueryResultsWithDefaults() *OpalNodeQueryResults` + +NewOpalNodeQueryResultsWithDefaults instantiates a new OpalNodeQueryResults object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *OpalNodeQueryResults) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *OpalNodeQueryResults) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *OpalNodeQueryResults) SetType(v string)` + +SetType sets Type field to given value. + + +### GetEdges + +`func (o *OpalNodeQueryResults) GetEdges() []OpalQueryResultEdge` + +GetEdges returns the Edges field if non-nil, zero value otherwise. + +### GetEdgesOk + +`func (o *OpalNodeQueryResults) GetEdgesOk() (*[]OpalQueryResultEdge, bool)` + +GetEdgesOk returns a tuple with the Edges field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEdges + +`func (o *OpalNodeQueryResults) SetEdges(v []OpalQueryResultEdge)` + +SetEdges sets Edges field to given value. + + +### GetPageInfo + +`func (o *OpalNodeQueryResults) GetPageInfo() PageInfo` + +GetPageInfo returns the PageInfo field if non-nil, zero value otherwise. + +### GetPageInfoOk + +`func (o *OpalNodeQueryResults) GetPageInfoOk() (*PageInfo, bool)` + +GetPageInfoOk returns a tuple with the PageInfo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageInfo + +`func (o *OpalNodeQueryResults) SetPageInfo(v PageInfo)` + +SetPageInfo sets PageInfo field to given value. + + + +[[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/OpalQueriesAPI.md b/docs/OpalQueriesAPI.md new file mode 100644 index 0000000..d3c78cf --- /dev/null +++ b/docs/OpalQueriesAPI.md @@ -0,0 +1,75 @@ +# \OpalQueriesAPI + +All URIs are relative to *https://api.opal.dev/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RunOpalQuery**](OpalQueriesAPI.md#RunOpalQuery) | **Post** /queries/run | Run an ad-hoc OpalQuery + + + +## RunOpalQuery + +> OpalQueryResults RunOpalQuery(ctx).RunOpalQueryRequest(runOpalQueryRequest).Execute() + +Run an ad-hoc OpalQuery + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/opalsecurity/opal-go" +) + +func main() { + runOpalQueryRequest := *openapiclient.NewRunOpalQueryRequest("Type_example") // RunOpalQueryRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OpalQueriesAPI.RunOpalQuery(context.Background()).RunOpalQueryRequest(runOpalQueryRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OpalQueriesAPI.RunOpalQuery``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RunOpalQuery`: OpalQueryResults + fmt.Fprintf(os.Stdout, "Response from `OpalQueriesAPI.RunOpalQuery`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRunOpalQueryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **runOpalQueryRequest** | [**RunOpalQueryRequest**](RunOpalQueryRequest.md) | | + +### Return type + +[**OpalQueryResults**](OpalQueryResults.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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/OpalQueryResultEdge.md b/docs/OpalQueryResultEdge.md new file mode 100644 index 0000000..3a93d7b --- /dev/null +++ b/docs/OpalQueryResultEdge.md @@ -0,0 +1,72 @@ +# OpalQueryResultEdge + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Node** | [**OpalQueryResultNode**](OpalQueryResultNode.md) | | +**Cursor** | **string** | Opaque cursor for this entity, used for pagination. | + +## Methods + +### NewOpalQueryResultEdge + +`func NewOpalQueryResultEdge(node OpalQueryResultNode, cursor string, ) *OpalQueryResultEdge` + +NewOpalQueryResultEdge instantiates a new OpalQueryResultEdge object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOpalQueryResultEdgeWithDefaults + +`func NewOpalQueryResultEdgeWithDefaults() *OpalQueryResultEdge` + +NewOpalQueryResultEdgeWithDefaults instantiates a new OpalQueryResultEdge object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetNode + +`func (o *OpalQueryResultEdge) GetNode() OpalQueryResultNode` + +GetNode returns the Node field if non-nil, zero value otherwise. + +### GetNodeOk + +`func (o *OpalQueryResultEdge) GetNodeOk() (*OpalQueryResultNode, bool)` + +GetNodeOk returns a tuple with the Node field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNode + +`func (o *OpalQueryResultEdge) SetNode(v OpalQueryResultNode)` + +SetNode sets Node field to given value. + + +### GetCursor + +`func (o *OpalQueryResultEdge) GetCursor() string` + +GetCursor returns the Cursor field if non-nil, zero value otherwise. + +### GetCursorOk + +`func (o *OpalQueryResultEdge) GetCursorOk() (*string, bool)` + +GetCursorOk returns a tuple with the Cursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCursor + +`func (o *OpalQueryResultEdge) SetCursor(v string)` + +SetCursor sets Cursor field to given value. + + + +[[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/OpalQueryResultNode.md b/docs/OpalQueryResultNode.md new file mode 100644 index 0000000..d6102ff --- /dev/null +++ b/docs/OpalQueryResultNode.md @@ -0,0 +1,114 @@ +# OpalQueryResultNode + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The entity's unique identifier. | +**Name** | **string** | The display name of the entity. | +**EntityType** | **string** | The top-level entity type. | +**EntityItemType** | [**EntityItemTypeEnum**](EntityItemTypeEnum.md) | | + +## Methods + +### NewOpalQueryResultNode + +`func NewOpalQueryResultNode(id string, name string, entityType string, entityItemType EntityItemTypeEnum, ) *OpalQueryResultNode` + +NewOpalQueryResultNode instantiates a new OpalQueryResultNode object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOpalQueryResultNodeWithDefaults + +`func NewOpalQueryResultNodeWithDefaults() *OpalQueryResultNode` + +NewOpalQueryResultNodeWithDefaults instantiates a new OpalQueryResultNode object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *OpalQueryResultNode) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *OpalQueryResultNode) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *OpalQueryResultNode) SetId(v string)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *OpalQueryResultNode) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *OpalQueryResultNode) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *OpalQueryResultNode) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEntityType + +`func (o *OpalQueryResultNode) GetEntityType() string` + +GetEntityType returns the EntityType field if non-nil, zero value otherwise. + +### GetEntityTypeOk + +`func (o *OpalQueryResultNode) GetEntityTypeOk() (*string, bool)` + +GetEntityTypeOk returns a tuple with the EntityType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEntityType + +`func (o *OpalQueryResultNode) SetEntityType(v string)` + +SetEntityType sets EntityType field to given value. + + +### GetEntityItemType + +`func (o *OpalQueryResultNode) GetEntityItemType() EntityItemTypeEnum` + +GetEntityItemType returns the EntityItemType field if non-nil, zero value otherwise. + +### GetEntityItemTypeOk + +`func (o *OpalQueryResultNode) GetEntityItemTypeOk() (*EntityItemTypeEnum, bool)` + +GetEntityItemTypeOk returns a tuple with the EntityItemType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEntityItemType + +`func (o *OpalQueryResultNode) SetEntityItemType(v EntityItemTypeEnum)` + +SetEntityItemType sets EntityItemType field to given value. + + + +[[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/OpalQueryResults.md b/docs/OpalQueryResults.md new file mode 100644 index 0000000..3424bc8 --- /dev/null +++ b/docs/OpalQueryResults.md @@ -0,0 +1,93 @@ +# OpalQueryResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Edges** | [**[]OpalQueryResultEdge**](OpalQueryResultEdge.md) | List of matched entities. | +**PageInfo** | [**PageInfo**](PageInfo.md) | | + +## Methods + +### NewOpalQueryResults + +`func NewOpalQueryResults(type_ string, edges []OpalQueryResultEdge, pageInfo PageInfo, ) *OpalQueryResults` + +NewOpalQueryResults instantiates a new OpalQueryResults object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOpalQueryResultsWithDefaults + +`func NewOpalQueryResultsWithDefaults() *OpalQueryResults` + +NewOpalQueryResultsWithDefaults instantiates a new OpalQueryResults object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *OpalQueryResults) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *OpalQueryResults) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *OpalQueryResults) SetType(v string)` + +SetType sets Type field to given value. + + +### GetEdges + +`func (o *OpalQueryResults) GetEdges() []OpalQueryResultEdge` + +GetEdges returns the Edges field if non-nil, zero value otherwise. + +### GetEdgesOk + +`func (o *OpalQueryResults) GetEdgesOk() (*[]OpalQueryResultEdge, bool)` + +GetEdgesOk returns a tuple with the Edges field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEdges + +`func (o *OpalQueryResults) SetEdges(v []OpalQueryResultEdge)` + +SetEdges sets Edges field to given value. + + +### GetPageInfo + +`func (o *OpalQueryResults) GetPageInfo() PageInfo` + +GetPageInfo returns the PageInfo field if non-nil, zero value otherwise. + +### GetPageInfoOk + +`func (o *OpalQueryResults) GetPageInfoOk() (*PageInfo, bool)` + +GetPageInfoOk returns a tuple with the PageInfo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageInfo + +`func (o *OpalQueryResults) SetPageInfo(v PageInfo)` + +SetPageInfo sets PageInfo field to given value. + + + +[[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/PaginatedAccessRulesList.md b/docs/PaginatedAccessRulesList.md new file mode 100644 index 0000000..159c7e1 --- /dev/null +++ b/docs/PaginatedAccessRulesList.md @@ -0,0 +1,103 @@ +# PaginatedAccessRulesList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Next** | Pointer to **string** | The cursor with which to continue pagination if additional result pages exist. | [optional] +**Previous** | Pointer to **string** | The cursor used to retrieve the previous page of results. | [optional] +**Results** | [**[]AccessRule**](AccessRule.md) | | + +## Methods + +### NewPaginatedAccessRulesList + +`func NewPaginatedAccessRulesList(results []AccessRule, ) *PaginatedAccessRulesList` + +NewPaginatedAccessRulesList instantiates a new PaginatedAccessRulesList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedAccessRulesListWithDefaults + +`func NewPaginatedAccessRulesListWithDefaults() *PaginatedAccessRulesList` + +NewPaginatedAccessRulesListWithDefaults instantiates a new PaginatedAccessRulesList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetNext + +`func (o *PaginatedAccessRulesList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedAccessRulesList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedAccessRulesList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedAccessRulesList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### GetPrevious + +`func (o *PaginatedAccessRulesList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedAccessRulesList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedAccessRulesList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedAccessRulesList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedAccessRulesList) GetResults() []AccessRule` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedAccessRulesList) GetResultsOk() (*[]AccessRule, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedAccessRulesList) SetResults(v []AccessRule)` + +SetResults sets Results field to given value. + + + +[[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/PaginatedTokensList.md b/docs/PaginatedTokensList.md new file mode 100644 index 0000000..ed67c45 --- /dev/null +++ b/docs/PaginatedTokensList.md @@ -0,0 +1,103 @@ +# PaginatedTokensList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Next** | Pointer to **string** | The cursor with which to continue pagination if additional result pages exist. | [optional] +**Previous** | Pointer to **string** | The cursor used to obtain the current result page. | [optional] +**Results** | [**[]Token**](Token.md) | | + +## Methods + +### NewPaginatedTokensList + +`func NewPaginatedTokensList(results []Token, ) *PaginatedTokensList` + +NewPaginatedTokensList instantiates a new PaginatedTokensList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedTokensListWithDefaults + +`func NewPaginatedTokensListWithDefaults() *PaginatedTokensList` + +NewPaginatedTokensListWithDefaults instantiates a new PaginatedTokensList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetNext + +`func (o *PaginatedTokensList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedTokensList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedTokensList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedTokensList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### GetPrevious + +`func (o *PaginatedTokensList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedTokensList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedTokensList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedTokensList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedTokensList) GetResults() []Token` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedTokensList) GetResultsOk() (*[]Token, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedTokensList) SetResults(v []Token)` + +SetResults sets Results field to given value. + + + +[[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/RequestsAPI.md b/docs/RequestsAPI.md index 019dfec..ee196a9 100644 --- a/docs/RequestsAPI.md +++ b/docs/RequestsAPI.md @@ -439,7 +439,7 @@ Name | Type | Description | Notes ## GetRequests -> RequestList GetRequests(ctx).StartDateFilter(startDateFilter).EndDateFilter(endDateFilter).RequesterId(requesterId).TargetUserId(targetUserId).Cursor(cursor).PageSize(pageSize).ShowPendingOnly(showPendingOnly).Execute() +> RequestList GetRequests(ctx).StartDateFilter(startDateFilter).EndDateFilter(endDateFilter).RequesterId(requesterId).TargetUserId(targetUserId).ResourceId(resourceId).GroupId(groupId).Cursor(cursor).PageSize(pageSize).ShowPendingOnly(showPendingOnly).Execute() Get requests @@ -462,13 +462,15 @@ func main() { endDateFilter := "2021-11-12" // string | An end date filter for the events. (optional) requesterId := "37cb7e41-12ba-46da-92ff-030abe0450b1" // string | Filter requests by their requester ID. (optional) targetUserId := "37cb7e41-12ba-46da-92ff-030abe0450b1" // string | Filter requests by their target user ID. (optional) + resourceId := "37cb7e41-12ba-46da-92ff-030abe0450b1" // string | Filter requests by the resource ID that was requested. (optional) + groupId := "37cb7e41-12ba-46da-92ff-030abe0450b1" // string | Filter requests by the group ID that was requested. (optional) cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) showPendingOnly := true // bool | Boolean toggle for if it should only show pending requests. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RequestsAPI.GetRequests(context.Background()).StartDateFilter(startDateFilter).EndDateFilter(endDateFilter).RequesterId(requesterId).TargetUserId(targetUserId).Cursor(cursor).PageSize(pageSize).ShowPendingOnly(showPendingOnly).Execute() + resp, r, err := apiClient.RequestsAPI.GetRequests(context.Background()).StartDateFilter(startDateFilter).EndDateFilter(endDateFilter).RequesterId(requesterId).TargetUserId(targetUserId).ResourceId(resourceId).GroupId(groupId).Cursor(cursor).PageSize(pageSize).ShowPendingOnly(showPendingOnly).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RequestsAPI.GetRequests``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -493,6 +495,8 @@ Name | Type | Description | Notes **endDateFilter** | **string** | An end date filter for the events. | **requesterId** | **string** | Filter requests by their requester ID. | **targetUserId** | **string** | Filter requests by their target user ID. | + **resourceId** | **string** | Filter requests by the resource ID that was requested. | + **groupId** | **string** | Filter requests by the group ID that was requested. | **cursor** | **string** | The pagination cursor value. | **pageSize** | **int32** | Number of results to return per page. Default is 200. | **showPendingOnly** | **bool** | Boolean toggle for if it should only show pending requests. | diff --git a/docs/ResourceCustomAccessLevelList.md b/docs/ResourceCustomAccessLevelList.md new file mode 100644 index 0000000..e1edc26 --- /dev/null +++ b/docs/ResourceCustomAccessLevelList.md @@ -0,0 +1,51 @@ +# ResourceCustomAccessLevelList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomAccessLevels** | [**[]ResourceCustomAccessLevelResponse**](ResourceCustomAccessLevelResponse.md) | | + +## Methods + +### NewResourceCustomAccessLevelList + +`func NewResourceCustomAccessLevelList(customAccessLevels []ResourceCustomAccessLevelResponse, ) *ResourceCustomAccessLevelList` + +NewResourceCustomAccessLevelList instantiates a new ResourceCustomAccessLevelList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResourceCustomAccessLevelListWithDefaults + +`func NewResourceCustomAccessLevelListWithDefaults() *ResourceCustomAccessLevelList` + +NewResourceCustomAccessLevelListWithDefaults instantiates a new ResourceCustomAccessLevelList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustomAccessLevels + +`func (o *ResourceCustomAccessLevelList) GetCustomAccessLevels() []ResourceCustomAccessLevelResponse` + +GetCustomAccessLevels returns the CustomAccessLevels field if non-nil, zero value otherwise. + +### GetCustomAccessLevelsOk + +`func (o *ResourceCustomAccessLevelList) GetCustomAccessLevelsOk() (*[]ResourceCustomAccessLevelResponse, bool)` + +GetCustomAccessLevelsOk returns a tuple with the CustomAccessLevels field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomAccessLevels + +`func (o *ResourceCustomAccessLevelList) SetCustomAccessLevels(v []ResourceCustomAccessLevelResponse)` + +SetCustomAccessLevels sets CustomAccessLevels field to given value. + + + +[[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..2f4343f --- /dev/null +++ b/docs/ResourceCustomAccessLevelResponse.md @@ -0,0 +1,244 @@ +# ResourceCustomAccessLevelResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ResourceCustomAccessLevelId** | **string** | The unique ID of the custom access level. | +**ResourceId** | **string** | The resource this access level belongs to. | +**AccessLevel** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | | +**Policy** | Pointer to **string** | The policy document for this access level. | [optional] +**RequestableByDefault** | **bool** | Whether this role is requestable. | +**StackableSensitivityIndex** | Pointer to **int32** | The sensitivity index in the access hierarchy. Null if unranked. | [optional] +**MemberResourceIds** | Pointer to **[]string** | When addressed via a parent resource, lists the child resource IDs that back this aggregated entry. | [optional] +**CreatedAt** | Pointer to **time.Time** | | [optional] +**UpdatedAt** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewResourceCustomAccessLevelResponse + +`func NewResourceCustomAccessLevelResponse(resourceCustomAccessLevelId string, resourceId string, accessLevel ResourceAccessLevel, requestableByDefault bool, ) *ResourceCustomAccessLevelResponse` + +NewResourceCustomAccessLevelResponse instantiates a new ResourceCustomAccessLevelResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResourceCustomAccessLevelResponseWithDefaults + +`func NewResourceCustomAccessLevelResponseWithDefaults() *ResourceCustomAccessLevelResponse` + +NewResourceCustomAccessLevelResponseWithDefaults instantiates a new ResourceCustomAccessLevelResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResourceCustomAccessLevelId + +`func (o *ResourceCustomAccessLevelResponse) GetResourceCustomAccessLevelId() string` + +GetResourceCustomAccessLevelId returns the ResourceCustomAccessLevelId field if non-nil, zero value otherwise. + +### GetResourceCustomAccessLevelIdOk + +`func (o *ResourceCustomAccessLevelResponse) GetResourceCustomAccessLevelIdOk() (*string, bool)` + +GetResourceCustomAccessLevelIdOk returns a tuple with the ResourceCustomAccessLevelId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResourceCustomAccessLevelId + +`func (o *ResourceCustomAccessLevelResponse) SetResourceCustomAccessLevelId(v string)` + +SetResourceCustomAccessLevelId sets ResourceCustomAccessLevelId field to given value. + + +### GetResourceId + +`func (o *ResourceCustomAccessLevelResponse) GetResourceId() string` + +GetResourceId returns the ResourceId field if non-nil, zero value otherwise. + +### GetResourceIdOk + +`func (o *ResourceCustomAccessLevelResponse) GetResourceIdOk() (*string, bool)` + +GetResourceIdOk returns a tuple with the ResourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResourceId + +`func (o *ResourceCustomAccessLevelResponse) SetResourceId(v string)` + +SetResourceId sets ResourceId field to given value. + + +### GetAccessLevel + +`func (o *ResourceCustomAccessLevelResponse) GetAccessLevel() ResourceAccessLevel` + +GetAccessLevel returns the AccessLevel field if non-nil, zero value otherwise. + +### GetAccessLevelOk + +`func (o *ResourceCustomAccessLevelResponse) GetAccessLevelOk() (*ResourceAccessLevel, bool)` + +GetAccessLevelOk returns a tuple with the AccessLevel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessLevel + +`func (o *ResourceCustomAccessLevelResponse) SetAccessLevel(v ResourceAccessLevel)` + +SetAccessLevel sets AccessLevel field to given value. + + +### GetPolicy + +`func (o *ResourceCustomAccessLevelResponse) GetPolicy() string` + +GetPolicy returns the Policy field if non-nil, zero value otherwise. + +### GetPolicyOk + +`func (o *ResourceCustomAccessLevelResponse) GetPolicyOk() (*string, bool)` + +GetPolicyOk returns a tuple with the Policy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicy + +`func (o *ResourceCustomAccessLevelResponse) SetPolicy(v string)` + +SetPolicy sets Policy field to given value. + +### HasPolicy + +`func (o *ResourceCustomAccessLevelResponse) HasPolicy() bool` + +HasPolicy returns a boolean if a field has been set. + +### GetRequestableByDefault + +`func (o *ResourceCustomAccessLevelResponse) GetRequestableByDefault() bool` + +GetRequestableByDefault returns the RequestableByDefault field if non-nil, zero value otherwise. + +### GetRequestableByDefaultOk + +`func (o *ResourceCustomAccessLevelResponse) GetRequestableByDefaultOk() (*bool, bool)` + +GetRequestableByDefaultOk returns a tuple with the RequestableByDefault field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestableByDefault + +`func (o *ResourceCustomAccessLevelResponse) SetRequestableByDefault(v bool)` + +SetRequestableByDefault sets RequestableByDefault field to given value. + + +### GetStackableSensitivityIndex + +`func (o *ResourceCustomAccessLevelResponse) GetStackableSensitivityIndex() int32` + +GetStackableSensitivityIndex returns the StackableSensitivityIndex field if non-nil, zero value otherwise. + +### GetStackableSensitivityIndexOk + +`func (o *ResourceCustomAccessLevelResponse) GetStackableSensitivityIndexOk() (*int32, bool)` + +GetStackableSensitivityIndexOk returns a tuple with the StackableSensitivityIndex field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStackableSensitivityIndex + +`func (o *ResourceCustomAccessLevelResponse) SetStackableSensitivityIndex(v int32)` + +SetStackableSensitivityIndex sets StackableSensitivityIndex field to given value. + +### HasStackableSensitivityIndex + +`func (o *ResourceCustomAccessLevelResponse) HasStackableSensitivityIndex() bool` + +HasStackableSensitivityIndex returns a boolean if a field has been set. + +### GetMemberResourceIds + +`func (o *ResourceCustomAccessLevelResponse) GetMemberResourceIds() []string` + +GetMemberResourceIds returns the MemberResourceIds field if non-nil, zero value otherwise. + +### GetMemberResourceIdsOk + +`func (o *ResourceCustomAccessLevelResponse) GetMemberResourceIdsOk() (*[]string, bool)` + +GetMemberResourceIdsOk returns a tuple with the MemberResourceIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMemberResourceIds + +`func (o *ResourceCustomAccessLevelResponse) SetMemberResourceIds(v []string)` + +SetMemberResourceIds sets MemberResourceIds field to given value. + +### HasMemberResourceIds + +`func (o *ResourceCustomAccessLevelResponse) HasMemberResourceIds() bool` + +HasMemberResourceIds returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *ResourceCustomAccessLevelResponse) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *ResourceCustomAccessLevelResponse) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *ResourceCustomAccessLevelResponse) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *ResourceCustomAccessLevelResponse) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *ResourceCustomAccessLevelResponse) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *ResourceCustomAccessLevelResponse) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *ResourceCustomAccessLevelResponse) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *ResourceCustomAccessLevelResponse) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[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 4ef71db..25c05c2 100644 --- a/docs/ResourceRemoteInfo.md +++ b/docs/ResourceRemoteInfo.md @@ -51,6 +51,7 @@ Name | Type | Description | Notes **SnowflakeTable** | Pointer to [**ResourceRemoteInfoSnowflakeTable**](ResourceRemoteInfoSnowflakeTable.md) | | [optional] **IlevelAdvancedRole** | Pointer to [**ResourceRemoteInfoIlevelAdvancedRole**](ResourceRemoteInfoIlevelAdvancedRole.md) | | [optional] **TailscaleSsh** | Pointer to [**ResourceRemoteInfoTailscaleSsh**](ResourceRemoteInfoTailscaleSsh.md) | | [optional] +**TwingateResource** | Pointer to [**ResourceRemoteInfoTwingateResource**](ResourceRemoteInfoTwingateResource.md) | | [optional] **PagerdutyRole** | Pointer to [**ResourceRemoteInfoPagerdutyRole**](ResourceRemoteInfoPagerdutyRole.md) | | [optional] **WorkdayRole** | Pointer to [**ResourceRemoteInfoWorkdayRole**](ResourceRemoteInfoWorkdayRole.md) | | [optional] **SalesforcePermissionSet** | Pointer to [**ResourceRemoteInfoSalesforcePermissionSet**](ResourceRemoteInfoSalesforcePermissionSet.md) | | [optional] @@ -66,6 +67,14 @@ Name | Type | Description | Notes **OracleFusionRole** | Pointer to [**ResourceRemoteInfoOracleFusionRole**](ResourceRemoteInfoOracleFusionRole.md) | | [optional] **DevinOrganization** | Pointer to [**ResourceRemoteInfoDevinOrganization**](ResourceRemoteInfoDevinOrganization.md) | | [optional] **DevinRole** | Pointer to [**ResourceRemoteInfoDevinRole**](ResourceRemoteInfoDevinRole.md) | | [optional] +**NetsuiteRole** | Pointer to [**ResourceRemoteInfoNetsuiteRole**](ResourceRemoteInfoNetsuiteRole.md) | | [optional] +**DatadogRole** | Pointer to [**ResourceRemoteInfoDatadogRole**](ResourceRemoteInfoDatadogRole.md) | | [optional] +**ClickhouseDatabase** | Pointer to [**ResourceRemoteInfoClickhouseDatabase**](ResourceRemoteInfoClickhouseDatabase.md) | | [optional] +**ClickhouseTable** | Pointer to [**ResourceRemoteInfoClickhouseTable**](ResourceRemoteInfoClickhouseTable.md) | | [optional] +**GrafanaFolder** | Pointer to [**ResourceRemoteInfoGrafanaFolder**](ResourceRemoteInfoGrafanaFolder.md) | | [optional] +**GrafanaDashboard** | Pointer to [**ResourceRemoteInfoGrafanaDashboard**](ResourceRemoteInfoGrafanaDashboard.md) | | [optional] +**GrafanaRole** | Pointer to [**ResourceRemoteInfoGrafanaRole**](ResourceRemoteInfoGrafanaRole.md) | | [optional] +**ZendeskRole** | Pointer to [**ResourceRemoteInfoZendeskRole**](ResourceRemoteInfoZendeskRole.md) | | [optional] ## Methods @@ -1261,6 +1270,31 @@ SetTailscaleSsh sets TailscaleSsh field to given value. HasTailscaleSsh returns a boolean if a field has been set. +### GetTwingateResource + +`func (o *ResourceRemoteInfo) GetTwingateResource() ResourceRemoteInfoTwingateResource` + +GetTwingateResource returns the TwingateResource field if non-nil, zero value otherwise. + +### GetTwingateResourceOk + +`func (o *ResourceRemoteInfo) GetTwingateResourceOk() (*ResourceRemoteInfoTwingateResource, bool)` + +GetTwingateResourceOk returns a tuple with the TwingateResource field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTwingateResource + +`func (o *ResourceRemoteInfo) SetTwingateResource(v ResourceRemoteInfoTwingateResource)` + +SetTwingateResource sets TwingateResource field to given value. + +### HasTwingateResource + +`func (o *ResourceRemoteInfo) HasTwingateResource() bool` + +HasTwingateResource returns a boolean if a field has been set. + ### GetPagerdutyRole `func (o *ResourceRemoteInfo) GetPagerdutyRole() ResourceRemoteInfoPagerdutyRole` @@ -1636,6 +1670,206 @@ SetDevinRole sets DevinRole field to given value. HasDevinRole returns a boolean if a field has been set. +### GetNetsuiteRole + +`func (o *ResourceRemoteInfo) GetNetsuiteRole() ResourceRemoteInfoNetsuiteRole` + +GetNetsuiteRole returns the NetsuiteRole field if non-nil, zero value otherwise. + +### GetNetsuiteRoleOk + +`func (o *ResourceRemoteInfo) GetNetsuiteRoleOk() (*ResourceRemoteInfoNetsuiteRole, bool)` + +GetNetsuiteRoleOk returns a tuple with the NetsuiteRole field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNetsuiteRole + +`func (o *ResourceRemoteInfo) SetNetsuiteRole(v ResourceRemoteInfoNetsuiteRole)` + +SetNetsuiteRole sets NetsuiteRole field to given value. + +### HasNetsuiteRole + +`func (o *ResourceRemoteInfo) HasNetsuiteRole() bool` + +HasNetsuiteRole returns a boolean if a field has been set. + +### GetDatadogRole + +`func (o *ResourceRemoteInfo) GetDatadogRole() ResourceRemoteInfoDatadogRole` + +GetDatadogRole returns the DatadogRole field if non-nil, zero value otherwise. + +### GetDatadogRoleOk + +`func (o *ResourceRemoteInfo) GetDatadogRoleOk() (*ResourceRemoteInfoDatadogRole, bool)` + +GetDatadogRoleOk returns a tuple with the DatadogRole field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDatadogRole + +`func (o *ResourceRemoteInfo) SetDatadogRole(v ResourceRemoteInfoDatadogRole)` + +SetDatadogRole sets DatadogRole field to given value. + +### HasDatadogRole + +`func (o *ResourceRemoteInfo) HasDatadogRole() bool` + +HasDatadogRole returns a boolean if a field has been set. + +### GetClickhouseDatabase + +`func (o *ResourceRemoteInfo) GetClickhouseDatabase() ResourceRemoteInfoClickhouseDatabase` + +GetClickhouseDatabase returns the ClickhouseDatabase field if non-nil, zero value otherwise. + +### GetClickhouseDatabaseOk + +`func (o *ResourceRemoteInfo) GetClickhouseDatabaseOk() (*ResourceRemoteInfoClickhouseDatabase, bool)` + +GetClickhouseDatabaseOk returns a tuple with the ClickhouseDatabase field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClickhouseDatabase + +`func (o *ResourceRemoteInfo) SetClickhouseDatabase(v ResourceRemoteInfoClickhouseDatabase)` + +SetClickhouseDatabase sets ClickhouseDatabase field to given value. + +### HasClickhouseDatabase + +`func (o *ResourceRemoteInfo) HasClickhouseDatabase() bool` + +HasClickhouseDatabase returns a boolean if a field has been set. + +### GetClickhouseTable + +`func (o *ResourceRemoteInfo) GetClickhouseTable() ResourceRemoteInfoClickhouseTable` + +GetClickhouseTable returns the ClickhouseTable field if non-nil, zero value otherwise. + +### GetClickhouseTableOk + +`func (o *ResourceRemoteInfo) GetClickhouseTableOk() (*ResourceRemoteInfoClickhouseTable, bool)` + +GetClickhouseTableOk returns a tuple with the ClickhouseTable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClickhouseTable + +`func (o *ResourceRemoteInfo) SetClickhouseTable(v ResourceRemoteInfoClickhouseTable)` + +SetClickhouseTable sets ClickhouseTable field to given value. + +### HasClickhouseTable + +`func (o *ResourceRemoteInfo) HasClickhouseTable() bool` + +HasClickhouseTable returns a boolean if a field has been set. + +### GetGrafanaFolder + +`func (o *ResourceRemoteInfo) GetGrafanaFolder() ResourceRemoteInfoGrafanaFolder` + +GetGrafanaFolder returns the GrafanaFolder field if non-nil, zero value otherwise. + +### GetGrafanaFolderOk + +`func (o *ResourceRemoteInfo) GetGrafanaFolderOk() (*ResourceRemoteInfoGrafanaFolder, bool)` + +GetGrafanaFolderOk returns a tuple with the GrafanaFolder field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGrafanaFolder + +`func (o *ResourceRemoteInfo) SetGrafanaFolder(v ResourceRemoteInfoGrafanaFolder)` + +SetGrafanaFolder sets GrafanaFolder field to given value. + +### HasGrafanaFolder + +`func (o *ResourceRemoteInfo) HasGrafanaFolder() bool` + +HasGrafanaFolder returns a boolean if a field has been set. + +### GetGrafanaDashboard + +`func (o *ResourceRemoteInfo) GetGrafanaDashboard() ResourceRemoteInfoGrafanaDashboard` + +GetGrafanaDashboard returns the GrafanaDashboard field if non-nil, zero value otherwise. + +### GetGrafanaDashboardOk + +`func (o *ResourceRemoteInfo) GetGrafanaDashboardOk() (*ResourceRemoteInfoGrafanaDashboard, bool)` + +GetGrafanaDashboardOk returns a tuple with the GrafanaDashboard field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGrafanaDashboard + +`func (o *ResourceRemoteInfo) SetGrafanaDashboard(v ResourceRemoteInfoGrafanaDashboard)` + +SetGrafanaDashboard sets GrafanaDashboard field to given value. + +### HasGrafanaDashboard + +`func (o *ResourceRemoteInfo) HasGrafanaDashboard() bool` + +HasGrafanaDashboard returns a boolean if a field has been set. + +### GetGrafanaRole + +`func (o *ResourceRemoteInfo) GetGrafanaRole() ResourceRemoteInfoGrafanaRole` + +GetGrafanaRole returns the GrafanaRole field if non-nil, zero value otherwise. + +### GetGrafanaRoleOk + +`func (o *ResourceRemoteInfo) GetGrafanaRoleOk() (*ResourceRemoteInfoGrafanaRole, bool)` + +GetGrafanaRoleOk returns a tuple with the GrafanaRole field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGrafanaRole + +`func (o *ResourceRemoteInfo) SetGrafanaRole(v ResourceRemoteInfoGrafanaRole)` + +SetGrafanaRole sets GrafanaRole field to given value. + +### HasGrafanaRole + +`func (o *ResourceRemoteInfo) HasGrafanaRole() bool` + +HasGrafanaRole returns a boolean if a field has been set. + +### GetZendeskRole + +`func (o *ResourceRemoteInfo) GetZendeskRole() ResourceRemoteInfoZendeskRole` + +GetZendeskRole returns the ZendeskRole field if non-nil, zero value otherwise. + +### GetZendeskRoleOk + +`func (o *ResourceRemoteInfo) GetZendeskRoleOk() (*ResourceRemoteInfoZendeskRole, bool)` + +GetZendeskRoleOk returns a tuple with the ZendeskRole field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetZendeskRole + +`func (o *ResourceRemoteInfo) SetZendeskRole(v ResourceRemoteInfoZendeskRole)` + +SetZendeskRole sets ZendeskRole field to given value. + +### HasZendeskRole + +`func (o *ResourceRemoteInfo) HasZendeskRole() bool` + +HasZendeskRole returns a boolean if a field has been set. + [[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/ResourceRemoteInfoClickhouseDatabase.md b/docs/ResourceRemoteInfoClickhouseDatabase.md new file mode 100644 index 0000000..ddea7a9 --- /dev/null +++ b/docs/ResourceRemoteInfoClickhouseDatabase.md @@ -0,0 +1,51 @@ +# ResourceRemoteInfoClickhouseDatabase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DatabaseName** | **string** | The name of the ClickHouse database. | + +## Methods + +### NewResourceRemoteInfoClickhouseDatabase + +`func NewResourceRemoteInfoClickhouseDatabase(databaseName string, ) *ResourceRemoteInfoClickhouseDatabase` + +NewResourceRemoteInfoClickhouseDatabase instantiates a new ResourceRemoteInfoClickhouseDatabase object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResourceRemoteInfoClickhouseDatabaseWithDefaults + +`func NewResourceRemoteInfoClickhouseDatabaseWithDefaults() *ResourceRemoteInfoClickhouseDatabase` + +NewResourceRemoteInfoClickhouseDatabaseWithDefaults instantiates a new ResourceRemoteInfoClickhouseDatabase object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDatabaseName + +`func (o *ResourceRemoteInfoClickhouseDatabase) GetDatabaseName() string` + +GetDatabaseName returns the DatabaseName field if non-nil, zero value otherwise. + +### GetDatabaseNameOk + +`func (o *ResourceRemoteInfoClickhouseDatabase) GetDatabaseNameOk() (*string, bool)` + +GetDatabaseNameOk returns a tuple with the DatabaseName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDatabaseName + +`func (o *ResourceRemoteInfoClickhouseDatabase) SetDatabaseName(v string)` + +SetDatabaseName sets DatabaseName field to given value. + + + +[[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/ResourceRemoteInfoClickhouseTable.md b/docs/ResourceRemoteInfoClickhouseTable.md new file mode 100644 index 0000000..07284d1 --- /dev/null +++ b/docs/ResourceRemoteInfoClickhouseTable.md @@ -0,0 +1,72 @@ +# ResourceRemoteInfoClickhouseTable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DatabaseName** | **string** | The name of the ClickHouse database containing the table. | +**TableName** | **string** | The name of the ClickHouse table. | + +## Methods + +### NewResourceRemoteInfoClickhouseTable + +`func NewResourceRemoteInfoClickhouseTable(databaseName string, tableName string, ) *ResourceRemoteInfoClickhouseTable` + +NewResourceRemoteInfoClickhouseTable instantiates a new ResourceRemoteInfoClickhouseTable object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResourceRemoteInfoClickhouseTableWithDefaults + +`func NewResourceRemoteInfoClickhouseTableWithDefaults() *ResourceRemoteInfoClickhouseTable` + +NewResourceRemoteInfoClickhouseTableWithDefaults instantiates a new ResourceRemoteInfoClickhouseTable object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDatabaseName + +`func (o *ResourceRemoteInfoClickhouseTable) GetDatabaseName() string` + +GetDatabaseName returns the DatabaseName field if non-nil, zero value otherwise. + +### GetDatabaseNameOk + +`func (o *ResourceRemoteInfoClickhouseTable) GetDatabaseNameOk() (*string, bool)` + +GetDatabaseNameOk returns a tuple with the DatabaseName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDatabaseName + +`func (o *ResourceRemoteInfoClickhouseTable) SetDatabaseName(v string)` + +SetDatabaseName sets DatabaseName field to given value. + + +### GetTableName + +`func (o *ResourceRemoteInfoClickhouseTable) GetTableName() string` + +GetTableName returns the TableName field if non-nil, zero value otherwise. + +### GetTableNameOk + +`func (o *ResourceRemoteInfoClickhouseTable) GetTableNameOk() (*string, bool)` + +GetTableNameOk returns a tuple with the TableName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTableName + +`func (o *ResourceRemoteInfoClickhouseTable) SetTableName(v string)` + +SetTableName sets TableName field to given value. + + + +[[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/ResourceRemoteInfoDatadogRole.md b/docs/ResourceRemoteInfoDatadogRole.md new file mode 100644 index 0000000..b31bebb --- /dev/null +++ b/docs/ResourceRemoteInfoDatadogRole.md @@ -0,0 +1,51 @@ +# ResourceRemoteInfoDatadogRole + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RoleId** | **string** | The id of the role. | + +## Methods + +### NewResourceRemoteInfoDatadogRole + +`func NewResourceRemoteInfoDatadogRole(roleId string, ) *ResourceRemoteInfoDatadogRole` + +NewResourceRemoteInfoDatadogRole instantiates a new ResourceRemoteInfoDatadogRole object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResourceRemoteInfoDatadogRoleWithDefaults + +`func NewResourceRemoteInfoDatadogRoleWithDefaults() *ResourceRemoteInfoDatadogRole` + +NewResourceRemoteInfoDatadogRoleWithDefaults instantiates a new ResourceRemoteInfoDatadogRole object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRoleId + +`func (o *ResourceRemoteInfoDatadogRole) GetRoleId() string` + +GetRoleId returns the RoleId field if non-nil, zero value otherwise. + +### GetRoleIdOk + +`func (o *ResourceRemoteInfoDatadogRole) GetRoleIdOk() (*string, bool)` + +GetRoleIdOk returns a tuple with the RoleId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleId + +`func (o *ResourceRemoteInfoDatadogRole) SetRoleId(v string)` + +SetRoleId sets RoleId field to given value. + + + +[[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/ResourceRemoteInfoGithubOrgRole.md b/docs/ResourceRemoteInfoGithubOrgRole.md index 3dccb90..749442c 100644 --- a/docs/ResourceRemoteInfoGithubOrgRole.md +++ b/docs/ResourceRemoteInfoGithubOrgRole.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **RoleId** | **string** | The id of the role. | +**OrgName** | Pointer to **string** | GitHub org role's org name, required only for Enterprise. | [optional] ## Methods @@ -45,6 +46,31 @@ and a boolean to check if the value has been set. SetRoleId sets RoleId field to given value. +### GetOrgName + +`func (o *ResourceRemoteInfoGithubOrgRole) GetOrgName() string` + +GetOrgName returns the OrgName field if non-nil, zero value otherwise. + +### GetOrgNameOk + +`func (o *ResourceRemoteInfoGithubOrgRole) GetOrgNameOk() (*string, bool)` + +GetOrgNameOk returns a tuple with the OrgName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgName + +`func (o *ResourceRemoteInfoGithubOrgRole) SetOrgName(v string)` + +SetOrgName sets OrgName field to given value. + +### HasOrgName + +`func (o *ResourceRemoteInfoGithubOrgRole) HasOrgName() bool` + +HasOrgName returns a boolean if a field has been set. + [[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/ResourceRemoteInfoGithubRepo.md b/docs/ResourceRemoteInfoGithubRepo.md index 64eff64..f4aab16 100644 --- a/docs/ResourceRemoteInfoGithubRepo.md +++ b/docs/ResourceRemoteInfoGithubRepo.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **RepoId** | Pointer to **string** | The id of the repository. | [optional] **RepoName** | **string** | The name of the repository. | +**OrgName** | Pointer to **string** | GitHub repo's org name, required only for Enterprise. | [optional] ## Methods @@ -71,6 +72,31 @@ and a boolean to check if the value has been set. SetRepoName sets RepoName field to given value. +### GetOrgName + +`func (o *ResourceRemoteInfoGithubRepo) GetOrgName() string` + +GetOrgName returns the OrgName field if non-nil, zero value otherwise. + +### GetOrgNameOk + +`func (o *ResourceRemoteInfoGithubRepo) GetOrgNameOk() (*string, bool)` + +GetOrgNameOk returns a tuple with the OrgName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgName + +`func (o *ResourceRemoteInfoGithubRepo) SetOrgName(v string)` + +SetOrgName sets OrgName field to given value. + +### HasOrgName + +`func (o *ResourceRemoteInfoGithubRepo) HasOrgName() bool` + +HasOrgName returns a boolean if a field has been set. + [[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/ResourceRemoteInfoGrafanaDashboard.md b/docs/ResourceRemoteInfoGrafanaDashboard.md new file mode 100644 index 0000000..ffcb9df --- /dev/null +++ b/docs/ResourceRemoteInfoGrafanaDashboard.md @@ -0,0 +1,51 @@ +# ResourceRemoteInfoGrafanaDashboard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DashboardUid** | **string** | The UID of the Grafana dashboard. | + +## Methods + +### NewResourceRemoteInfoGrafanaDashboard + +`func NewResourceRemoteInfoGrafanaDashboard(dashboardUid string, ) *ResourceRemoteInfoGrafanaDashboard` + +NewResourceRemoteInfoGrafanaDashboard instantiates a new ResourceRemoteInfoGrafanaDashboard object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResourceRemoteInfoGrafanaDashboardWithDefaults + +`func NewResourceRemoteInfoGrafanaDashboardWithDefaults() *ResourceRemoteInfoGrafanaDashboard` + +NewResourceRemoteInfoGrafanaDashboardWithDefaults instantiates a new ResourceRemoteInfoGrafanaDashboard object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDashboardUid + +`func (o *ResourceRemoteInfoGrafanaDashboard) GetDashboardUid() string` + +GetDashboardUid returns the DashboardUid field if non-nil, zero value otherwise. + +### GetDashboardUidOk + +`func (o *ResourceRemoteInfoGrafanaDashboard) GetDashboardUidOk() (*string, bool)` + +GetDashboardUidOk returns a tuple with the DashboardUid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDashboardUid + +`func (o *ResourceRemoteInfoGrafanaDashboard) SetDashboardUid(v string)` + +SetDashboardUid sets DashboardUid field to given value. + + + +[[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/ResourceRemoteInfoGrafanaFolder.md b/docs/ResourceRemoteInfoGrafanaFolder.md new file mode 100644 index 0000000..74d5ac9 --- /dev/null +++ b/docs/ResourceRemoteInfoGrafanaFolder.md @@ -0,0 +1,51 @@ +# ResourceRemoteInfoGrafanaFolder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FolderUid** | **string** | The UID of the Grafana folder. | + +## Methods + +### NewResourceRemoteInfoGrafanaFolder + +`func NewResourceRemoteInfoGrafanaFolder(folderUid string, ) *ResourceRemoteInfoGrafanaFolder` + +NewResourceRemoteInfoGrafanaFolder instantiates a new ResourceRemoteInfoGrafanaFolder object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResourceRemoteInfoGrafanaFolderWithDefaults + +`func NewResourceRemoteInfoGrafanaFolderWithDefaults() *ResourceRemoteInfoGrafanaFolder` + +NewResourceRemoteInfoGrafanaFolderWithDefaults instantiates a new ResourceRemoteInfoGrafanaFolder object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFolderUid + +`func (o *ResourceRemoteInfoGrafanaFolder) GetFolderUid() string` + +GetFolderUid returns the FolderUid field if non-nil, zero value otherwise. + +### GetFolderUidOk + +`func (o *ResourceRemoteInfoGrafanaFolder) GetFolderUidOk() (*string, bool)` + +GetFolderUidOk returns a tuple with the FolderUid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFolderUid + +`func (o *ResourceRemoteInfoGrafanaFolder) SetFolderUid(v string)` + +SetFolderUid sets FolderUid field to given value. + + + +[[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/ResourceRemoteInfoGrafanaRole.md b/docs/ResourceRemoteInfoGrafanaRole.md new file mode 100644 index 0000000..3ebb397 --- /dev/null +++ b/docs/ResourceRemoteInfoGrafanaRole.md @@ -0,0 +1,51 @@ +# ResourceRemoteInfoGrafanaRole + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RoleUid** | **string** | The UID of the Grafana role. | + +## Methods + +### NewResourceRemoteInfoGrafanaRole + +`func NewResourceRemoteInfoGrafanaRole(roleUid string, ) *ResourceRemoteInfoGrafanaRole` + +NewResourceRemoteInfoGrafanaRole instantiates a new ResourceRemoteInfoGrafanaRole object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResourceRemoteInfoGrafanaRoleWithDefaults + +`func NewResourceRemoteInfoGrafanaRoleWithDefaults() *ResourceRemoteInfoGrafanaRole` + +NewResourceRemoteInfoGrafanaRoleWithDefaults instantiates a new ResourceRemoteInfoGrafanaRole object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRoleUid + +`func (o *ResourceRemoteInfoGrafanaRole) GetRoleUid() string` + +GetRoleUid returns the RoleUid field if non-nil, zero value otherwise. + +### GetRoleUidOk + +`func (o *ResourceRemoteInfoGrafanaRole) GetRoleUidOk() (*string, bool)` + +GetRoleUidOk returns a tuple with the RoleUid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleUid + +`func (o *ResourceRemoteInfoGrafanaRole) SetRoleUid(v string)` + +SetRoleUid sets RoleUid field to given value. + + + +[[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/ResourceRemoteInfoNetsuiteRole.md b/docs/ResourceRemoteInfoNetsuiteRole.md new file mode 100644 index 0000000..a2aef37 --- /dev/null +++ b/docs/ResourceRemoteInfoNetsuiteRole.md @@ -0,0 +1,51 @@ +# ResourceRemoteInfoNetsuiteRole + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RoleId** | **string** | The id of the role. | + +## Methods + +### NewResourceRemoteInfoNetsuiteRole + +`func NewResourceRemoteInfoNetsuiteRole(roleId string, ) *ResourceRemoteInfoNetsuiteRole` + +NewResourceRemoteInfoNetsuiteRole instantiates a new ResourceRemoteInfoNetsuiteRole object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResourceRemoteInfoNetsuiteRoleWithDefaults + +`func NewResourceRemoteInfoNetsuiteRoleWithDefaults() *ResourceRemoteInfoNetsuiteRole` + +NewResourceRemoteInfoNetsuiteRoleWithDefaults instantiates a new ResourceRemoteInfoNetsuiteRole object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRoleId + +`func (o *ResourceRemoteInfoNetsuiteRole) GetRoleId() string` + +GetRoleId returns the RoleId field if non-nil, zero value otherwise. + +### GetRoleIdOk + +`func (o *ResourceRemoteInfoNetsuiteRole) GetRoleIdOk() (*string, bool)` + +GetRoleIdOk returns a tuple with the RoleId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleId + +`func (o *ResourceRemoteInfoNetsuiteRole) SetRoleId(v string)` + +SetRoleId sets RoleId field to given value. + + + +[[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/ResourceRemoteInfoTwingateResource.md b/docs/ResourceRemoteInfoTwingateResource.md new file mode 100644 index 0000000..ecc0b5a --- /dev/null +++ b/docs/ResourceRemoteInfoTwingateResource.md @@ -0,0 +1,51 @@ +# ResourceRemoteInfoTwingateResource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ResourceId** | **string** | The id of the Twingate resource. | + +## Methods + +### NewResourceRemoteInfoTwingateResource + +`func NewResourceRemoteInfoTwingateResource(resourceId string, ) *ResourceRemoteInfoTwingateResource` + +NewResourceRemoteInfoTwingateResource instantiates a new ResourceRemoteInfoTwingateResource object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResourceRemoteInfoTwingateResourceWithDefaults + +`func NewResourceRemoteInfoTwingateResourceWithDefaults() *ResourceRemoteInfoTwingateResource` + +NewResourceRemoteInfoTwingateResourceWithDefaults instantiates a new ResourceRemoteInfoTwingateResource object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResourceId + +`func (o *ResourceRemoteInfoTwingateResource) GetResourceId() string` + +GetResourceId returns the ResourceId field if non-nil, zero value otherwise. + +### GetResourceIdOk + +`func (o *ResourceRemoteInfoTwingateResource) GetResourceIdOk() (*string, bool)` + +GetResourceIdOk returns a tuple with the ResourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResourceId + +`func (o *ResourceRemoteInfoTwingateResource) SetResourceId(v string)` + +SetResourceId sets ResourceId field to given value. + + + +[[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/ResourceRemoteInfoZendeskRole.md b/docs/ResourceRemoteInfoZendeskRole.md new file mode 100644 index 0000000..fc2915f --- /dev/null +++ b/docs/ResourceRemoteInfoZendeskRole.md @@ -0,0 +1,51 @@ +# ResourceRemoteInfoZendeskRole + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RoleId** | **string** | The ID of the Zendesk custom role. | + +## Methods + +### NewResourceRemoteInfoZendeskRole + +`func NewResourceRemoteInfoZendeskRole(roleId string, ) *ResourceRemoteInfoZendeskRole` + +NewResourceRemoteInfoZendeskRole instantiates a new ResourceRemoteInfoZendeskRole object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResourceRemoteInfoZendeskRoleWithDefaults + +`func NewResourceRemoteInfoZendeskRoleWithDefaults() *ResourceRemoteInfoZendeskRole` + +NewResourceRemoteInfoZendeskRoleWithDefaults instantiates a new ResourceRemoteInfoZendeskRole object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRoleId + +`func (o *ResourceRemoteInfoZendeskRole) GetRoleId() string` + +GetRoleId returns the RoleId field if non-nil, zero value otherwise. + +### GetRoleIdOk + +`func (o *ResourceRemoteInfoZendeskRole) GetRoleIdOk() (*string, bool)` + +GetRoleIdOk returns a tuple with the RoleId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleId + +`func (o *ResourceRemoteInfoZendeskRole) SetRoleId(v string)` + +SetRoleId sets RoleId field to given value. + + + +[[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 e7c49ed..3def5e4 100644 --- a/docs/ResourceTypeEnum.md +++ b/docs/ResourceTypeEnum.md @@ -89,6 +89,10 @@ * `MONGO_ATLAS_INSTANCE` (value: `"MONGO_ATLAS_INSTANCE"`) +* `NETSUITE_ROLE` (value: `"NETSUITE_ROLE"`) + +* `DATADOG_ROLE` (value: `"DATADOG_ROLE"`) + * `OKTA_APP` (value: `"OKTA_APP"`) * `OKTA_ROLE` (value: `"OKTA_ROLE"`) @@ -153,6 +157,22 @@ * `GIT_HUB_ENTERPRISE_ROLE` (value: `"GIT_HUB_ENTERPRISE_ROLE"`) +* `GRAFANA_FOLDER` (value: `"GRAFANA_FOLDER"`) + +* `GRAFANA_DASHBOARD` (value: `"GRAFANA_DASHBOARD"`) + +* `GRAFANA_BASIC_ROLE` (value: `"GRAFANA_BASIC_ROLE"`) + +* `GRAFANA_ROLE` (value: `"GRAFANA_ROLE"`) + +* `CLICKHOUSE_DATABASE` (value: `"CLICKHOUSE_DATABASE"`) + +* `CLICKHOUSE_TABLE` (value: `"CLICKHOUSE_TABLE"`) + +* `TWINGATE_RESOURCE` (value: `"TWINGATE_RESOURCE"`) + +* `ZENDESK_ROLE` (value: `"ZENDESK_ROLE"`) + [[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 0c5e26a..0aa77c2 100644 --- a/docs/ResourcesAPI.md +++ b/docs/ResourcesAPI.md @@ -7,10 +7,13 @@ Method | HTTP request | Description [**AddResourceNhi**](ResourcesAPI.md#AddResourceNhi) | **Post** /resources/{resource_id}/non-human-identities/{non_human_identity_id} | [**AddResourceUser**](ResourcesAPI.md#AddResourceUser) | **Post** /resources/{resource_id}/users/{user_id} | [**CreateResource**](ResourcesAPI.md#CreateResource) | **Post** /resources | +[**CreateResourceCustomAccessLevel**](ResourcesAPI.md#CreateResourceCustomAccessLevel) | **Post** /resources/{resource_id}/custom-access-levels | [**DeleteResource**](ResourcesAPI.md#DeleteResource) | **Delete** /resources/{resource_id} | +[**DeleteResourceCustomAccessLevel**](ResourcesAPI.md#DeleteResourceCustomAccessLevel) | **Delete** /resources/{resource_id}/custom-access-levels/{access_level_remote_id} | [**DeleteResourceNhi**](ResourcesAPI.md#DeleteResourceNhi) | **Delete** /resources/{resource_id}/non-human-identities/{non_human_identity_id} | [**DeleteResourceUser**](ResourcesAPI.md#DeleteResourceUser) | **Delete** /resources/{resource_id}/users/{user_id} | [**GetResource**](ResourcesAPI.md#GetResource) | **Get** /resources/{resource_id} | Get resource by ID +[**GetResourceCustomAccessLevels**](ResourcesAPI.md#GetResourceCustomAccessLevels) | **Get** /resources/{resource_id}/custom-access-levels | [**GetResourceGroups**](ResourcesAPI.md#GetResourceGroups) | **Get** /resources/{resource_id}/groups | [**GetResourceMessageChannels**](ResourcesAPI.md#GetResourceMessageChannels) | **Get** /resources/{resource_id}/message-channels | [**GetResourceNhis**](ResourcesAPI.md#GetResourceNhis) | **Get** /resources/{resource_id}/non-human-identities | @@ -29,6 +32,7 @@ Method | HTTP request | Description [**SetResourceReviewers**](ResourcesAPI.md#SetResourceReviewers) | **Put** /resources/{resource_id}/reviewers | [**SetResourceScopedRolePermissions**](ResourcesAPI.md#SetResourceScopedRolePermissions) | **Put** /resources/{resource_id}/scoped-role-permissions | [**SetResourceVisibility**](ResourcesAPI.md#SetResourceVisibility) | **Put** /resources/{resource_id}/visibility | +[**UpdateResourceCustomAccessLevel**](ResourcesAPI.md#UpdateResourceCustomAccessLevel) | **Patch** /resources/{resource_id}/custom-access-levels/{access_level_remote_id} | [**UpdateResourceUser**](ResourcesAPI.md#UpdateResourceUser) | **Put** /resources/{resource_id}/users/{user_id} | [**UpdateResources**](ResourcesAPI.md#UpdateResources) | **Put** /resources | @@ -254,6 +258,78 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## CreateResourceCustomAccessLevel + +> ResourceCustomAccessLevelResponse CreateResourceCustomAccessLevel(ctx, resourceId).CreateResourceCustomAccessLevelInfo(createResourceCustomAccessLevelInfo).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/opalsecurity/opal-go" +) + +func main() { + resourceId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the resource. + createResourceCustomAccessLevelInfo := *openapiclient.NewCreateResourceCustomAccessLevelInfo(*openapiclient.NewResourceAccessLevel("AdminRole", "arn:aws:iam::590304332660:role/AdministratorAccess")) // CreateResourceCustomAccessLevelInfo | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ResourcesAPI.CreateResourceCustomAccessLevel(context.Background(), resourceId).CreateResourceCustomAccessLevelInfo(createResourceCustomAccessLevelInfo).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.CreateResourceCustomAccessLevel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateResourceCustomAccessLevel`: ResourceCustomAccessLevelResponse + fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.CreateResourceCustomAccessLevel`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**resourceId** | **string** | The ID of the resource. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateResourceCustomAccessLevelRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **createResourceCustomAccessLevelInfo** | [**CreateResourceCustomAccessLevelInfo**](CreateResourceCustomAccessLevelInfo.md) | | + +### Return type + +[**ResourceCustomAccessLevelResponse**](ResourceCustomAccessLevelResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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) + + ## DeleteResource > DeleteResource(ctx, resourceId).Execute() @@ -304,6 +380,77 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[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) + + +## DeleteResourceCustomAccessLevel + +> DeleteResourceCustomAccessLevel(ctx, resourceId, accessLevelRemoteId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/opalsecurity/opal-go" +) + +func main() { + resourceId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the resource. + accessLevelRemoteId := "admin" // string | The remote ID of the access level. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ResourcesAPI.DeleteResourceCustomAccessLevel(context.Background(), resourceId, accessLevelRemoteId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.DeleteResourceCustomAccessLevel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**resourceId** | **string** | The ID of the resource. | +**accessLevelRemoteId** | **string** | The remote ID of the access level. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteResourceCustomAccessLevelRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + ### Return type (empty response body) @@ -538,6 +685,76 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## GetResourceCustomAccessLevels + +> ResourceCustomAccessLevelList GetResourceCustomAccessLevels(ctx, resourceId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/opalsecurity/opal-go" +) + +func main() { + resourceId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the resource. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ResourcesAPI.GetResourceCustomAccessLevels(context.Background(), resourceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.GetResourceCustomAccessLevels``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetResourceCustomAccessLevels`: ResourceCustomAccessLevelList + fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.GetResourceCustomAccessLevels`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**resourceId** | **string** | The ID of the resource. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetResourceCustomAccessLevelsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResourceCustomAccessLevelList**](ResourceCustomAccessLevelList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + ## GetResourceGroups > GroupResourceList GetResourceGroups(ctx, resourceId).Execute() @@ -1249,7 +1466,7 @@ Name | Type | Description | Notes ## GetResources -> PaginatedResourcesList GetResources(ctx).Cursor(cursor).PageSize(pageSize).ResourceTypeFilter(resourceTypeFilter).ResourceIds(resourceIds).ResourceName(resourceName).ParentResourceId(parentResourceId).AncestorResourceId(ancestorResourceId).RemoteId(remoteId).Execute() +> PaginatedResourcesList GetResources(ctx).Cursor(cursor).PageSize(pageSize).ResourceTypeFilter(resourceTypeFilter).ResourceIds(resourceIds).ResourceName(resourceName).ParentResourceId(parentResourceId).AncestorResourceId(ancestorResourceId).RemoteId(remoteId).TagIds(tagIds).Execute() Get resources @@ -1273,13 +1490,14 @@ func main() { resourceTypeFilter := openapiclient.ResourceTypeEnum("AWS_IAM_ROLE") // ResourceTypeEnum | The resource type to filter by. Required when remote_id is provided. (optional) resourceIds := []string{"1b978423-db0a-4037-a4cf-f79c60cb67b3"} // []string | The resource ids to filter by. (optional) resourceName := "example-name" // string | Resource name. (optional) - parentResourceId := "["4baf8423-db0a-4037-a4cf-f79c60cb67a5"]" // string | The parent resource id to filter by. (optional) - ancestorResourceId := "["4baf8423-db0a-4037-a4cf-f79c60cb67a5"]" // string | The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. (optional) + parentResourceId := "[\"4baf8423-db0a-4037-a4cf-f79c60cb67a5\"]" // string | The parent resource id to filter by. (optional) + ancestorResourceId := "[\"4baf8423-db0a-4037-a4cf-f79c60cb67a5\"]" // string | The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. (optional) remoteId := "remoteId_example" // string | 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) + tagIds := []string{"Inner_example"} // []string | The IDs of the tags to filter by. Returns only resources that have any of these tags applied. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.GetResources(context.Background()).Cursor(cursor).PageSize(pageSize).ResourceTypeFilter(resourceTypeFilter).ResourceIds(resourceIds).ResourceName(resourceName).ParentResourceId(parentResourceId).AncestorResourceId(ancestorResourceId).RemoteId(remoteId).Execute() + resp, r, err := apiClient.ResourcesAPI.GetResources(context.Background()).Cursor(cursor).PageSize(pageSize).ResourceTypeFilter(resourceTypeFilter).ResourceIds(resourceIds).ResourceName(resourceName).ParentResourceId(parentResourceId).AncestorResourceId(ancestorResourceId).RemoteId(remoteId).TagIds(tagIds).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.GetResources``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -1308,6 +1526,7 @@ Name | Type | Description | Notes **parentResourceId** | **string** | The parent resource id to filter by. | **ancestorResourceId** | **string** | The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. | **remoteId** | **string** | 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. | + **tagIds** | **[]string** | The IDs of the tags to filter by. Returns only resources that have any of these tags applied. | ### Return type @@ -1842,6 +2061,81 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## UpdateResourceCustomAccessLevel + +> ResourceCustomAccessLevelResponse UpdateResourceCustomAccessLevel(ctx, resourceId, accessLevelRemoteId).UpdateResourceCustomAccessLevelInfo(updateResourceCustomAccessLevelInfo).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/opalsecurity/opal-go" +) + +func main() { + resourceId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the resource. + accessLevelRemoteId := "admin" // string | The remote ID of the access level. + updateResourceCustomAccessLevelInfo := *openapiclient.NewUpdateResourceCustomAccessLevelInfo() // UpdateResourceCustomAccessLevelInfo | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ResourcesAPI.UpdateResourceCustomAccessLevel(context.Background(), resourceId, accessLevelRemoteId).UpdateResourceCustomAccessLevelInfo(updateResourceCustomAccessLevelInfo).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.UpdateResourceCustomAccessLevel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateResourceCustomAccessLevel`: ResourceCustomAccessLevelResponse + fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.UpdateResourceCustomAccessLevel`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**resourceId** | **string** | The ID of the resource. | +**accessLevelRemoteId** | **string** | The remote ID of the access level. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateResourceCustomAccessLevelRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **updateResourceCustomAccessLevelInfo** | [**UpdateResourceCustomAccessLevelInfo**](UpdateResourceCustomAccessLevelInfo.md) | | + +### Return type + +[**ResourceCustomAccessLevelResponse**](ResourceCustomAccessLevelResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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) + + ## UpdateResourceUser > ResourceUser UpdateResourceUser(ctx, resourceId, userId).UpdateResourceUserRequest(updateResourceUserRequest).Execute() diff --git a/docs/ReviewerStage.md b/docs/ReviewerStage.md index 31b8e57..894644e 100644 --- a/docs/ReviewerStage.md +++ b/docs/ReviewerStage.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **RequireManagerApproval** | **bool** | Whether this reviewer stage should require manager approval. | **RequireAdminApproval** | Pointer to **bool** | Whether this reviewer stage should require admin approval. | [optional] **Operator** | **string** | The operator of the reviewer stage. Admin and manager approval are also treated as reviewers. | -**OwnerIds** | **[]string** | | +**OwnerIds** | **[]string** | The IDs of owners assigned as reviewers for this stage. | +**ServiceUserIds** | Pointer to **[]string** | The IDs of service users assigned as reviewers for this stage. | [optional] ## Methods @@ -113,6 +114,31 @@ and a boolean to check if the value has been set. SetOwnerIds sets OwnerIds field to given value. +### GetServiceUserIds + +`func (o *ReviewerStage) GetServiceUserIds() []string` + +GetServiceUserIds returns the ServiceUserIds field if non-nil, zero value otherwise. + +### GetServiceUserIdsOk + +`func (o *ReviewerStage) GetServiceUserIdsOk() (*[]string, bool)` + +GetServiceUserIdsOk returns a tuple with the ServiceUserIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceUserIds + +`func (o *ReviewerStage) SetServiceUserIds(v []string)` + +SetServiceUserIds sets ServiceUserIds field to given value. + +### HasServiceUserIds + +`func (o *ReviewerStage) HasServiceUserIds() bool` + +HasServiceUserIds returns a boolean if a field has been set. + [[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/RuleDisjunction.md b/docs/RuleDisjunction.md index 9a8dfdc..0bdd650 100644 --- a/docs/RuleDisjunction.md +++ b/docs/RuleDisjunction.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Selectors** | [**[]TagSelector**](TagSelector.md) | | +**AttributeSelectors** | Pointer to [**[]UserAttributeSelector**](UserAttributeSelector.md) | | [optional] ## Methods @@ -45,6 +46,31 @@ and a boolean to check if the value has been set. SetSelectors sets Selectors field to given value. +### GetAttributeSelectors + +`func (o *RuleDisjunction) GetAttributeSelectors() []UserAttributeSelector` + +GetAttributeSelectors returns the AttributeSelectors field if non-nil, zero value otherwise. + +### GetAttributeSelectorsOk + +`func (o *RuleDisjunction) GetAttributeSelectorsOk() (*[]UserAttributeSelector, bool)` + +GetAttributeSelectorsOk returns a tuple with the AttributeSelectors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributeSelectors + +`func (o *RuleDisjunction) SetAttributeSelectors(v []UserAttributeSelector)` + +SetAttributeSelectors sets AttributeSelectors field to given value. + +### HasAttributeSelectors + +`func (o *RuleDisjunction) HasAttributeSelectors() bool` + +HasAttributeSelectors returns a boolean if a field has been set. + [[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/RunOpalQueryRequest.md b/docs/RunOpalQueryRequest.md new file mode 100644 index 0000000..e1c92da --- /dev/null +++ b/docs/RunOpalQueryRequest.md @@ -0,0 +1,129 @@ +# RunOpalQueryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Query** | Pointer to [**OpalNodeQueryBody**](OpalNodeQueryBody.md) | | [optional] +**First** | Pointer to **int32** | Maximum number of results to return. Defaults to 200. | [optional] +**After** | Pointer to **string** | Cursor from a previous response to fetch the next page of results. | [optional] + +## Methods + +### NewRunOpalQueryRequest + +`func NewRunOpalQueryRequest(type_ string, ) *RunOpalQueryRequest` + +NewRunOpalQueryRequest instantiates a new RunOpalQueryRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunOpalQueryRequestWithDefaults + +`func NewRunOpalQueryRequestWithDefaults() *RunOpalQueryRequest` + +NewRunOpalQueryRequestWithDefaults instantiates a new RunOpalQueryRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *RunOpalQueryRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RunOpalQueryRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RunOpalQueryRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetQuery + +`func (o *RunOpalQueryRequest) GetQuery() OpalNodeQueryBody` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *RunOpalQueryRequest) GetQueryOk() (*OpalNodeQueryBody, bool)` + +GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuery + +`func (o *RunOpalQueryRequest) SetQuery(v OpalNodeQueryBody)` + +SetQuery sets Query field to given value. + +### HasQuery + +`func (o *RunOpalQueryRequest) HasQuery() bool` + +HasQuery returns a boolean if a field has been set. + +### GetFirst + +`func (o *RunOpalQueryRequest) GetFirst() int32` + +GetFirst returns the First field if non-nil, zero value otherwise. + +### GetFirstOk + +`func (o *RunOpalQueryRequest) GetFirstOk() (*int32, bool)` + +GetFirstOk returns a tuple with the First field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirst + +`func (o *RunOpalQueryRequest) SetFirst(v int32)` + +SetFirst sets First field to given value. + +### HasFirst + +`func (o *RunOpalQueryRequest) HasFirst() bool` + +HasFirst returns a boolean if a field has been set. + +### GetAfter + +`func (o *RunOpalQueryRequest) GetAfter() string` + +GetAfter returns the After field if non-nil, zero value otherwise. + +### GetAfterOk + +`func (o *RunOpalQueryRequest) GetAfterOk() (*string, bool)` + +GetAfterOk returns a tuple with the After field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfter + +`func (o *RunOpalQueryRequest) SetAfter(v string)` + +SetAfter sets After field to given value. + +### HasAfter + +`func (o *RunOpalQueryRequest) HasAfter() bool` + +HasAfter returns a boolean if a field has been set. + + +[[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 new file mode 100644 index 0000000..aa75cf1 --- /dev/null +++ b/docs/StringMatchType.md @@ -0,0 +1,17 @@ +# StringMatchType + +## 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/Token.md b/docs/Token.md new file mode 100644 index 0000000..2955c90 --- /dev/null +++ b/docs/Token.md @@ -0,0 +1,208 @@ +# Token + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TokenId** | **string** | The ID of the API token. | +**CreatedAt** | **time.Time** | The date and time the token was created. | +**TokenLabel** | **string** | A human-readable label for the token. | +**CreatorUserId** | **string** | The ID of the user who created the token. | +**UserId** | **string** | The ID of the user the token authenticates as. | +**LastUsedAt** | Pointer to **time.Time** | The date and time the token was last used. | [optional] +**AccessLevel** | [**ApiAccessLevelEnum**](ApiAccessLevelEnum.md) | | +**ExpiresAt** | Pointer to **time.Time** | The date and time the token expires. | [optional] + +## Methods + +### NewToken + +`func NewToken(tokenId string, createdAt time.Time, tokenLabel string, creatorUserId string, userId string, accessLevel ApiAccessLevelEnum, ) *Token` + +NewToken instantiates a new Token object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTokenWithDefaults + +`func NewTokenWithDefaults() *Token` + +NewTokenWithDefaults instantiates a new Token object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTokenId + +`func (o *Token) GetTokenId() string` + +GetTokenId returns the TokenId field if non-nil, zero value otherwise. + +### GetTokenIdOk + +`func (o *Token) GetTokenIdOk() (*string, bool)` + +GetTokenIdOk returns a tuple with the TokenId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTokenId + +`func (o *Token) SetTokenId(v string)` + +SetTokenId sets TokenId field to given value. + + +### GetCreatedAt + +`func (o *Token) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Token) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Token) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + + +### GetTokenLabel + +`func (o *Token) GetTokenLabel() string` + +GetTokenLabel returns the TokenLabel field if non-nil, zero value otherwise. + +### GetTokenLabelOk + +`func (o *Token) GetTokenLabelOk() (*string, bool)` + +GetTokenLabelOk returns a tuple with the TokenLabel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTokenLabel + +`func (o *Token) SetTokenLabel(v string)` + +SetTokenLabel sets TokenLabel field to given value. + + +### GetCreatorUserId + +`func (o *Token) GetCreatorUserId() string` + +GetCreatorUserId returns the CreatorUserId field if non-nil, zero value otherwise. + +### GetCreatorUserIdOk + +`func (o *Token) GetCreatorUserIdOk() (*string, bool)` + +GetCreatorUserIdOk returns a tuple with the CreatorUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatorUserId + +`func (o *Token) SetCreatorUserId(v string)` + +SetCreatorUserId sets CreatorUserId field to given value. + + +### GetUserId + +`func (o *Token) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *Token) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *Token) SetUserId(v string)` + +SetUserId sets UserId field to given value. + + +### GetLastUsedAt + +`func (o *Token) GetLastUsedAt() time.Time` + +GetLastUsedAt returns the LastUsedAt field if non-nil, zero value otherwise. + +### GetLastUsedAtOk + +`func (o *Token) GetLastUsedAtOk() (*time.Time, bool)` + +GetLastUsedAtOk returns a tuple with the LastUsedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUsedAt + +`func (o *Token) SetLastUsedAt(v time.Time)` + +SetLastUsedAt sets LastUsedAt field to given value. + +### HasLastUsedAt + +`func (o *Token) HasLastUsedAt() bool` + +HasLastUsedAt returns a boolean if a field has been set. + +### GetAccessLevel + +`func (o *Token) GetAccessLevel() ApiAccessLevelEnum` + +GetAccessLevel returns the AccessLevel field if non-nil, zero value otherwise. + +### GetAccessLevelOk + +`func (o *Token) GetAccessLevelOk() (*ApiAccessLevelEnum, bool)` + +GetAccessLevelOk returns a tuple with the AccessLevel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessLevel + +`func (o *Token) SetAccessLevel(v ApiAccessLevelEnum)` + +SetAccessLevel sets AccessLevel field to given value. + + +### GetExpiresAt + +`func (o *Token) GetExpiresAt() time.Time` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *Token) GetExpiresAtOk() (*time.Time, bool)` + +GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresAt + +`func (o *Token) SetExpiresAt(v time.Time)` + +SetExpiresAt sets ExpiresAt field to given value. + +### HasExpiresAt + +`func (o *Token) HasExpiresAt() bool` + +HasExpiresAt returns a boolean if a field has been set. + + +[[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 new file mode 100644 index 0000000..9e81864 --- /dev/null +++ b/docs/TokensAPI.md @@ -0,0 +1,150 @@ +# \TokensAPI + +All URIs are relative to *https://api.opal.dev/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteToken**](TokensAPI.md#DeleteToken) | **Delete** /tokens/{token_id} | Delete token +[**GetTokens**](TokensAPI.md#GetTokens) | **Get** /tokens | Get tokens + + + +## DeleteToken + +> DeleteToken(ctx, tokenId).Execute() + +Delete token + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/opalsecurity/opal-go" +) + +func main() { + tokenId := "f454d283-ca87-4a8a-bdbb-df212eca5353" // string | The ID of the token to delete. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TokensAPI.DeleteToken(context.Background(), tokenId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TokensAPI.DeleteToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**tokenId** | **string** | The ID of the token to delete. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[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) + + +## GetTokens + +> PaginatedTokensList GetTokens(ctx).Cursor(cursor).PageSize(pageSize).TokenIds(tokenIds).UserId(userId).Execute() + +Get tokens + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/opalsecurity/opal-go" +) + +func main() { + cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) + pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) + tokenIds := []string{"Inner_example"} // []string | Filter by token IDs. (optional) + userId := "29827fb8-f2dd-4e80-9576-28e31e9934ac" // string | Filter by user ID. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TokensAPI.GetTokens(context.Background()).Cursor(cursor).PageSize(pageSize).TokenIds(tokenIds).UserId(userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TokensAPI.GetTokens``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTokens`: PaginatedTokensList + fmt.Fprintf(os.Stdout, "Response from `TokensAPI.GetTokens`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTokensRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cursor** | **string** | The pagination cursor value. | + **pageSize** | **int32** | Number of results to return per page. Default is 200. | + **tokenIds** | **[]string** | Filter by token IDs. | + **userId** | **string** | Filter by user ID. | + +### Return type + +[**PaginatedTokensList**](PaginatedTokensList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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/UpdateEventStreamInfo.md b/docs/UpdateEventStreamInfo.md new file mode 100644 index 0000000..8d3552b --- /dev/null +++ b/docs/UpdateEventStreamInfo.md @@ -0,0 +1,134 @@ +# UpdateEventStreamInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | Updated name for the event stream. | [optional] +**Enabled** | Pointer to **bool** | Whether the event stream should be enabled. | [optional] +**WebhookUrl** | Pointer to **string** | Updated webhook URL. | [optional] +**Credentials** | Pointer to [**WebhookCredentials**](WebhookCredentials.md) | | [optional] + +## Methods + +### NewUpdateEventStreamInfo + +`func NewUpdateEventStreamInfo() *UpdateEventStreamInfo` + +NewUpdateEventStreamInfo instantiates a new UpdateEventStreamInfo object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateEventStreamInfoWithDefaults + +`func NewUpdateEventStreamInfoWithDefaults() *UpdateEventStreamInfo` + +NewUpdateEventStreamInfoWithDefaults instantiates a new UpdateEventStreamInfo object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *UpdateEventStreamInfo) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateEventStreamInfo) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *UpdateEventStreamInfo) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *UpdateEventStreamInfo) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetEnabled + +`func (o *UpdateEventStreamInfo) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *UpdateEventStreamInfo) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *UpdateEventStreamInfo) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *UpdateEventStreamInfo) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetWebhookUrl + +`func (o *UpdateEventStreamInfo) GetWebhookUrl() string` + +GetWebhookUrl returns the WebhookUrl field if non-nil, zero value otherwise. + +### GetWebhookUrlOk + +`func (o *UpdateEventStreamInfo) GetWebhookUrlOk() (*string, bool)` + +GetWebhookUrlOk returns a tuple with the WebhookUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWebhookUrl + +`func (o *UpdateEventStreamInfo) SetWebhookUrl(v string)` + +SetWebhookUrl sets WebhookUrl field to given value. + +### HasWebhookUrl + +`func (o *UpdateEventStreamInfo) HasWebhookUrl() bool` + +HasWebhookUrl returns a boolean if a field has been set. + +### GetCredentials + +`func (o *UpdateEventStreamInfo) GetCredentials() WebhookCredentials` + +GetCredentials returns the Credentials field if non-nil, zero value otherwise. + +### GetCredentialsOk + +`func (o *UpdateEventStreamInfo) GetCredentialsOk() (*WebhookCredentials, bool)` + +GetCredentialsOk returns a tuple with the Credentials field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCredentials + +`func (o *UpdateEventStreamInfo) SetCredentials(v WebhookCredentials)` + +SetCredentials sets Credentials field to given value. + +### HasCredentials + +`func (o *UpdateEventStreamInfo) HasCredentials() bool` + +HasCredentials returns a boolean if a field has been set. + + +[[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/UpdateGroupUserRequest.md b/docs/UpdateGroupUserRequest.md index f29ce00..b5f79b1 100644 --- a/docs/UpdateGroupUserRequest.md +++ b/docs/UpdateGroupUserRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**DurationMinutes** | **int32** | The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite. | +**DurationMinutes** | **int32** | The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite, or a negative value to revoke access. | **AccessLevelRemoteId** | Pointer to **string** | The updated remote ID of the access level granted to this user. | [optional] ## Methods diff --git a/docs/UpdateResourceCustomAccessLevelInfo.md b/docs/UpdateResourceCustomAccessLevelInfo.md new file mode 100644 index 0000000..7a1547b --- /dev/null +++ b/docs/UpdateResourceCustomAccessLevelInfo.md @@ -0,0 +1,160 @@ +# UpdateResourceCustomAccessLevelInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessLevelName** | Pointer to **string** | The new human-readable name. | [optional] +**Policy** | Pointer to **string** | The new policy document. | [optional] +**RequestableByDefault** | Pointer to **bool** | Whether the role is requestable. | [optional] +**StackableSensitivityIndex** | Pointer to **int32** | The new sensitivity index. | [optional] +**ClearStackableSensitivityIndex** | Pointer to **bool** | Set to true to remove from the hierarchy. | [optional] + +## Methods + +### NewUpdateResourceCustomAccessLevelInfo + +`func NewUpdateResourceCustomAccessLevelInfo() *UpdateResourceCustomAccessLevelInfo` + +NewUpdateResourceCustomAccessLevelInfo instantiates a new UpdateResourceCustomAccessLevelInfo object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateResourceCustomAccessLevelInfoWithDefaults + +`func NewUpdateResourceCustomAccessLevelInfoWithDefaults() *UpdateResourceCustomAccessLevelInfo` + +NewUpdateResourceCustomAccessLevelInfoWithDefaults instantiates a new UpdateResourceCustomAccessLevelInfo object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessLevelName + +`func (o *UpdateResourceCustomAccessLevelInfo) GetAccessLevelName() string` + +GetAccessLevelName returns the AccessLevelName field if non-nil, zero value otherwise. + +### GetAccessLevelNameOk + +`func (o *UpdateResourceCustomAccessLevelInfo) GetAccessLevelNameOk() (*string, bool)` + +GetAccessLevelNameOk returns a tuple with the AccessLevelName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessLevelName + +`func (o *UpdateResourceCustomAccessLevelInfo) SetAccessLevelName(v string)` + +SetAccessLevelName sets AccessLevelName field to given value. + +### HasAccessLevelName + +`func (o *UpdateResourceCustomAccessLevelInfo) HasAccessLevelName() bool` + +HasAccessLevelName returns a boolean if a field has been set. + +### GetPolicy + +`func (o *UpdateResourceCustomAccessLevelInfo) GetPolicy() string` + +GetPolicy returns the Policy field if non-nil, zero value otherwise. + +### GetPolicyOk + +`func (o *UpdateResourceCustomAccessLevelInfo) GetPolicyOk() (*string, bool)` + +GetPolicyOk returns a tuple with the Policy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicy + +`func (o *UpdateResourceCustomAccessLevelInfo) SetPolicy(v string)` + +SetPolicy sets Policy field to given value. + +### HasPolicy + +`func (o *UpdateResourceCustomAccessLevelInfo) HasPolicy() bool` + +HasPolicy returns a boolean if a field has been set. + +### GetRequestableByDefault + +`func (o *UpdateResourceCustomAccessLevelInfo) GetRequestableByDefault() bool` + +GetRequestableByDefault returns the RequestableByDefault field if non-nil, zero value otherwise. + +### GetRequestableByDefaultOk + +`func (o *UpdateResourceCustomAccessLevelInfo) GetRequestableByDefaultOk() (*bool, bool)` + +GetRequestableByDefaultOk returns a tuple with the RequestableByDefault field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestableByDefault + +`func (o *UpdateResourceCustomAccessLevelInfo) SetRequestableByDefault(v bool)` + +SetRequestableByDefault sets RequestableByDefault field to given value. + +### HasRequestableByDefault + +`func (o *UpdateResourceCustomAccessLevelInfo) HasRequestableByDefault() bool` + +HasRequestableByDefault returns a boolean if a field has been set. + +### GetStackableSensitivityIndex + +`func (o *UpdateResourceCustomAccessLevelInfo) GetStackableSensitivityIndex() int32` + +GetStackableSensitivityIndex returns the StackableSensitivityIndex field if non-nil, zero value otherwise. + +### GetStackableSensitivityIndexOk + +`func (o *UpdateResourceCustomAccessLevelInfo) GetStackableSensitivityIndexOk() (*int32, bool)` + +GetStackableSensitivityIndexOk returns a tuple with the StackableSensitivityIndex field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStackableSensitivityIndex + +`func (o *UpdateResourceCustomAccessLevelInfo) SetStackableSensitivityIndex(v int32)` + +SetStackableSensitivityIndex sets StackableSensitivityIndex field to given value. + +### HasStackableSensitivityIndex + +`func (o *UpdateResourceCustomAccessLevelInfo) HasStackableSensitivityIndex() bool` + +HasStackableSensitivityIndex returns a boolean if a field has been set. + +### GetClearStackableSensitivityIndex + +`func (o *UpdateResourceCustomAccessLevelInfo) GetClearStackableSensitivityIndex() bool` + +GetClearStackableSensitivityIndex returns the ClearStackableSensitivityIndex field if non-nil, zero value otherwise. + +### GetClearStackableSensitivityIndexOk + +`func (o *UpdateResourceCustomAccessLevelInfo) GetClearStackableSensitivityIndexOk() (*bool, bool)` + +GetClearStackableSensitivityIndexOk returns a tuple with the ClearStackableSensitivityIndex field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClearStackableSensitivityIndex + +`func (o *UpdateResourceCustomAccessLevelInfo) SetClearStackableSensitivityIndex(v bool)` + +SetClearStackableSensitivityIndex sets ClearStackableSensitivityIndex field to given value. + +### HasClearStackableSensitivityIndex + +`func (o *UpdateResourceCustomAccessLevelInfo) HasClearStackableSensitivityIndex() bool` + +HasClearStackableSensitivityIndex returns a boolean if a field has been set. + + +[[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 d6d857a..7f9c0a7 100644 --- a/docs/UpdateResourceInfo.md +++ b/docs/UpdateResourceInfo.md @@ -24,6 +24,7 @@ Name | Type | Description | Notes **RequestTemplateId** | Pointer to **string** | The ID of the associated request template. Deprecated in favor of `request_configurations`. | [optional] **IsRequestable** | Pointer to **bool** | A bool representing whether or not to allow access requests to this resource. Deprecated in favor of `request_configurations`. | [optional] **ExtensionsDurationInMinutes** | Pointer to **int32** | 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] +**ParentResourceId** | Pointer to **string** | The ID of the parent resource. | [optional] **RequestConfigurations** | Pointer to [**[]RequestConfiguration**](RequestConfiguration.md) | A list of configurations for requests to this resource. If not provided, the default request configuration will be used. | [optional] **RequestConfigurationList** | Pointer to [**CreateRequestConfigurationInfoList**](CreateRequestConfigurationInfoList.md) | 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`. | [optional] @@ -541,6 +542,31 @@ SetExtensionsDurationInMinutes sets ExtensionsDurationInMinutes field to given v HasExtensionsDurationInMinutes returns a boolean if a field has been set. +### GetParentResourceId + +`func (o *UpdateResourceInfo) GetParentResourceId() string` + +GetParentResourceId returns the ParentResourceId field if non-nil, zero value otherwise. + +### GetParentResourceIdOk + +`func (o *UpdateResourceInfo) GetParentResourceIdOk() (*string, bool)` + +GetParentResourceIdOk returns a tuple with the ParentResourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentResourceId + +`func (o *UpdateResourceInfo) SetParentResourceId(v string)` + +SetParentResourceId sets ParentResourceId field to given value. + +### HasParentResourceId + +`func (o *UpdateResourceInfo) HasParentResourceId() bool` + +HasParentResourceId returns a boolean if a field has been set. + ### GetRequestConfigurations `func (o *UpdateResourceInfo) GetRequestConfigurations() []RequestConfiguration` diff --git a/docs/UserAttributeSelector.md b/docs/UserAttributeSelector.md new file mode 100644 index 0000000..28e747a --- /dev/null +++ b/docs/UserAttributeSelector.md @@ -0,0 +1,72 @@ +# UserAttributeSelector + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attribute** | **string** | | +**Values** | **[]string** | | + +## Methods + +### NewUserAttributeSelector + +`func NewUserAttributeSelector(attribute string, values []string, ) *UserAttributeSelector` + +NewUserAttributeSelector instantiates a new UserAttributeSelector object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserAttributeSelectorWithDefaults + +`func NewUserAttributeSelectorWithDefaults() *UserAttributeSelector` + +NewUserAttributeSelectorWithDefaults instantiates a new UserAttributeSelector object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAttribute + +`func (o *UserAttributeSelector) GetAttribute() string` + +GetAttribute returns the Attribute field if non-nil, zero value otherwise. + +### GetAttributeOk + +`func (o *UserAttributeSelector) GetAttributeOk() (*string, bool)` + +GetAttributeOk returns a tuple with the Attribute field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttribute + +`func (o *UserAttributeSelector) SetAttribute(v string)` + +SetAttribute sets Attribute field to given value. + + +### GetValues + +`func (o *UserAttributeSelector) GetValues() []string` + +GetValues returns the Values field if non-nil, zero value otherwise. + +### GetValuesOk + +`func (o *UserAttributeSelector) GetValuesOk() (*[]string, bool)` + +GetValuesOk returns a tuple with the Values field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValues + +`func (o *UserAttributeSelector) SetValues(v []string)` + +SetValues sets Values field to given value. + + + +[[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 bc1bece..add784f 100644 --- a/docs/UsersAPI.md +++ b/docs/UsersAPI.md @@ -157,7 +157,7 @@ Name | Type | Description | Notes ## GetUsers -> PaginatedUsersList GetUsers(ctx).Cursor(cursor).PageSize(pageSize).Execute() +> PaginatedUsersList GetUsers(ctx).Cursor(cursor).PageSize(pageSize).TagIds(tagIds).Execute() @@ -178,10 +178,11 @@ import ( func main() { cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) + tagIds := []string{"Inner_example"} // []string | The IDs of the tags to filter by. Returns only users that have any of these tags applied. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersAPI.GetUsers(context.Background()).Cursor(cursor).PageSize(pageSize).Execute() + resp, r, err := apiClient.UsersAPI.GetUsers(context.Background()).Cursor(cursor).PageSize(pageSize).TagIds(tagIds).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.GetUsers``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -204,6 +205,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **cursor** | **string** | The pagination cursor value. | **pageSize** | **int32** | Number of results to return per page. Default is 200. | + **tagIds** | **[]string** | The IDs of the tags to filter by. Returns only users that have any of these tags applied. | ### Return type diff --git a/docs/WebhookApiKeyCredential.md b/docs/WebhookApiKeyCredential.md new file mode 100644 index 0000000..3e17aa9 --- /dev/null +++ b/docs/WebhookApiKeyCredential.md @@ -0,0 +1,114 @@ +# WebhookApiKeyCredential + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The unique identifier for the credential. | +**Name** | **string** | The name of the API key. | +**Value** | **string** | The value of the API key. | +**Location** | [**WebhookApiKeyLocationEnum**](WebhookApiKeyLocationEnum.md) | | + +## Methods + +### NewWebhookApiKeyCredential + +`func NewWebhookApiKeyCredential(id string, name string, value string, location WebhookApiKeyLocationEnum, ) *WebhookApiKeyCredential` + +NewWebhookApiKeyCredential instantiates a new WebhookApiKeyCredential object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWebhookApiKeyCredentialWithDefaults + +`func NewWebhookApiKeyCredentialWithDefaults() *WebhookApiKeyCredential` + +NewWebhookApiKeyCredentialWithDefaults instantiates a new WebhookApiKeyCredential object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *WebhookApiKeyCredential) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *WebhookApiKeyCredential) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *WebhookApiKeyCredential) SetId(v string)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *WebhookApiKeyCredential) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WebhookApiKeyCredential) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *WebhookApiKeyCredential) SetName(v string)` + +SetName sets Name field to given value. + + +### GetValue + +`func (o *WebhookApiKeyCredential) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *WebhookApiKeyCredential) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *WebhookApiKeyCredential) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetLocation + +`func (o *WebhookApiKeyCredential) GetLocation() WebhookApiKeyLocationEnum` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *WebhookApiKeyCredential) GetLocationOk() (*WebhookApiKeyLocationEnum, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *WebhookApiKeyCredential) SetLocation(v WebhookApiKeyLocationEnum)` + +SetLocation sets Location field to given value. + + + +[[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/WebhookApiKeyLocationEnum.md b/docs/WebhookApiKeyLocationEnum.md new file mode 100644 index 0000000..4850d8c --- /dev/null +++ b/docs/WebhookApiKeyLocationEnum.md @@ -0,0 +1,13 @@ +# WebhookApiKeyLocationEnum + +## Enum + + +* `HEADER` (value: `"HEADER"`) + +* `QUERY_PARAM` (value: `"QUERY_PARAM"`) + + +[[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/WebhookAuthTypeEnum.md b/docs/WebhookAuthTypeEnum.md new file mode 100644 index 0000000..2947b16 --- /dev/null +++ b/docs/WebhookAuthTypeEnum.md @@ -0,0 +1,15 @@ +# WebhookAuthTypeEnum + +## Enum + + +* `NONE` (value: `"NONE"`) + +* `API_KEY` (value: `"API_KEY"`) + +* `HMAC` (value: `"HMAC"`) + + +[[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/WebhookCredentials.md b/docs/WebhookCredentials.md new file mode 100644 index 0000000..9d0342b --- /dev/null +++ b/docs/WebhookCredentials.md @@ -0,0 +1,129 @@ +# WebhookCredentials + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthType** | [**WebhookAuthTypeEnum**](WebhookAuthTypeEnum.md) | | +**ApiKeyCredentials** | Pointer to [**[]WebhookApiKeyCredential**](WebhookApiKeyCredential.md) | API key credentials, present when auth_type is API_KEY. | [optional] +**HmacCredential1** | Pointer to [**WebhookHmacCredential**](WebhookHmacCredential.md) | Primary HMAC credential, present when auth_type is HMAC. | [optional] +**HmacCredential2** | Pointer to [**WebhookHmacCredential**](WebhookHmacCredential.md) | Secondary HMAC credential for rotation, present when auth_type is HMAC. | [optional] + +## Methods + +### NewWebhookCredentials + +`func NewWebhookCredentials(authType WebhookAuthTypeEnum, ) *WebhookCredentials` + +NewWebhookCredentials instantiates a new WebhookCredentials object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWebhookCredentialsWithDefaults + +`func NewWebhookCredentialsWithDefaults() *WebhookCredentials` + +NewWebhookCredentialsWithDefaults instantiates a new WebhookCredentials object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAuthType + +`func (o *WebhookCredentials) GetAuthType() WebhookAuthTypeEnum` + +GetAuthType returns the AuthType field if non-nil, zero value otherwise. + +### GetAuthTypeOk + +`func (o *WebhookCredentials) GetAuthTypeOk() (*WebhookAuthTypeEnum, bool)` + +GetAuthTypeOk returns a tuple with the AuthType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthType + +`func (o *WebhookCredentials) SetAuthType(v WebhookAuthTypeEnum)` + +SetAuthType sets AuthType field to given value. + + +### GetApiKeyCredentials + +`func (o *WebhookCredentials) GetApiKeyCredentials() []WebhookApiKeyCredential` + +GetApiKeyCredentials returns the ApiKeyCredentials field if non-nil, zero value otherwise. + +### GetApiKeyCredentialsOk + +`func (o *WebhookCredentials) GetApiKeyCredentialsOk() (*[]WebhookApiKeyCredential, bool)` + +GetApiKeyCredentialsOk returns a tuple with the ApiKeyCredentials field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKeyCredentials + +`func (o *WebhookCredentials) SetApiKeyCredentials(v []WebhookApiKeyCredential)` + +SetApiKeyCredentials sets ApiKeyCredentials field to given value. + +### HasApiKeyCredentials + +`func (o *WebhookCredentials) HasApiKeyCredentials() bool` + +HasApiKeyCredentials returns a boolean if a field has been set. + +### GetHmacCredential1 + +`func (o *WebhookCredentials) GetHmacCredential1() WebhookHmacCredential` + +GetHmacCredential1 returns the HmacCredential1 field if non-nil, zero value otherwise. + +### GetHmacCredential1Ok + +`func (o *WebhookCredentials) GetHmacCredential1Ok() (*WebhookHmacCredential, bool)` + +GetHmacCredential1Ok returns a tuple with the HmacCredential1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHmacCredential1 + +`func (o *WebhookCredentials) SetHmacCredential1(v WebhookHmacCredential)` + +SetHmacCredential1 sets HmacCredential1 field to given value. + +### HasHmacCredential1 + +`func (o *WebhookCredentials) HasHmacCredential1() bool` + +HasHmacCredential1 returns a boolean if a field has been set. + +### GetHmacCredential2 + +`func (o *WebhookCredentials) GetHmacCredential2() WebhookHmacCredential` + +GetHmacCredential2 returns the HmacCredential2 field if non-nil, zero value otherwise. + +### GetHmacCredential2Ok + +`func (o *WebhookCredentials) GetHmacCredential2Ok() (*WebhookHmacCredential, bool)` + +GetHmacCredential2Ok returns a tuple with the HmacCredential2 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHmacCredential2 + +`func (o *WebhookCredentials) SetHmacCredential2(v WebhookHmacCredential)` + +SetHmacCredential2 sets HmacCredential2 field to given value. + +### HasHmacCredential2 + +`func (o *WebhookCredentials) HasHmacCredential2() bool` + +HasHmacCredential2 returns a boolean if a field has been set. + + +[[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/WebhookHmacCredential.md b/docs/WebhookHmacCredential.md new file mode 100644 index 0000000..ef0b54b --- /dev/null +++ b/docs/WebhookHmacCredential.md @@ -0,0 +1,93 @@ +# WebhookHmacCredential + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The unique identifier for the credential. | +**Secret** | **string** | The HMAC secret value. | +**CreatedAt** | **time.Time** | When the credential was created. | + +## Methods + +### NewWebhookHmacCredential + +`func NewWebhookHmacCredential(id string, secret string, createdAt time.Time, ) *WebhookHmacCredential` + +NewWebhookHmacCredential instantiates a new WebhookHmacCredential object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWebhookHmacCredentialWithDefaults + +`func NewWebhookHmacCredentialWithDefaults() *WebhookHmacCredential` + +NewWebhookHmacCredentialWithDefaults instantiates a new WebhookHmacCredential object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *WebhookHmacCredential) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *WebhookHmacCredential) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *WebhookHmacCredential) SetId(v string)` + +SetId sets Id field to given value. + + +### GetSecret + +`func (o *WebhookHmacCredential) GetSecret() string` + +GetSecret returns the Secret field if non-nil, zero value otherwise. + +### GetSecretOk + +`func (o *WebhookHmacCredential) GetSecretOk() (*string, bool)` + +GetSecretOk returns a tuple with the Secret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecret + +`func (o *WebhookHmacCredential) SetSecret(v string)` + +SetSecret sets Secret field to given value. + + +### GetCreatedAt + +`func (o *WebhookHmacCredential) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *WebhookHmacCredential) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *WebhookHmacCredential) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + + + +[[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/model_access_entity_filters.go b/model_access_entity_filters.go new file mode 100644 index 0000000..407aa7d --- /dev/null +++ b/model_access_entity_filters.go @@ -0,0 +1,535 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" +) + +// checks if the AccessEntityFilters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AccessEntityFilters{} + +// AccessEntityFilters Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. +type AccessEntityFilters struct { + // Filter by entity type. Only RESOURCE, GROUP, and USER are queryable via OpalQuery. + EntityTypes []string `json:"entityTypes,omitempty"` + // Filter by entity item types. + EntityItemTypes []EntityItemTypeEnum `json:"entityItemTypes,omitempty"` + EntityName *EntityNameFilter `json:"entityName,omitempty"` + EntityTag *EntityTagFilter `json:"entityTag,omitempty"` + // Filter by specific entity UUIDs. + EntityIDs []string `json:"entityIDs,omitempty"` + // Filter by app IDs from which returned nodes will be imported from. + ImportedFromApp []string `json:"importedFromApp,omitempty"` + // Filter by role remote IDs. Can only be applied within a hasAccessTo clause. + RoleRemoteIds []string `json:"roleRemoteIds,omitempty"` + // Filter by role display names (e.g. \"Admin\", \"Read\"). Can only be applied within a hasAccessTo clause. + RoleNames []string `json:"roleNames,omitempty"` + // 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`. + AllOf []AccessEntityFilters `json:"allOf,omitempty"` + // A list of nested filters where at least one must match (logical OR). Each item has the same shape as this object. + AnyOf []AccessEntityFilters `json:"anyOf,omitempty"` + // 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. + Not map[string]interface{} `json:"not,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AccessEntityFilters AccessEntityFilters + +// NewAccessEntityFilters instantiates a new AccessEntityFilters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAccessEntityFilters() *AccessEntityFilters { + this := AccessEntityFilters{} + return &this +} + +// NewAccessEntityFiltersWithDefaults instantiates a new AccessEntityFilters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAccessEntityFiltersWithDefaults() *AccessEntityFilters { + this := AccessEntityFilters{} + return &this +} + +// GetEntityTypes returns the EntityTypes field value if set, zero value otherwise. +func (o *AccessEntityFilters) GetEntityTypes() []string { + if o == nil || IsNil(o.EntityTypes) { + var ret []string + return ret + } + return o.EntityTypes +} + +// GetEntityTypesOk returns a tuple with the EntityTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessEntityFilters) GetEntityTypesOk() ([]string, bool) { + if o == nil || IsNil(o.EntityTypes) { + return nil, false + } + return o.EntityTypes, true +} + +// HasEntityTypes returns a boolean if a field has been set. +func (o *AccessEntityFilters) HasEntityTypes() bool { + if o != nil && !IsNil(o.EntityTypes) { + return true + } + + return false +} + +// SetEntityTypes gets a reference to the given []string and assigns it to the EntityTypes field. +func (o *AccessEntityFilters) SetEntityTypes(v []string) { + o.EntityTypes = v +} + +// GetEntityItemTypes returns the EntityItemTypes field value if set, zero value otherwise. +func (o *AccessEntityFilters) GetEntityItemTypes() []EntityItemTypeEnum { + if o == nil || IsNil(o.EntityItemTypes) { + var ret []EntityItemTypeEnum + return ret + } + return o.EntityItemTypes +} + +// GetEntityItemTypesOk returns a tuple with the EntityItemTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessEntityFilters) GetEntityItemTypesOk() ([]EntityItemTypeEnum, bool) { + if o == nil || IsNil(o.EntityItemTypes) { + return nil, false + } + return o.EntityItemTypes, true +} + +// HasEntityItemTypes returns a boolean if a field has been set. +func (o *AccessEntityFilters) HasEntityItemTypes() bool { + if o != nil && !IsNil(o.EntityItemTypes) { + return true + } + + return false +} + +// SetEntityItemTypes gets a reference to the given []EntityItemTypeEnum and assigns it to the EntityItemTypes field. +func (o *AccessEntityFilters) SetEntityItemTypes(v []EntityItemTypeEnum) { + o.EntityItemTypes = v +} + +// GetEntityName returns the EntityName field value if set, zero value otherwise. +func (o *AccessEntityFilters) GetEntityName() EntityNameFilter { + if o == nil || IsNil(o.EntityName) { + var ret EntityNameFilter + return ret + } + return *o.EntityName +} + +// GetEntityNameOk returns a tuple with the EntityName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessEntityFilters) GetEntityNameOk() (*EntityNameFilter, bool) { + if o == nil || IsNil(o.EntityName) { + return nil, false + } + return o.EntityName, true +} + +// HasEntityName returns a boolean if a field has been set. +func (o *AccessEntityFilters) HasEntityName() bool { + if o != nil && !IsNil(o.EntityName) { + return true + } + + return false +} + +// SetEntityName gets a reference to the given EntityNameFilter and assigns it to the EntityName field. +func (o *AccessEntityFilters) SetEntityName(v EntityNameFilter) { + o.EntityName = &v +} + +// GetEntityTag returns the EntityTag field value if set, zero value otherwise. +func (o *AccessEntityFilters) GetEntityTag() EntityTagFilter { + if o == nil || IsNil(o.EntityTag) { + var ret EntityTagFilter + return ret + } + return *o.EntityTag +} + +// GetEntityTagOk returns a tuple with the EntityTag field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessEntityFilters) GetEntityTagOk() (*EntityTagFilter, bool) { + if o == nil || IsNil(o.EntityTag) { + return nil, false + } + return o.EntityTag, true +} + +// HasEntityTag returns a boolean if a field has been set. +func (o *AccessEntityFilters) HasEntityTag() bool { + if o != nil && !IsNil(o.EntityTag) { + return true + } + + return false +} + +// SetEntityTag gets a reference to the given EntityTagFilter and assigns it to the EntityTag field. +func (o *AccessEntityFilters) SetEntityTag(v EntityTagFilter) { + o.EntityTag = &v +} + +// GetEntityIDs returns the EntityIDs field value if set, zero value otherwise. +func (o *AccessEntityFilters) GetEntityIDs() []string { + if o == nil || IsNil(o.EntityIDs) { + var ret []string + return ret + } + return o.EntityIDs +} + +// GetEntityIDsOk returns a tuple with the EntityIDs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessEntityFilters) GetEntityIDsOk() ([]string, bool) { + if o == nil || IsNil(o.EntityIDs) { + return nil, false + } + return o.EntityIDs, true +} + +// HasEntityIDs returns a boolean if a field has been set. +func (o *AccessEntityFilters) HasEntityIDs() bool { + if o != nil && !IsNil(o.EntityIDs) { + return true + } + + return false +} + +// SetEntityIDs gets a reference to the given []string and assigns it to the EntityIDs field. +func (o *AccessEntityFilters) SetEntityIDs(v []string) { + o.EntityIDs = v +} + +// GetImportedFromApp returns the ImportedFromApp field value if set, zero value otherwise. +func (o *AccessEntityFilters) GetImportedFromApp() []string { + if o == nil || IsNil(o.ImportedFromApp) { + var ret []string + return ret + } + return o.ImportedFromApp +} + +// GetImportedFromAppOk returns a tuple with the ImportedFromApp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessEntityFilters) GetImportedFromAppOk() ([]string, bool) { + if o == nil || IsNil(o.ImportedFromApp) { + return nil, false + } + return o.ImportedFromApp, true +} + +// HasImportedFromApp returns a boolean if a field has been set. +func (o *AccessEntityFilters) HasImportedFromApp() bool { + if o != nil && !IsNil(o.ImportedFromApp) { + return true + } + + return false +} + +// SetImportedFromApp gets a reference to the given []string and assigns it to the ImportedFromApp field. +func (o *AccessEntityFilters) SetImportedFromApp(v []string) { + o.ImportedFromApp = v +} + +// GetRoleRemoteIds returns the RoleRemoteIds field value if set, zero value otherwise. +func (o *AccessEntityFilters) GetRoleRemoteIds() []string { + if o == nil || IsNil(o.RoleRemoteIds) { + var ret []string + return ret + } + return o.RoleRemoteIds +} + +// GetRoleRemoteIdsOk returns a tuple with the RoleRemoteIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessEntityFilters) GetRoleRemoteIdsOk() ([]string, bool) { + if o == nil || IsNil(o.RoleRemoteIds) { + return nil, false + } + return o.RoleRemoteIds, true +} + +// HasRoleRemoteIds returns a boolean if a field has been set. +func (o *AccessEntityFilters) HasRoleRemoteIds() bool { + if o != nil && !IsNil(o.RoleRemoteIds) { + return true + } + + return false +} + +// SetRoleRemoteIds gets a reference to the given []string and assigns it to the RoleRemoteIds field. +func (o *AccessEntityFilters) SetRoleRemoteIds(v []string) { + o.RoleRemoteIds = v +} + +// GetRoleNames returns the RoleNames field value if set, zero value otherwise. +func (o *AccessEntityFilters) GetRoleNames() []string { + if o == nil || IsNil(o.RoleNames) { + var ret []string + return ret + } + return o.RoleNames +} + +// GetRoleNamesOk returns a tuple with the RoleNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessEntityFilters) GetRoleNamesOk() ([]string, bool) { + if o == nil || IsNil(o.RoleNames) { + return nil, false + } + return o.RoleNames, true +} + +// HasRoleNames returns a boolean if a field has been set. +func (o *AccessEntityFilters) HasRoleNames() bool { + if o != nil && !IsNil(o.RoleNames) { + return true + } + + return false +} + +// SetRoleNames gets a reference to the given []string and assigns it to the RoleNames field. +func (o *AccessEntityFilters) SetRoleNames(v []string) { + o.RoleNames = v +} + +// GetAllOf returns the AllOf field value if set, zero value otherwise. +func (o *AccessEntityFilters) GetAllOf() []AccessEntityFilters { + if o == nil || IsNil(o.AllOf) { + var ret []AccessEntityFilters + return ret + } + return o.AllOf +} + +// GetAllOfOk returns a tuple with the AllOf field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessEntityFilters) GetAllOfOk() ([]AccessEntityFilters, bool) { + if o == nil || IsNil(o.AllOf) { + return nil, false + } + return o.AllOf, true +} + +// HasAllOf returns a boolean if a field has been set. +func (o *AccessEntityFilters) HasAllOf() bool { + if o != nil && !IsNil(o.AllOf) { + return true + } + + return false +} + +// SetAllOf gets a reference to the given []AccessEntityFilters and assigns it to the AllOf field. +func (o *AccessEntityFilters) SetAllOf(v []AccessEntityFilters) { + o.AllOf = v +} + +// GetAnyOf returns the AnyOf field value if set, zero value otherwise. +func (o *AccessEntityFilters) GetAnyOf() []AccessEntityFilters { + if o == nil || IsNil(o.AnyOf) { + var ret []AccessEntityFilters + return ret + } + return o.AnyOf +} + +// GetAnyOfOk returns a tuple with the AnyOf field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessEntityFilters) GetAnyOfOk() ([]AccessEntityFilters, bool) { + if o == nil || IsNil(o.AnyOf) { + return nil, false + } + return o.AnyOf, true +} + +// HasAnyOf returns a boolean if a field has been set. +func (o *AccessEntityFilters) HasAnyOf() bool { + if o != nil && !IsNil(o.AnyOf) { + return true + } + + return false +} + +// SetAnyOf gets a reference to the given []AccessEntityFilters and assigns it to the AnyOf field. +func (o *AccessEntityFilters) SetAnyOf(v []AccessEntityFilters) { + o.AnyOf = v +} + +// GetNot returns the Not field value if set, zero value otherwise. +func (o *AccessEntityFilters) GetNot() map[string]interface{} { + if o == nil || IsNil(o.Not) { + var ret map[string]interface{} + return ret + } + return o.Not +} + +// GetNotOk returns a tuple with the Not field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessEntityFilters) GetNotOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Not) { + return map[string]interface{}{}, false + } + return o.Not, true +} + +// HasNot returns a boolean if a field has been set. +func (o *AccessEntityFilters) HasNot() bool { + if o != nil && !IsNil(o.Not) { + return true + } + + return false +} + +// SetNot gets a reference to the given map[string]interface{} and assigns it to the Not field. +func (o *AccessEntityFilters) SetNot(v map[string]interface{}) { + o.Not = v +} + +func (o AccessEntityFilters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccessEntityFilters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EntityTypes) { + toSerialize["entityTypes"] = o.EntityTypes + } + if !IsNil(o.EntityItemTypes) { + toSerialize["entityItemTypes"] = o.EntityItemTypes + } + if !IsNil(o.EntityName) { + toSerialize["entityName"] = o.EntityName + } + if !IsNil(o.EntityTag) { + toSerialize["entityTag"] = o.EntityTag + } + if !IsNil(o.EntityIDs) { + toSerialize["entityIDs"] = o.EntityIDs + } + if !IsNil(o.ImportedFromApp) { + toSerialize["importedFromApp"] = o.ImportedFromApp + } + if !IsNil(o.RoleRemoteIds) { + toSerialize["roleRemoteIds"] = o.RoleRemoteIds + } + if !IsNil(o.RoleNames) { + toSerialize["roleNames"] = o.RoleNames + } + if !IsNil(o.AllOf) { + toSerialize["allOf"] = o.AllOf + } + if !IsNil(o.AnyOf) { + toSerialize["anyOf"] = o.AnyOf + } + if !IsNil(o.Not) { + toSerialize["not"] = o.Not + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AccessEntityFilters) UnmarshalJSON(data []byte) (err error) { + varAccessEntityFilters := _AccessEntityFilters{} + + err = json.Unmarshal(data, &varAccessEntityFilters) + + if err != nil { + return err + } + + *o = AccessEntityFilters(varAccessEntityFilters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "entityTypes") + delete(additionalProperties, "entityItemTypes") + delete(additionalProperties, "entityName") + delete(additionalProperties, "entityTag") + delete(additionalProperties, "entityIDs") + delete(additionalProperties, "importedFromApp") + delete(additionalProperties, "roleRemoteIds") + delete(additionalProperties, "roleNames") + delete(additionalProperties, "allOf") + delete(additionalProperties, "anyOf") + delete(additionalProperties, "not") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAccessEntityFilters struct { + value *AccessEntityFilters + isSet bool +} + +func (v NullableAccessEntityFilters) Get() *AccessEntityFilters { + return v.value +} + +func (v *NullableAccessEntityFilters) Set(val *AccessEntityFilters) { + v.value = val + v.isSet = true +} + +func (v NullableAccessEntityFilters) IsSet() bool { + return v.isSet +} + +func (v *NullableAccessEntityFilters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccessEntityFilters(val *AccessEntityFilters) *NullableAccessEntityFilters { + return &NullableAccessEntityFilters{value: val, isSet: true} +} + +func (v NullableAccessEntityFilters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccessEntityFilters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_access_relationship_filters.go b/model_access_relationship_filters.go new file mode 100644 index 0000000..92d5764 --- /dev/null +++ b/model_access_relationship_filters.go @@ -0,0 +1,195 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" +) + +// checks if the AccessRelationshipFilters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AccessRelationshipFilters{} + +// AccessRelationshipFilters 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. +type AccessRelationshipFilters struct { + // Inbound-edge filter. The returned node must be accessible by at least one entity matching this filter. + IsAccessibleBy *AccessEntityFilters `json:"isAccessibleBy,omitempty"` + // Outbound-edge filter. The returned node must have access to at least one entity matching this filter. + HasAccessTo *AccessEntityFilters `json:"hasAccessTo,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AccessRelationshipFilters AccessRelationshipFilters + +// NewAccessRelationshipFilters instantiates a new AccessRelationshipFilters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAccessRelationshipFilters() *AccessRelationshipFilters { + this := AccessRelationshipFilters{} + return &this +} + +// NewAccessRelationshipFiltersWithDefaults instantiates a new AccessRelationshipFilters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAccessRelationshipFiltersWithDefaults() *AccessRelationshipFilters { + this := AccessRelationshipFilters{} + return &this +} + +// GetIsAccessibleBy returns the IsAccessibleBy field value if set, zero value otherwise. +func (o *AccessRelationshipFilters) GetIsAccessibleBy() AccessEntityFilters { + if o == nil || IsNil(o.IsAccessibleBy) { + var ret AccessEntityFilters + return ret + } + return *o.IsAccessibleBy +} + +// GetIsAccessibleByOk returns a tuple with the IsAccessibleBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessRelationshipFilters) GetIsAccessibleByOk() (*AccessEntityFilters, bool) { + if o == nil || IsNil(o.IsAccessibleBy) { + return nil, false + } + return o.IsAccessibleBy, true +} + +// HasIsAccessibleBy returns a boolean if a field has been set. +func (o *AccessRelationshipFilters) HasIsAccessibleBy() bool { + if o != nil && !IsNil(o.IsAccessibleBy) { + return true + } + + return false +} + +// SetIsAccessibleBy gets a reference to the given AccessEntityFilters and assigns it to the IsAccessibleBy field. +func (o *AccessRelationshipFilters) SetIsAccessibleBy(v AccessEntityFilters) { + o.IsAccessibleBy = &v +} + +// GetHasAccessTo returns the HasAccessTo field value if set, zero value otherwise. +func (o *AccessRelationshipFilters) GetHasAccessTo() AccessEntityFilters { + if o == nil || IsNil(o.HasAccessTo) { + var ret AccessEntityFilters + return ret + } + return *o.HasAccessTo +} + +// GetHasAccessToOk returns a tuple with the HasAccessTo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessRelationshipFilters) GetHasAccessToOk() (*AccessEntityFilters, bool) { + if o == nil || IsNil(o.HasAccessTo) { + return nil, false + } + return o.HasAccessTo, true +} + +// HasHasAccessTo returns a boolean if a field has been set. +func (o *AccessRelationshipFilters) HasHasAccessTo() bool { + if o != nil && !IsNil(o.HasAccessTo) { + return true + } + + return false +} + +// SetHasAccessTo gets a reference to the given AccessEntityFilters and assigns it to the HasAccessTo field. +func (o *AccessRelationshipFilters) SetHasAccessTo(v AccessEntityFilters) { + o.HasAccessTo = &v +} + +func (o AccessRelationshipFilters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccessRelationshipFilters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IsAccessibleBy) { + toSerialize["isAccessibleBy"] = o.IsAccessibleBy + } + if !IsNil(o.HasAccessTo) { + toSerialize["hasAccessTo"] = o.HasAccessTo + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AccessRelationshipFilters) UnmarshalJSON(data []byte) (err error) { + varAccessRelationshipFilters := _AccessRelationshipFilters{} + + err = json.Unmarshal(data, &varAccessRelationshipFilters) + + if err != nil { + return err + } + + *o = AccessRelationshipFilters(varAccessRelationshipFilters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "isAccessibleBy") + delete(additionalProperties, "hasAccessTo") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAccessRelationshipFilters struct { + value *AccessRelationshipFilters + isSet bool +} + +func (v NullableAccessRelationshipFilters) Get() *AccessRelationshipFilters { + return v.value +} + +func (v *NullableAccessRelationshipFilters) Set(val *AccessRelationshipFilters) { + v.value = val + v.isSet = true +} + +func (v NullableAccessRelationshipFilters) IsSet() bool { + return v.isSet +} + +func (v *NullableAccessRelationshipFilters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccessRelationshipFilters(val *AccessRelationshipFilters) *NullableAccessRelationshipFilters { + return &NullableAccessRelationshipFilters{value: val, isSet: true} +} + +func (v NullableAccessRelationshipFilters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccessRelationshipFilters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_access_rule.go b/model_access_rule.go index f768cfa..ea06232 100644 --- a/model_access_rule.go +++ b/model_access_rule.go @@ -19,7 +19,7 @@ import ( // checks if the AccessRule type satisfies the MappedNullable interface at compile time var _ MappedNullable = &AccessRule{} -// AccessRule # Access Rule Object ### Description The `AccessRule` object is used to represent an access rule configuration. ### Usage Example Get access rule configurations from the `GET Access Rule Configs` endpoint. +// AccessRule # Access Rule Object ### Description The `AccessRule` object is used to represent an access rule configuration. ### Usage Example List access rules from the `GET /access-rules` endpoint, or retrieve a single access rule from the `GET /access-rules/{access_rule_id}` endpoint. type AccessRule struct { // The ID (group ID) of the access rule. AccessRuleId string `json:"access_rule_id"` diff --git a/model_api_access_level_enum.go b/model_api_access_level_enum.go new file mode 100644 index 0000000..6e23653 --- /dev/null +++ b/model_api_access_level_enum.go @@ -0,0 +1,112 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// ApiAccessLevelEnum The access level of an API token. +type ApiAccessLevelEnum string + +// List of ApiAccessLevelEnum +const ( + APIACCESSLEVELENUM_READ_ONLY ApiAccessLevelEnum = "READ_ONLY" + APIACCESSLEVELENUM_FULL_ACCESS ApiAccessLevelEnum = "FULL_ACCESS" +) + +// All allowed values of ApiAccessLevelEnum enum +var AllowedApiAccessLevelEnumEnumValues = []ApiAccessLevelEnum{ + "READ_ONLY", + "FULL_ACCESS", +} + +func (v *ApiAccessLevelEnum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ApiAccessLevelEnum(value) + for _, existing := range AllowedApiAccessLevelEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ApiAccessLevelEnum", value) +} + +// NewApiAccessLevelEnumFromValue returns a pointer to a valid ApiAccessLevelEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewApiAccessLevelEnumFromValue(v string) (*ApiAccessLevelEnum, error) { + ev := ApiAccessLevelEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ApiAccessLevelEnum: valid values are %v", v, AllowedApiAccessLevelEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ApiAccessLevelEnum) IsValid() bool { + for _, existing := range AllowedApiAccessLevelEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ApiAccessLevelEnum value +func (v ApiAccessLevelEnum) Ptr() *ApiAccessLevelEnum { + return &v +} + +type NullableApiAccessLevelEnum struct { + value *ApiAccessLevelEnum + isSet bool +} + +func (v NullableApiAccessLevelEnum) Get() *ApiAccessLevelEnum { + return v.value +} + +func (v *NullableApiAccessLevelEnum) Set(val *ApiAccessLevelEnum) { + v.value = val + v.isSet = true +} + +func (v NullableApiAccessLevelEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableApiAccessLevelEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiAccessLevelEnum(val *ApiAccessLevelEnum) *NullableApiAccessLevelEnum { + return &NullableApiAccessLevelEnum{value: val, isSet: true} +} + +func (v NullableApiAccessLevelEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiAccessLevelEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/model_app_type_enum.go b/model_app_type_enum.go index 205fe9c..17d40b6 100644 --- a/model_app_type_enum.go +++ b/model_app_type_enum.go @@ -29,6 +29,7 @@ const ( APPTYPEENUM_COUPA AppTypeEnum = "COUPA" APPTYPEENUM_CURSOR AppTypeEnum = "CURSOR" APPTYPEENUM_CUSTOM AppTypeEnum = "CUSTOM" + APPTYPEENUM_CUSTOM_CONNECTOR AppTypeEnum = "CUSTOM_CONNECTOR" APPTYPEENUM_DATABRICKS AppTypeEnum = "DATABRICKS" APPTYPEENUM_DATASTAX_ASTRA AppTypeEnum = "DATASTAX_ASTRA" APPTYPEENUM_DUO AppTypeEnum = "DUO" @@ -44,6 +45,8 @@ const ( APPTYPEENUM_MONGO AppTypeEnum = "MONGO" APPTYPEENUM_MONGO_ATLAS AppTypeEnum = "MONGO_ATLAS" APPTYPEENUM_MYSQL AppTypeEnum = "MYSQL" + APPTYPEENUM_NETSUITE AppTypeEnum = "NETSUITE" + APPTYPEENUM_DATADOG AppTypeEnum = "DATADOG" APPTYPEENUM_OKTA_DIRECTORY AppTypeEnum = "OKTA_DIRECTORY" APPTYPEENUM_OPENAI_PLATFORM AppTypeEnum = "OPENAI_PLATFORM" APPTYPEENUM_OPAL AppTypeEnum = "OPAL" @@ -52,6 +55,7 @@ const ( APPTYPEENUM_SNOWFLAKE AppTypeEnum = "SNOWFLAKE" APPTYPEENUM_TAILSCALE AppTypeEnum = "TAILSCALE" APPTYPEENUM_TELEPORT AppTypeEnum = "TELEPORT" + APPTYPEENUM_TWINGATE AppTypeEnum = "TWINGATE" APPTYPEENUM_WORKDAY AppTypeEnum = "WORKDAY" ) @@ -65,6 +69,7 @@ var AllowedAppTypeEnumEnumValues = []AppTypeEnum{ "COUPA", "CURSOR", "CUSTOM", + "CUSTOM_CONNECTOR", "DATABRICKS", "DATASTAX_ASTRA", "DUO", @@ -80,6 +85,8 @@ var AllowedAppTypeEnumEnumValues = []AppTypeEnum{ "MONGO", "MONGO_ATLAS", "MYSQL", + "NETSUITE", + "DATADOG", "OKTA_DIRECTORY", "OPENAI_PLATFORM", "OPAL", @@ -88,6 +95,7 @@ var AllowedAppTypeEnumEnumValues = []AppTypeEnum{ "SNOWFLAKE", "TAILSCALE", "TELEPORT", + "TWINGATE", "WORKDAY", } diff --git a/model_create_event_stream_info.go b/model_create_event_stream_info.go new file mode 100644 index 0000000..ac6e802 --- /dev/null +++ b/model_create_event_stream_info.go @@ -0,0 +1,274 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateEventStreamInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateEventStreamInfo{} + +// CreateEventStreamInfo Information needed to create an event stream. +type CreateEventStreamInfo struct { + // The name for the event stream. + Name string `json:"name"` + ConnectionType EventStreamConnectionTypeEnum `json:"connection_type"` + // The webhook URL. Required when connection_type is WEBHOOK. + WebhookUrl *string `json:"webhook_url,omitempty"` + Credentials *WebhookCredentials `json:"credentials,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateEventStreamInfo CreateEventStreamInfo + +// NewCreateEventStreamInfo instantiates a new CreateEventStreamInfo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateEventStreamInfo(name string, connectionType EventStreamConnectionTypeEnum) *CreateEventStreamInfo { + this := CreateEventStreamInfo{} + this.Name = name + this.ConnectionType = connectionType + return &this +} + +// NewCreateEventStreamInfoWithDefaults instantiates a new CreateEventStreamInfo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateEventStreamInfoWithDefaults() *CreateEventStreamInfo { + this := CreateEventStreamInfo{} + return &this +} + +// GetName returns the Name field value +func (o *CreateEventStreamInfo) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateEventStreamInfo) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateEventStreamInfo) SetName(v string) { + o.Name = v +} + +// GetConnectionType returns the ConnectionType field value +func (o *CreateEventStreamInfo) GetConnectionType() EventStreamConnectionTypeEnum { + if o == nil { + var ret EventStreamConnectionTypeEnum + return ret + } + + return o.ConnectionType +} + +// GetConnectionTypeOk returns a tuple with the ConnectionType field value +// and a boolean to check if the value has been set. +func (o *CreateEventStreamInfo) GetConnectionTypeOk() (*EventStreamConnectionTypeEnum, bool) { + if o == nil { + return nil, false + } + return &o.ConnectionType, true +} + +// SetConnectionType sets field value +func (o *CreateEventStreamInfo) SetConnectionType(v EventStreamConnectionTypeEnum) { + o.ConnectionType = v +} + +// GetWebhookUrl returns the WebhookUrl field value if set, zero value otherwise. +func (o *CreateEventStreamInfo) GetWebhookUrl() string { + if o == nil || IsNil(o.WebhookUrl) { + var ret string + return ret + } + return *o.WebhookUrl +} + +// GetWebhookUrlOk returns a tuple with the WebhookUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateEventStreamInfo) GetWebhookUrlOk() (*string, bool) { + if o == nil || IsNil(o.WebhookUrl) { + return nil, false + } + return o.WebhookUrl, true +} + +// HasWebhookUrl returns a boolean if a field has been set. +func (o *CreateEventStreamInfo) HasWebhookUrl() bool { + if o != nil && !IsNil(o.WebhookUrl) { + return true + } + + return false +} + +// SetWebhookUrl gets a reference to the given string and assigns it to the WebhookUrl field. +func (o *CreateEventStreamInfo) SetWebhookUrl(v string) { + o.WebhookUrl = &v +} + +// GetCredentials returns the Credentials field value if set, zero value otherwise. +func (o *CreateEventStreamInfo) GetCredentials() WebhookCredentials { + if o == nil || IsNil(o.Credentials) { + var ret WebhookCredentials + return ret + } + return *o.Credentials +} + +// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateEventStreamInfo) GetCredentialsOk() (*WebhookCredentials, bool) { + if o == nil || IsNil(o.Credentials) { + return nil, false + } + return o.Credentials, true +} + +// HasCredentials returns a boolean if a field has been set. +func (o *CreateEventStreamInfo) HasCredentials() bool { + if o != nil && !IsNil(o.Credentials) { + return true + } + + return false +} + +// SetCredentials gets a reference to the given WebhookCredentials and assigns it to the Credentials field. +func (o *CreateEventStreamInfo) SetCredentials(v WebhookCredentials) { + o.Credentials = &v +} + +func (o CreateEventStreamInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateEventStreamInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["connection_type"] = o.ConnectionType + if !IsNil(o.WebhookUrl) { + toSerialize["webhook_url"] = o.WebhookUrl + } + if !IsNil(o.Credentials) { + toSerialize["credentials"] = o.Credentials + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateEventStreamInfo) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "connection_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateEventStreamInfo := _CreateEventStreamInfo{} + + err = json.Unmarshal(data, &varCreateEventStreamInfo) + + if err != nil { + return err + } + + *o = CreateEventStreamInfo(varCreateEventStreamInfo) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "connection_type") + delete(additionalProperties, "webhook_url") + delete(additionalProperties, "credentials") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateEventStreamInfo struct { + value *CreateEventStreamInfo + isSet bool +} + +func (v NullableCreateEventStreamInfo) Get() *CreateEventStreamInfo { + return v.value +} + +func (v *NullableCreateEventStreamInfo) Set(val *CreateEventStreamInfo) { + v.value = val + v.isSet = true +} + +func (v NullableCreateEventStreamInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateEventStreamInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateEventStreamInfo(val *CreateEventStreamInfo) *NullableCreateEventStreamInfo { + return &NullableCreateEventStreamInfo{value: val, isSet: true} +} + +func (v NullableCreateEventStreamInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateEventStreamInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_resource_custom_access_level_info.go b/model_create_resource_custom_access_level_info.go new file mode 100644 index 0000000..0852d1d --- /dev/null +++ b/model_create_resource_custom_access_level_info.go @@ -0,0 +1,283 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateResourceCustomAccessLevelInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateResourceCustomAccessLevelInfo{} + +// CreateResourceCustomAccessLevelInfo Info for creating a custom access level. +type CreateResourceCustomAccessLevelInfo struct { + AccessLevel ResourceAccessLevel `json:"access_level"` + // The policy document. + Policy *string `json:"policy,omitempty"` + // Whether the role is requestable. Defaults to false. + RequestableByDefault *bool `json:"requestable_by_default,omitempty"` + // The sensitivity index. Null to leave unranked. + StackableSensitivityIndex *int32 `json:"stackable_sensitivity_index,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateResourceCustomAccessLevelInfo CreateResourceCustomAccessLevelInfo + +// NewCreateResourceCustomAccessLevelInfo instantiates a new CreateResourceCustomAccessLevelInfo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateResourceCustomAccessLevelInfo(accessLevel ResourceAccessLevel) *CreateResourceCustomAccessLevelInfo { + this := CreateResourceCustomAccessLevelInfo{} + this.AccessLevel = accessLevel + return &this +} + +// NewCreateResourceCustomAccessLevelInfoWithDefaults instantiates a new CreateResourceCustomAccessLevelInfo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateResourceCustomAccessLevelInfoWithDefaults() *CreateResourceCustomAccessLevelInfo { + this := CreateResourceCustomAccessLevelInfo{} + return &this +} + +// GetAccessLevel returns the AccessLevel field value +func (o *CreateResourceCustomAccessLevelInfo) GetAccessLevel() ResourceAccessLevel { + if o == nil { + var ret ResourceAccessLevel + return ret + } + + return o.AccessLevel +} + +// GetAccessLevelOk returns a tuple with the AccessLevel field value +// and a boolean to check if the value has been set. +func (o *CreateResourceCustomAccessLevelInfo) GetAccessLevelOk() (*ResourceAccessLevel, bool) { + if o == nil { + return nil, false + } + return &o.AccessLevel, true +} + +// SetAccessLevel sets field value +func (o *CreateResourceCustomAccessLevelInfo) SetAccessLevel(v ResourceAccessLevel) { + o.AccessLevel = v +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *CreateResourceCustomAccessLevelInfo) GetPolicy() string { + if o == nil || IsNil(o.Policy) { + var ret string + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateResourceCustomAccessLevelInfo) GetPolicyOk() (*string, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *CreateResourceCustomAccessLevelInfo) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given string and assigns it to the Policy field. +func (o *CreateResourceCustomAccessLevelInfo) SetPolicy(v string) { + o.Policy = &v +} + +// GetRequestableByDefault returns the RequestableByDefault field value if set, zero value otherwise. +func (o *CreateResourceCustomAccessLevelInfo) GetRequestableByDefault() bool { + if o == nil || IsNil(o.RequestableByDefault) { + var ret bool + return ret + } + return *o.RequestableByDefault +} + +// GetRequestableByDefaultOk returns a tuple with the RequestableByDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateResourceCustomAccessLevelInfo) GetRequestableByDefaultOk() (*bool, bool) { + if o == nil || IsNil(o.RequestableByDefault) { + return nil, false + } + return o.RequestableByDefault, true +} + +// HasRequestableByDefault returns a boolean if a field has been set. +func (o *CreateResourceCustomAccessLevelInfo) HasRequestableByDefault() bool { + if o != nil && !IsNil(o.RequestableByDefault) { + return true + } + + return false +} + +// SetRequestableByDefault gets a reference to the given bool and assigns it to the RequestableByDefault field. +func (o *CreateResourceCustomAccessLevelInfo) SetRequestableByDefault(v bool) { + o.RequestableByDefault = &v +} + +// GetStackableSensitivityIndex returns the StackableSensitivityIndex field value if set, zero value otherwise. +func (o *CreateResourceCustomAccessLevelInfo) GetStackableSensitivityIndex() int32 { + if o == nil || IsNil(o.StackableSensitivityIndex) { + var ret int32 + return ret + } + return *o.StackableSensitivityIndex +} + +// GetStackableSensitivityIndexOk returns a tuple with the StackableSensitivityIndex field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateResourceCustomAccessLevelInfo) GetStackableSensitivityIndexOk() (*int32, bool) { + if o == nil || IsNil(o.StackableSensitivityIndex) { + return nil, false + } + return o.StackableSensitivityIndex, true +} + +// HasStackableSensitivityIndex returns a boolean if a field has been set. +func (o *CreateResourceCustomAccessLevelInfo) HasStackableSensitivityIndex() bool { + if o != nil && !IsNil(o.StackableSensitivityIndex) { + return true + } + + return false +} + +// SetStackableSensitivityIndex gets a reference to the given int32 and assigns it to the StackableSensitivityIndex field. +func (o *CreateResourceCustomAccessLevelInfo) SetStackableSensitivityIndex(v int32) { + o.StackableSensitivityIndex = &v +} + +func (o CreateResourceCustomAccessLevelInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateResourceCustomAccessLevelInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["access_level"] = o.AccessLevel + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if !IsNil(o.RequestableByDefault) { + toSerialize["requestable_by_default"] = o.RequestableByDefault + } + if !IsNil(o.StackableSensitivityIndex) { + toSerialize["stackable_sensitivity_index"] = o.StackableSensitivityIndex + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateResourceCustomAccessLevelInfo) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access_level", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateResourceCustomAccessLevelInfo := _CreateResourceCustomAccessLevelInfo{} + + err = json.Unmarshal(data, &varCreateResourceCustomAccessLevelInfo) + + if err != nil { + return err + } + + *o = CreateResourceCustomAccessLevelInfo(varCreateResourceCustomAccessLevelInfo) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "access_level") + delete(additionalProperties, "policy") + delete(additionalProperties, "requestable_by_default") + delete(additionalProperties, "stackable_sensitivity_index") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateResourceCustomAccessLevelInfo struct { + value *CreateResourceCustomAccessLevelInfo + isSet bool +} + +func (v NullableCreateResourceCustomAccessLevelInfo) Get() *CreateResourceCustomAccessLevelInfo { + return v.value +} + +func (v *NullableCreateResourceCustomAccessLevelInfo) Set(val *CreateResourceCustomAccessLevelInfo) { + v.value = val + v.isSet = true +} + +func (v NullableCreateResourceCustomAccessLevelInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateResourceCustomAccessLevelInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateResourceCustomAccessLevelInfo(val *CreateResourceCustomAccessLevelInfo) *NullableCreateResourceCustomAccessLevelInfo { + return &NullableCreateResourceCustomAccessLevelInfo{value: val, isSet: true} +} + +func (v NullableCreateResourceCustomAccessLevelInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateResourceCustomAccessLevelInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_entity_item_type_enum.go b/model_entity_item_type_enum.go new file mode 100644 index 0000000..e5db41c --- /dev/null +++ b/model_entity_item_type_enum.go @@ -0,0 +1,276 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// EntityItemTypeEnum Granular subtype of an entity. +type EntityItemTypeEnum string + +// List of EntityItemTypeEnum +const ( + ENTITYITEMTYPEENUM_USER EntityItemTypeEnum = "USER" + ENTITYITEMTYPEENUM_SERVICE_USER EntityItemTypeEnum = "SERVICE_USER" + ENTITYITEMTYPEENUM_ACTIVE_DIRECTORY_GROUP EntityItemTypeEnum = "ACTIVE_DIRECTORY_GROUP" + ENTITYITEMTYPEENUM_AWS_SSO_GROUP EntityItemTypeEnum = "AWS_SSO_GROUP" + ENTITYITEMTYPEENUM_DUO_GROUP EntityItemTypeEnum = "DUO_GROUP" + ENTITYITEMTYPEENUM_GIT_HUB_TEAM EntityItemTypeEnum = "GIT_HUB_TEAM" + ENTITYITEMTYPEENUM_GIT_LAB_GROUP EntityItemTypeEnum = "GIT_LAB_GROUP" + ENTITYITEMTYPEENUM_GOOGLE_GROUPS_GROUP EntityItemTypeEnum = "GOOGLE_GROUPS_GROUP" + ENTITYITEMTYPEENUM_GOOGLE_GROUPS_GKE_GROUP EntityItemTypeEnum = "GOOGLE_GROUPS_GKE_GROUP" + ENTITYITEMTYPEENUM_LDAP_GROUP EntityItemTypeEnum = "LDAP_GROUP" + ENTITYITEMTYPEENUM_OKTA_GROUP EntityItemTypeEnum = "OKTA_GROUP" + ENTITYITEMTYPEENUM_OKTA_GROUP_RULE EntityItemTypeEnum = "OKTA_GROUP_RULE" + ENTITYITEMTYPEENUM_TAILSCALE_GROUP EntityItemTypeEnum = "TAILSCALE_GROUP" + ENTITYITEMTYPEENUM_TWINGATE_GROUP EntityItemTypeEnum = "TWINGATE_GROUP" + ENTITYITEMTYPEENUM_TWINGATE_GROUP_SYNCED EntityItemTypeEnum = "TWINGATE_GROUP_SYNCED" + ENTITYITEMTYPEENUM_OPAL_GROUP EntityItemTypeEnum = "OPAL_GROUP" + ENTITYITEMTYPEENUM_OPAL_ACCESS_RULE EntityItemTypeEnum = "OPAL_ACCESS_RULE" + ENTITYITEMTYPEENUM_AZURE_AD_SECURITY_GROUP EntityItemTypeEnum = "AZURE_AD_SECURITY_GROUP" + ENTITYITEMTYPEENUM_AZURE_AD_MICROSOFT_365_GROUP EntityItemTypeEnum = "AZURE_AD_MICROSOFT_365_GROUP" + ENTITYITEMTYPEENUM_CONNECTOR_GROUP EntityItemTypeEnum = "CONNECTOR_GROUP" + ENTITYITEMTYPEENUM_SNOWFLAKE_ROLE EntityItemTypeEnum = "SNOWFLAKE_ROLE" + ENTITYITEMTYPEENUM_WORKDAY_USER_SECURITY_GROUP EntityItemTypeEnum = "WORKDAY_USER_SECURITY_GROUP" + ENTITYITEMTYPEENUM_DATABRICKS_ACCOUNT_GROUP EntityItemTypeEnum = "DATABRICKS_ACCOUNT_GROUP" + ENTITYITEMTYPEENUM_AWS_IAM_ROLE EntityItemTypeEnum = "AWS_IAM_ROLE" + ENTITYITEMTYPEENUM_AWS_EC2_INSTANCE EntityItemTypeEnum = "AWS_EC2_INSTANCE" + ENTITYITEMTYPEENUM_AWS_EKS_CLUSTER EntityItemTypeEnum = "AWS_EKS_CLUSTER" + ENTITYITEMTYPEENUM_AWS_RDS_POSTGRES_INSTANCE EntityItemTypeEnum = "AWS_RDS_POSTGRES_INSTANCE" + ENTITYITEMTYPEENUM_AWS_RDS_POSTGRES_CLUSTER EntityItemTypeEnum = "AWS_RDS_POSTGRES_CLUSTER" + ENTITYITEMTYPEENUM_AWS_RDS_MYSQL_INSTANCE EntityItemTypeEnum = "AWS_RDS_MYSQL_INSTANCE" + ENTITYITEMTYPEENUM_AWS_RDS_MYSQL_CLUSTER EntityItemTypeEnum = "AWS_RDS_MYSQL_CLUSTER" + ENTITYITEMTYPEENUM_AWS_ACCOUNT EntityItemTypeEnum = "AWS_ACCOUNT" + ENTITYITEMTYPEENUM_AWS_SSO_PERMISSION_SET EntityItemTypeEnum = "AWS_SSO_PERMISSION_SET" + ENTITYITEMTYPEENUM_AZURE_MANAGEMENT_GROUP EntityItemTypeEnum = "AZURE_MANAGEMENT_GROUP" + ENTITYITEMTYPEENUM_AZURE_RESOURCE_GROUP EntityItemTypeEnum = "AZURE_RESOURCE_GROUP" + ENTITYITEMTYPEENUM_AZURE_SUBSCRIPTION EntityItemTypeEnum = "AZURE_SUBSCRIPTION" + ENTITYITEMTYPEENUM_AZURE_VIRTUAL_MACHINE EntityItemTypeEnum = "AZURE_VIRTUAL_MACHINE" + ENTITYITEMTYPEENUM_AZURE_STORAGE_ACCOUNT EntityItemTypeEnum = "AZURE_STORAGE_ACCOUNT" + ENTITYITEMTYPEENUM_AZURE_STORAGE_CONTAINER EntityItemTypeEnum = "AZURE_STORAGE_CONTAINER" + ENTITYITEMTYPEENUM_AZURE_SQL_SERVER EntityItemTypeEnum = "AZURE_SQL_SERVER" + ENTITYITEMTYPEENUM_AZURE_SQL_MANAGED_INSTANCE EntityItemTypeEnum = "AZURE_SQL_MANAGED_INSTANCE" + ENTITYITEMTYPEENUM_AZURE_SQL_DATABASE EntityItemTypeEnum = "AZURE_SQL_DATABASE" + ENTITYITEMTYPEENUM_AZURE_SQL_MANAGED_DATABASE EntityItemTypeEnum = "AZURE_SQL_MANAGED_DATABASE" + ENTITYITEMTYPEENUM_AZURE_USER_ASSIGNED_MANAGED_IDENTITY EntityItemTypeEnum = "AZURE_USER_ASSIGNED_MANAGED_Identity" + ENTITYITEMTYPEENUM_AZURE_ENTRA_ID_ROLE EntityItemTypeEnum = "AZURE_ENTRA_ID_ROLE" + ENTITYITEMTYPEENUM_AZURE_ENTERPRISE_APP EntityItemTypeEnum = "AZURE_ENTERPRISE_APP" + ENTITYITEMTYPEENUM_CUSTOM EntityItemTypeEnum = "CUSTOM" + ENTITYITEMTYPEENUM_CUSTOM_CONNECTOR EntityItemTypeEnum = "CUSTOM_CONNECTOR" + ENTITYITEMTYPEENUM_GCP_ORGANIZATION EntityItemTypeEnum = "GCP_ORGANIZATION" + ENTITYITEMTYPEENUM_GCP_BUCKET EntityItemTypeEnum = "GCP_BUCKET" + ENTITYITEMTYPEENUM_GCP_COMPUTE_INSTANCE EntityItemTypeEnum = "GCP_COMPUTE_INSTANCE" + ENTITYITEMTYPEENUM_GCP_BIG_QUERY_DATASET EntityItemTypeEnum = "GCP_BIG_QUERY_DATASET" + ENTITYITEMTYPEENUM_GCP_BIG_QUERY_TABLE EntityItemTypeEnum = "GCP_BIG_QUERY_TABLE" + ENTITYITEMTYPEENUM_GCP_FOLDER EntityItemTypeEnum = "GCP_FOLDER" + ENTITYITEMTYPEENUM_GCP_GKE_CLUSTER EntityItemTypeEnum = "GCP_GKE_CLUSTER" + ENTITYITEMTYPEENUM_GCP_PROJECT EntityItemTypeEnum = "GCP_PROJECT" + ENTITYITEMTYPEENUM_GCP_CLOUD_SQL_POSTGRES_INSTANCE EntityItemTypeEnum = "GCP_CLOUD_SQL_POSTGRES_INSTANCE" + ENTITYITEMTYPEENUM_GCP_CLOUD_SQL_MYSQL_INSTANCE EntityItemTypeEnum = "GCP_CLOUD_SQL_MYSQL_INSTANCE" + ENTITYITEMTYPEENUM_GCP_SERVICE_ACCOUNT EntityItemTypeEnum = "GCP_SERVICE_ACCOUNT" + ENTITYITEMTYPEENUM_GIT_HUB_REPO EntityItemTypeEnum = "GIT_HUB_REPO" + ENTITYITEMTYPEENUM_GIT_HUB_ORG_ROLE EntityItemTypeEnum = "GIT_HUB_ORG_ROLE" + ENTITYITEMTYPEENUM_GIT_LAB_PROJECT EntityItemTypeEnum = "GIT_LAB_PROJECT" + ENTITYITEMTYPEENUM_GOOGLE_WORKSPACE_ROLE EntityItemTypeEnum = "GOOGLE_WORKSPACE_ROLE" + ENTITYITEMTYPEENUM_MONGO_INSTANCE EntityItemTypeEnum = "MONGO_INSTANCE" + ENTITYITEMTYPEENUM_MONGO_ATLAS_INSTANCE EntityItemTypeEnum = "MONGO_ATLAS_INSTANCE" + ENTITYITEMTYPEENUM_OKTA_APP EntityItemTypeEnum = "OKTA_APP" + ENTITYITEMTYPEENUM_OKTA_ROLE EntityItemTypeEnum = "OKTA_ROLE" + ENTITYITEMTYPEENUM_OPAL_ROLE EntityItemTypeEnum = "OPAL_ROLE" + ENTITYITEMTYPEENUM_OPAL_SCOPED_ROLE EntityItemTypeEnum = "OPAL_SCOPED_ROLE" + ENTITYITEMTYPEENUM_PAGERDUTY_ROLE EntityItemTypeEnum = "PAGERDUTY_ROLE" + ENTITYITEMTYPEENUM_TAILSCALE_SSH EntityItemTypeEnum = "TAILSCALE_SSH" + ENTITYITEMTYPEENUM_TWINGATE_RESOURCE EntityItemTypeEnum = "TWINGATE_RESOURCE" + ENTITYITEMTYPEENUM_SALESFORCE_PERMISSION_SET EntityItemTypeEnum = "SALESFORCE_PERMISSION_SET" + ENTITYITEMTYPEENUM_SALESFORCE_PROFILE EntityItemTypeEnum = "SALESFORCE_PROFILE" + ENTITYITEMTYPEENUM_SALESFORCE_ROLE EntityItemTypeEnum = "SALESFORCE_ROLE" + ENTITYITEMTYPEENUM_SNOWFLAKE_DATABASE EntityItemTypeEnum = "SNOWFLAKE_DATABASE" + ENTITYITEMTYPEENUM_SNOWFLAKE_SCHEMA EntityItemTypeEnum = "SNOWFLAKE_SCHEMA" + ENTITYITEMTYPEENUM_SNOWFLAKE_TABLE EntityItemTypeEnum = "SNOWFLAKE_TABLE" + ENTITYITEMTYPEENUM_WORKDAY_ROLE EntityItemTypeEnum = "WORKDAY_ROLE" + ENTITYITEMTYPEENUM_MYSQL_INSTANCE EntityItemTypeEnum = "MYSQL_INSTANCE" + ENTITYITEMTYPEENUM_MARIADB_INSTANCE EntityItemTypeEnum = "MARIADB_INSTANCE" + ENTITYITEMTYPEENUM_POSTGRES_INSTANCE EntityItemTypeEnum = "POSTGRES_INSTANCE" + ENTITYITEMTYPEENUM_TELEPORT_ROLE EntityItemTypeEnum = "TELEPORT_ROLE" + ENTITYITEMTYPEENUM_DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL EntityItemTypeEnum = "DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL" + ENTITYITEMTYPEENUM_ILEVEL_ADVANCED_ROLE EntityItemTypeEnum = "ILEVEL_ADVANCED_ROLE" +) + +// All allowed values of EntityItemTypeEnum enum +var AllowedEntityItemTypeEnumEnumValues = []EntityItemTypeEnum{ + "USER", + "SERVICE_USER", + "ACTIVE_DIRECTORY_GROUP", + "AWS_SSO_GROUP", + "DUO_GROUP", + "GIT_HUB_TEAM", + "GIT_LAB_GROUP", + "GOOGLE_GROUPS_GROUP", + "GOOGLE_GROUPS_GKE_GROUP", + "LDAP_GROUP", + "OKTA_GROUP", + "OKTA_GROUP_RULE", + "TAILSCALE_GROUP", + "TWINGATE_GROUP", + "TWINGATE_GROUP_SYNCED", + "OPAL_GROUP", + "OPAL_ACCESS_RULE", + "AZURE_AD_SECURITY_GROUP", + "AZURE_AD_MICROSOFT_365_GROUP", + "CONNECTOR_GROUP", + "SNOWFLAKE_ROLE", + "WORKDAY_USER_SECURITY_GROUP", + "DATABRICKS_ACCOUNT_GROUP", + "AWS_IAM_ROLE", + "AWS_EC2_INSTANCE", + "AWS_EKS_CLUSTER", + "AWS_RDS_POSTGRES_INSTANCE", + "AWS_RDS_POSTGRES_CLUSTER", + "AWS_RDS_MYSQL_INSTANCE", + "AWS_RDS_MYSQL_CLUSTER", + "AWS_ACCOUNT", + "AWS_SSO_PERMISSION_SET", + "AZURE_MANAGEMENT_GROUP", + "AZURE_RESOURCE_GROUP", + "AZURE_SUBSCRIPTION", + "AZURE_VIRTUAL_MACHINE", + "AZURE_STORAGE_ACCOUNT", + "AZURE_STORAGE_CONTAINER", + "AZURE_SQL_SERVER", + "AZURE_SQL_MANAGED_INSTANCE", + "AZURE_SQL_DATABASE", + "AZURE_SQL_MANAGED_DATABASE", + "AZURE_USER_ASSIGNED_MANAGED_Identity", + "AZURE_ENTRA_ID_ROLE", + "AZURE_ENTERPRISE_APP", + "CUSTOM", + "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_CLOUD_SQL_POSTGRES_INSTANCE", + "GCP_CLOUD_SQL_MYSQL_INSTANCE", + "GCP_SERVICE_ACCOUNT", + "GIT_HUB_REPO", + "GIT_HUB_ORG_ROLE", + "GIT_LAB_PROJECT", + "GOOGLE_WORKSPACE_ROLE", + "MONGO_INSTANCE", + "MONGO_ATLAS_INSTANCE", + "OKTA_APP", + "OKTA_ROLE", + "OPAL_ROLE", + "OPAL_SCOPED_ROLE", + "PAGERDUTY_ROLE", + "TAILSCALE_SSH", + "TWINGATE_RESOURCE", + "SALESFORCE_PERMISSION_SET", + "SALESFORCE_PROFILE", + "SALESFORCE_ROLE", + "SNOWFLAKE_DATABASE", + "SNOWFLAKE_SCHEMA", + "SNOWFLAKE_TABLE", + "WORKDAY_ROLE", + "MYSQL_INSTANCE", + "MARIADB_INSTANCE", + "POSTGRES_INSTANCE", + "TELEPORT_ROLE", + "DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL", + "ILEVEL_ADVANCED_ROLE", +} + +func (v *EntityItemTypeEnum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := EntityItemTypeEnum(value) + for _, existing := range AllowedEntityItemTypeEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid EntityItemTypeEnum", value) +} + +// NewEntityItemTypeEnumFromValue returns a pointer to a valid EntityItemTypeEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewEntityItemTypeEnumFromValue(v string) (*EntityItemTypeEnum, error) { + ev := EntityItemTypeEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for EntityItemTypeEnum: valid values are %v", v, AllowedEntityItemTypeEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v EntityItemTypeEnum) IsValid() bool { + for _, existing := range AllowedEntityItemTypeEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to EntityItemTypeEnum value +func (v EntityItemTypeEnum) Ptr() *EntityItemTypeEnum { + return &v +} + +type NullableEntityItemTypeEnum struct { + value *EntityItemTypeEnum + isSet bool +} + +func (v NullableEntityItemTypeEnum) Get() *EntityItemTypeEnum { + return v.value +} + +func (v *NullableEntityItemTypeEnum) Set(val *EntityItemTypeEnum) { + v.value = val + v.isSet = true +} + +func (v NullableEntityItemTypeEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableEntityItemTypeEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEntityItemTypeEnum(val *EntityItemTypeEnum) *NullableEntityItemTypeEnum { + return &NullableEntityItemTypeEnum{value: val, isSet: true} +} + +func (v NullableEntityItemTypeEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEntityItemTypeEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/model_entity_name_filter.go b/model_entity_name_filter.go new file mode 100644 index 0000000..6f0187e --- /dev/null +++ b/model_entity_name_filter.go @@ -0,0 +1,199 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the EntityNameFilter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EntityNameFilter{} + +// EntityNameFilter Filters entities by name using a string match strategy. +type EntityNameFilter struct { + StringMatchType StringMatchType `json:"stringMatchType"` + // The string value to match against the entity name. + String string `json:"string"` + AdditionalProperties map[string]interface{} +} + +type _EntityNameFilter EntityNameFilter + +// NewEntityNameFilter instantiates a new EntityNameFilter object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEntityNameFilter(stringMatchType StringMatchType, string_ string) *EntityNameFilter { + this := EntityNameFilter{} + this.StringMatchType = stringMatchType + this.String = string_ + return &this +} + +// NewEntityNameFilterWithDefaults instantiates a new EntityNameFilter object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEntityNameFilterWithDefaults() *EntityNameFilter { + this := EntityNameFilter{} + return &this +} + +// GetStringMatchType returns the StringMatchType field value +func (o *EntityNameFilter) GetStringMatchType() StringMatchType { + if o == nil { + var ret StringMatchType + return ret + } + + return o.StringMatchType +} + +// GetStringMatchTypeOk returns a tuple with the StringMatchType field value +// and a boolean to check if the value has been set. +func (o *EntityNameFilter) GetStringMatchTypeOk() (*StringMatchType, bool) { + if o == nil { + return nil, false + } + return &o.StringMatchType, true +} + +// SetStringMatchType sets field value +func (o *EntityNameFilter) SetStringMatchType(v StringMatchType) { + o.StringMatchType = v +} + +// GetString returns the String field value +func (o *EntityNameFilter) GetString() string { + if o == nil { + var ret string + return ret + } + + return o.String +} + +// GetStringOk returns a tuple with the String field value +// and a boolean to check if the value has been set. +func (o *EntityNameFilter) GetStringOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.String, true +} + +// SetString sets field value +func (o *EntityNameFilter) SetString(v string) { + o.String = v +} + +func (o EntityNameFilter) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EntityNameFilter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["stringMatchType"] = o.StringMatchType + toSerialize["string"] = o.String + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *EntityNameFilter) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "stringMatchType", + "string", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEntityNameFilter := _EntityNameFilter{} + + err = json.Unmarshal(data, &varEntityNameFilter) + + if err != nil { + return err + } + + *o = EntityNameFilter(varEntityNameFilter) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "stringMatchType") + delete(additionalProperties, "string") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableEntityNameFilter struct { + value *EntityNameFilter + isSet bool +} + +func (v NullableEntityNameFilter) Get() *EntityNameFilter { + return v.value +} + +func (v *NullableEntityNameFilter) Set(val *EntityNameFilter) { + v.value = val + v.isSet = true +} + +func (v NullableEntityNameFilter) IsSet() bool { + return v.isSet +} + +func (v *NullableEntityNameFilter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEntityNameFilter(val *EntityNameFilter) *NullableEntityNameFilter { + return &NullableEntityNameFilter{value: val, isSet: true} +} + +func (v NullableEntityNameFilter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEntityNameFilter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_entity_tag_filter.go b/model_entity_tag_filter.go new file mode 100644 index 0000000..10c88f3 --- /dev/null +++ b/model_entity_tag_filter.go @@ -0,0 +1,246 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the EntityTagFilter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EntityTagFilter{} + +// EntityTagFilter Filters entities by a tag key/value pair, optionally scoped to a connection. +type EntityTagFilter struct { + // The tag key to filter by. + Key string `json:"key"` + // The tag value to filter by. If omitted, matches any value for the given key. + Value *string `json:"value,omitempty"` + // If specified, filters by tags associated with this connection. + ConnectionId *string `json:"connectionId,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _EntityTagFilter EntityTagFilter + +// NewEntityTagFilter instantiates a new EntityTagFilter object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEntityTagFilter(key string) *EntityTagFilter { + this := EntityTagFilter{} + this.Key = key + return &this +} + +// NewEntityTagFilterWithDefaults instantiates a new EntityTagFilter object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEntityTagFilterWithDefaults() *EntityTagFilter { + this := EntityTagFilter{} + return &this +} + +// GetKey returns the Key field value +func (o *EntityTagFilter) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *EntityTagFilter) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *EntityTagFilter) SetKey(v string) { + o.Key = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *EntityTagFilter) GetValue() string { + if o == nil || IsNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityTagFilter) GetValueOk() (*string, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *EntityTagFilter) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *EntityTagFilter) SetValue(v string) { + o.Value = &v +} + +// GetConnectionId returns the ConnectionId field value if set, zero value otherwise. +func (o *EntityTagFilter) GetConnectionId() string { + if o == nil || IsNil(o.ConnectionId) { + var ret string + return ret + } + return *o.ConnectionId +} + +// GetConnectionIdOk returns a tuple with the ConnectionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityTagFilter) GetConnectionIdOk() (*string, bool) { + if o == nil || IsNil(o.ConnectionId) { + return nil, false + } + return o.ConnectionId, true +} + +// HasConnectionId returns a boolean if a field has been set. +func (o *EntityTagFilter) HasConnectionId() bool { + if o != nil && !IsNil(o.ConnectionId) { + return true + } + + return false +} + +// SetConnectionId gets a reference to the given string and assigns it to the ConnectionId field. +func (o *EntityTagFilter) SetConnectionId(v string) { + o.ConnectionId = &v +} + +func (o EntityTagFilter) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EntityTagFilter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["key"] = o.Key + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.ConnectionId) { + toSerialize["connectionId"] = o.ConnectionId + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *EntityTagFilter) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEntityTagFilter := _EntityTagFilter{} + + err = json.Unmarshal(data, &varEntityTagFilter) + + if err != nil { + return err + } + + *o = EntityTagFilter(varEntityTagFilter) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "key") + delete(additionalProperties, "value") + delete(additionalProperties, "connectionId") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableEntityTagFilter struct { + value *EntityTagFilter + isSet bool +} + +func (v NullableEntityTagFilter) Get() *EntityTagFilter { + return v.value +} + +func (v *NullableEntityTagFilter) Set(val *EntityTagFilter) { + v.value = val + v.isSet = true +} + +func (v NullableEntityTagFilter) IsSet() bool { + return v.isSet +} + +func (v *NullableEntityTagFilter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEntityTagFilter(val *EntityTagFilter) *NullableEntityTagFilter { + return &NullableEntityTagFilter{value: val, isSet: true} +} + +func (v NullableEntityTagFilter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEntityTagFilter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_event_stream.go b/model_event_stream.go new file mode 100644 index 0000000..bd1a274 --- /dev/null +++ b/model_event_stream.go @@ -0,0 +1,199 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the EventStream type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EventStream{} + +// EventStream An event streaming connection that publishes events to an external system. +type EventStream struct { + // The ID of the event stream. + EventStreamId string `json:"event_stream_id"` + Connection EventStreamConnection `json:"connection"` + AdditionalProperties map[string]interface{} +} + +type _EventStream EventStream + +// NewEventStream instantiates a new EventStream object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEventStream(eventStreamId string, connection EventStreamConnection) *EventStream { + this := EventStream{} + this.EventStreamId = eventStreamId + this.Connection = connection + return &this +} + +// NewEventStreamWithDefaults instantiates a new EventStream object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEventStreamWithDefaults() *EventStream { + this := EventStream{} + return &this +} + +// GetEventStreamId returns the EventStreamId field value +func (o *EventStream) GetEventStreamId() string { + if o == nil { + var ret string + return ret + } + + return o.EventStreamId +} + +// GetEventStreamIdOk returns a tuple with the EventStreamId field value +// and a boolean to check if the value has been set. +func (o *EventStream) GetEventStreamIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EventStreamId, true +} + +// SetEventStreamId sets field value +func (o *EventStream) SetEventStreamId(v string) { + o.EventStreamId = v +} + +// GetConnection returns the Connection field value +func (o *EventStream) GetConnection() EventStreamConnection { + if o == nil { + var ret EventStreamConnection + return ret + } + + return o.Connection +} + +// GetConnectionOk returns a tuple with the Connection field value +// and a boolean to check if the value has been set. +func (o *EventStream) GetConnectionOk() (*EventStreamConnection, bool) { + if o == nil { + return nil, false + } + return &o.Connection, true +} + +// SetConnection sets field value +func (o *EventStream) SetConnection(v EventStreamConnection) { + o.Connection = v +} + +func (o EventStream) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EventStream) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["event_stream_id"] = o.EventStreamId + toSerialize["connection"] = o.Connection + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *EventStream) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "event_stream_id", + "connection", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEventStream := _EventStream{} + + err = json.Unmarshal(data, &varEventStream) + + if err != nil { + return err + } + + *o = EventStream(varEventStream) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "event_stream_id") + delete(additionalProperties, "connection") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableEventStream struct { + value *EventStream + isSet bool +} + +func (v NullableEventStream) Get() *EventStream { + return v.value +} + +func (v *NullableEventStream) Set(val *EventStream) { + v.value = val + v.isSet = true +} + +func (v NullableEventStream) IsSet() bool { + return v.isSet +} + +func (v *NullableEventStream) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEventStream(val *EventStream) *NullableEventStream { + return &NullableEventStream{value: val, isSet: true} +} + +func (v NullableEventStream) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEventStream) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_event_stream_connection.go b/model_event_stream_connection.go new file mode 100644 index 0000000..cf37ecc --- /dev/null +++ b/model_event_stream_connection.go @@ -0,0 +1,304 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the EventStreamConnection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EventStreamConnection{} + +// EventStreamConnection The connection configuration for an event stream. +type EventStreamConnection struct { + // The name of the connection. + Name string `json:"name"` + ConnectionType EventStreamConnectionTypeEnum `json:"connection_type"` + // Whether the connection is enabled. + Enabled bool `json:"enabled"` + // The webhook URL, present when connection_type is WEBHOOK. + WebhookUrl *string `json:"webhook_url,omitempty"` + Credentials *WebhookCredentials `json:"credentials,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _EventStreamConnection EventStreamConnection + +// NewEventStreamConnection instantiates a new EventStreamConnection object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEventStreamConnection(name string, connectionType EventStreamConnectionTypeEnum, enabled bool) *EventStreamConnection { + this := EventStreamConnection{} + this.Name = name + this.ConnectionType = connectionType + this.Enabled = enabled + return &this +} + +// NewEventStreamConnectionWithDefaults instantiates a new EventStreamConnection object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEventStreamConnectionWithDefaults() *EventStreamConnection { + this := EventStreamConnection{} + return &this +} + +// GetName returns the Name field value +func (o *EventStreamConnection) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *EventStreamConnection) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *EventStreamConnection) SetName(v string) { + o.Name = v +} + +// GetConnectionType returns the ConnectionType field value +func (o *EventStreamConnection) GetConnectionType() EventStreamConnectionTypeEnum { + if o == nil { + var ret EventStreamConnectionTypeEnum + return ret + } + + return o.ConnectionType +} + +// GetConnectionTypeOk returns a tuple with the ConnectionType field value +// and a boolean to check if the value has been set. +func (o *EventStreamConnection) GetConnectionTypeOk() (*EventStreamConnectionTypeEnum, bool) { + if o == nil { + return nil, false + } + return &o.ConnectionType, true +} + +// SetConnectionType sets field value +func (o *EventStreamConnection) SetConnectionType(v EventStreamConnectionTypeEnum) { + o.ConnectionType = v +} + +// GetEnabled returns the Enabled field value +func (o *EventStreamConnection) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *EventStreamConnection) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *EventStreamConnection) SetEnabled(v bool) { + o.Enabled = v +} + +// GetWebhookUrl returns the WebhookUrl field value if set, zero value otherwise. +func (o *EventStreamConnection) GetWebhookUrl() string { + if o == nil || IsNil(o.WebhookUrl) { + var ret string + return ret + } + return *o.WebhookUrl +} + +// GetWebhookUrlOk returns a tuple with the WebhookUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EventStreamConnection) GetWebhookUrlOk() (*string, bool) { + if o == nil || IsNil(o.WebhookUrl) { + return nil, false + } + return o.WebhookUrl, true +} + +// HasWebhookUrl returns a boolean if a field has been set. +func (o *EventStreamConnection) HasWebhookUrl() bool { + if o != nil && !IsNil(o.WebhookUrl) { + return true + } + + return false +} + +// SetWebhookUrl gets a reference to the given string and assigns it to the WebhookUrl field. +func (o *EventStreamConnection) SetWebhookUrl(v string) { + o.WebhookUrl = &v +} + +// GetCredentials returns the Credentials field value if set, zero value otherwise. +func (o *EventStreamConnection) GetCredentials() WebhookCredentials { + if o == nil || IsNil(o.Credentials) { + var ret WebhookCredentials + return ret + } + return *o.Credentials +} + +// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EventStreamConnection) GetCredentialsOk() (*WebhookCredentials, bool) { + if o == nil || IsNil(o.Credentials) { + return nil, false + } + return o.Credentials, true +} + +// HasCredentials returns a boolean if a field has been set. +func (o *EventStreamConnection) HasCredentials() bool { + if o != nil && !IsNil(o.Credentials) { + return true + } + + return false +} + +// SetCredentials gets a reference to the given WebhookCredentials and assigns it to the Credentials field. +func (o *EventStreamConnection) SetCredentials(v WebhookCredentials) { + o.Credentials = &v +} + +func (o EventStreamConnection) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EventStreamConnection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["connection_type"] = o.ConnectionType + toSerialize["enabled"] = o.Enabled + if !IsNil(o.WebhookUrl) { + toSerialize["webhook_url"] = o.WebhookUrl + } + if !IsNil(o.Credentials) { + toSerialize["credentials"] = o.Credentials + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *EventStreamConnection) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "connection_type", + "enabled", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEventStreamConnection := _EventStreamConnection{} + + err = json.Unmarshal(data, &varEventStreamConnection) + + if err != nil { + return err + } + + *o = EventStreamConnection(varEventStreamConnection) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "connection_type") + delete(additionalProperties, "enabled") + delete(additionalProperties, "webhook_url") + delete(additionalProperties, "credentials") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableEventStreamConnection struct { + value *EventStreamConnection + isSet bool +} + +func (v NullableEventStreamConnection) Get() *EventStreamConnection { + return v.value +} + +func (v *NullableEventStreamConnection) Set(val *EventStreamConnection) { + v.value = val + v.isSet = true +} + +func (v NullableEventStreamConnection) IsSet() bool { + return v.isSet +} + +func (v *NullableEventStreamConnection) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEventStreamConnection(val *EventStreamConnection) *NullableEventStreamConnection { + return &NullableEventStreamConnection{value: val, isSet: true} +} + +func (v NullableEventStreamConnection) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEventStreamConnection) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_event_stream_connection_type_enum.go b/model_event_stream_connection_type_enum.go new file mode 100644 index 0000000..9d0d2f4 --- /dev/null +++ b/model_event_stream_connection_type_enum.go @@ -0,0 +1,110 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// EventStreamConnectionTypeEnum The type of event stream connection. +type EventStreamConnectionTypeEnum string + +// List of EventStreamConnectionTypeEnum +const ( + EVENTSTREAMCONNECTIONTYPEENUM_WEBHOOK EventStreamConnectionTypeEnum = "WEBHOOK" +) + +// All allowed values of EventStreamConnectionTypeEnum enum +var AllowedEventStreamConnectionTypeEnumEnumValues = []EventStreamConnectionTypeEnum{ + "WEBHOOK", +} + +func (v *EventStreamConnectionTypeEnum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := EventStreamConnectionTypeEnum(value) + for _, existing := range AllowedEventStreamConnectionTypeEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid EventStreamConnectionTypeEnum", value) +} + +// NewEventStreamConnectionTypeEnumFromValue returns a pointer to a valid EventStreamConnectionTypeEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewEventStreamConnectionTypeEnumFromValue(v string) (*EventStreamConnectionTypeEnum, error) { + ev := EventStreamConnectionTypeEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for EventStreamConnectionTypeEnum: valid values are %v", v, AllowedEventStreamConnectionTypeEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v EventStreamConnectionTypeEnum) IsValid() bool { + for _, existing := range AllowedEventStreamConnectionTypeEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to EventStreamConnectionTypeEnum value +func (v EventStreamConnectionTypeEnum) Ptr() *EventStreamConnectionTypeEnum { + return &v +} + +type NullableEventStreamConnectionTypeEnum struct { + value *EventStreamConnectionTypeEnum + isSet bool +} + +func (v NullableEventStreamConnectionTypeEnum) Get() *EventStreamConnectionTypeEnum { + return v.value +} + +func (v *NullableEventStreamConnectionTypeEnum) Set(val *EventStreamConnectionTypeEnum) { + v.value = val + v.isSet = true +} + +func (v NullableEventStreamConnectionTypeEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableEventStreamConnectionTypeEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEventStreamConnectionTypeEnum(val *EventStreamConnectionTypeEnum) *NullableEventStreamConnectionTypeEnum { + return &NullableEventStreamConnectionTypeEnum{value: val, isSet: true} +} + +func (v NullableEventStreamConnectionTypeEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEventStreamConnectionTypeEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/model_event_stream_list.go b/model_event_stream_list.go new file mode 100644 index 0000000..48126a0 --- /dev/null +++ b/model_event_stream_list.go @@ -0,0 +1,169 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the EventStreamList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EventStreamList{} + +// EventStreamList A list of event streams. +type EventStreamList struct { + EventStreams []EventStream `json:"event_streams"` + AdditionalProperties map[string]interface{} +} + +type _EventStreamList EventStreamList + +// NewEventStreamList instantiates a new EventStreamList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEventStreamList(eventStreams []EventStream) *EventStreamList { + this := EventStreamList{} + this.EventStreams = eventStreams + return &this +} + +// NewEventStreamListWithDefaults instantiates a new EventStreamList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEventStreamListWithDefaults() *EventStreamList { + this := EventStreamList{} + return &this +} + +// GetEventStreams returns the EventStreams field value +func (o *EventStreamList) GetEventStreams() []EventStream { + if o == nil { + var ret []EventStream + return ret + } + + return o.EventStreams +} + +// GetEventStreamsOk returns a tuple with the EventStreams field value +// and a boolean to check if the value has been set. +func (o *EventStreamList) GetEventStreamsOk() ([]EventStream, bool) { + if o == nil { + return nil, false + } + return o.EventStreams, true +} + +// SetEventStreams sets field value +func (o *EventStreamList) SetEventStreams(v []EventStream) { + o.EventStreams = v +} + +func (o EventStreamList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EventStreamList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["event_streams"] = o.EventStreams + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *EventStreamList) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "event_streams", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEventStreamList := _EventStreamList{} + + err = json.Unmarshal(data, &varEventStreamList) + + if err != nil { + return err + } + + *o = EventStreamList(varEventStreamList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "event_streams") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableEventStreamList struct { + value *EventStreamList + isSet bool +} + +func (v NullableEventStreamList) Get() *EventStreamList { + return v.value +} + +func (v *NullableEventStreamList) Set(val *EventStreamList) { + v.value = val + v.isSet = true +} + +func (v NullableEventStreamList) IsSet() bool { + return v.isSet +} + +func (v *NullableEventStreamList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEventStreamList(val *EventStreamList) *NullableEventStreamList { + return &NullableEventStreamList{value: val, isSet: true} +} + +func (v NullableEventStreamList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEventStreamList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_group.go b/model_group.go index 45a55ca..0153904 100644 --- a/model_group.go +++ b/model_group.go @@ -66,6 +66,7 @@ type Group struct { // A list of request configurations for this group. RequestConfigurations []RequestConfiguration `json:"request_configurations,omitempty"` // A list of request configurations for this group. Deprecated in favor of `request_configurations`. + // Deprecated RequestConfigurationList []RequestConfiguration `json:"request_configuration_list,omitempty"` // 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. // Deprecated @@ -801,6 +802,7 @@ func (o *Group) SetRequestConfigurations(v []RequestConfiguration) { } // GetRequestConfigurationList returns the RequestConfigurationList field value if set, zero value otherwise. +// Deprecated func (o *Group) GetRequestConfigurationList() []RequestConfiguration { if o == nil || IsNil(o.RequestConfigurationList) { var ret []RequestConfiguration @@ -811,6 +813,7 @@ func (o *Group) GetRequestConfigurationList() []RequestConfiguration { // GetRequestConfigurationListOk returns a tuple with the RequestConfigurationList field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated func (o *Group) GetRequestConfigurationListOk() ([]RequestConfiguration, bool) { if o == nil || IsNil(o.RequestConfigurationList) { return nil, false @@ -828,6 +831,7 @@ func (o *Group) HasRequestConfigurationList() bool { } // SetRequestConfigurationList gets a reference to the given []RequestConfiguration and assigns it to the RequestConfigurationList field. +// Deprecated func (o *Group) SetRequestConfigurationList(v []RequestConfiguration) { o.RequestConfigurationList = v } diff --git a/model_group_remote_info.go b/model_group_remote_info.go index 57c1b7b..eab0d5f 100644 --- a/model_group_remote_info.go +++ b/model_group_remote_info.go @@ -22,6 +22,8 @@ var _ MappedNullable = &GroupRemoteInfo{} type GroupRemoteInfo struct { ActiveDirectoryGroup *GroupRemoteInfoActiveDirectoryGroup `json:"active_directory_group,omitempty"` TailscaleGroup *GroupRemoteInfoTailscaleGroup `json:"tailscale_group,omitempty"` + TwingateGroup *GroupRemoteInfoTwingateGroup `json:"twingate_group,omitempty"` + TwingateGroupSynced *GroupRemoteInfoTwingateGroupSynced `json:"twingate_group_synced,omitempty"` AwsSsoGroup *GroupRemoteInfoAwsSsoGroup `json:"aws_sso_group,omitempty"` DatabricksAccountGroup *GroupRemoteInfoDatabricksAccountGroup `json:"databricks_account_group,omitempty"` ConnectorGroup *GroupRemoteInfoConnectorGroup `json:"connector_group,omitempty"` @@ -41,6 +43,10 @@ type GroupRemoteInfo struct { IncidentioOnCallSchedule *GroupRemoteInfoIncidentioOnCallSchedule `json:"incidentio_on_call_schedule,omitempty"` RootlyOnCallSchedule *GroupRemoteInfoRootlyOnCallSchedule `json:"rootly_on_call_schedule,omitempty"` DevinGroup *GroupRemoteInfoDevinGroup `json:"devin_group,omitempty"` + ClickhouseRole *GroupRemoteInfoClickhouseRole `json:"clickhouse_role,omitempty"` + GrafanaTeam *GroupRemoteInfoGrafanaTeam `json:"grafana_team,omitempty"` + ZendeskGroup *GroupRemoteInfoZendeskGroup `json:"zendesk_group,omitempty"` + ZendeskOrganization *GroupRemoteInfoZendeskOrganization `json:"zendesk_organization,omitempty"` AdditionalProperties map[string]interface{} } @@ -127,6 +133,70 @@ func (o *GroupRemoteInfo) SetTailscaleGroup(v GroupRemoteInfoTailscaleGroup) { o.TailscaleGroup = &v } +// GetTwingateGroup returns the TwingateGroup field value if set, zero value otherwise. +func (o *GroupRemoteInfo) GetTwingateGroup() GroupRemoteInfoTwingateGroup { + if o == nil || IsNil(o.TwingateGroup) { + var ret GroupRemoteInfoTwingateGroup + return ret + } + return *o.TwingateGroup +} + +// GetTwingateGroupOk returns a tuple with the TwingateGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupRemoteInfo) GetTwingateGroupOk() (*GroupRemoteInfoTwingateGroup, bool) { + if o == nil || IsNil(o.TwingateGroup) { + return nil, false + } + return o.TwingateGroup, true +} + +// HasTwingateGroup returns a boolean if a field has been set. +func (o *GroupRemoteInfo) HasTwingateGroup() bool { + if o != nil && !IsNil(o.TwingateGroup) { + return true + } + + return false +} + +// SetTwingateGroup gets a reference to the given GroupRemoteInfoTwingateGroup and assigns it to the TwingateGroup field. +func (o *GroupRemoteInfo) SetTwingateGroup(v GroupRemoteInfoTwingateGroup) { + o.TwingateGroup = &v +} + +// GetTwingateGroupSynced returns the TwingateGroupSynced field value if set, zero value otherwise. +func (o *GroupRemoteInfo) GetTwingateGroupSynced() GroupRemoteInfoTwingateGroupSynced { + if o == nil || IsNil(o.TwingateGroupSynced) { + var ret GroupRemoteInfoTwingateGroupSynced + return ret + } + return *o.TwingateGroupSynced +} + +// GetTwingateGroupSyncedOk returns a tuple with the TwingateGroupSynced field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupRemoteInfo) GetTwingateGroupSyncedOk() (*GroupRemoteInfoTwingateGroupSynced, bool) { + if o == nil || IsNil(o.TwingateGroupSynced) { + return nil, false + } + return o.TwingateGroupSynced, true +} + +// HasTwingateGroupSynced returns a boolean if a field has been set. +func (o *GroupRemoteInfo) HasTwingateGroupSynced() bool { + if o != nil && !IsNil(o.TwingateGroupSynced) { + return true + } + + return false +} + +// SetTwingateGroupSynced gets a reference to the given GroupRemoteInfoTwingateGroupSynced and assigns it to the TwingateGroupSynced field. +func (o *GroupRemoteInfo) SetTwingateGroupSynced(v GroupRemoteInfoTwingateGroupSynced) { + o.TwingateGroupSynced = &v +} + // GetAwsSsoGroup returns the AwsSsoGroup field value if set, zero value otherwise. func (o *GroupRemoteInfo) GetAwsSsoGroup() GroupRemoteInfoAwsSsoGroup { if o == nil || IsNil(o.AwsSsoGroup) { @@ -735,6 +805,134 @@ func (o *GroupRemoteInfo) SetDevinGroup(v GroupRemoteInfoDevinGroup) { o.DevinGroup = &v } +// GetClickhouseRole returns the ClickhouseRole field value if set, zero value otherwise. +func (o *GroupRemoteInfo) GetClickhouseRole() GroupRemoteInfoClickhouseRole { + if o == nil || IsNil(o.ClickhouseRole) { + var ret GroupRemoteInfoClickhouseRole + return ret + } + return *o.ClickhouseRole +} + +// GetClickhouseRoleOk returns a tuple with the ClickhouseRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupRemoteInfo) GetClickhouseRoleOk() (*GroupRemoteInfoClickhouseRole, bool) { + if o == nil || IsNil(o.ClickhouseRole) { + return nil, false + } + return o.ClickhouseRole, true +} + +// HasClickhouseRole returns a boolean if a field has been set. +func (o *GroupRemoteInfo) HasClickhouseRole() bool { + if o != nil && !IsNil(o.ClickhouseRole) { + return true + } + + return false +} + +// SetClickhouseRole gets a reference to the given GroupRemoteInfoClickhouseRole and assigns it to the ClickhouseRole field. +func (o *GroupRemoteInfo) SetClickhouseRole(v GroupRemoteInfoClickhouseRole) { + o.ClickhouseRole = &v +} + +// GetGrafanaTeam returns the GrafanaTeam field value if set, zero value otherwise. +func (o *GroupRemoteInfo) GetGrafanaTeam() GroupRemoteInfoGrafanaTeam { + if o == nil || IsNil(o.GrafanaTeam) { + var ret GroupRemoteInfoGrafanaTeam + return ret + } + return *o.GrafanaTeam +} + +// GetGrafanaTeamOk returns a tuple with the GrafanaTeam field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupRemoteInfo) GetGrafanaTeamOk() (*GroupRemoteInfoGrafanaTeam, bool) { + if o == nil || IsNil(o.GrafanaTeam) { + return nil, false + } + return o.GrafanaTeam, true +} + +// HasGrafanaTeam returns a boolean if a field has been set. +func (o *GroupRemoteInfo) HasGrafanaTeam() bool { + if o != nil && !IsNil(o.GrafanaTeam) { + return true + } + + return false +} + +// SetGrafanaTeam gets a reference to the given GroupRemoteInfoGrafanaTeam and assigns it to the GrafanaTeam field. +func (o *GroupRemoteInfo) SetGrafanaTeam(v GroupRemoteInfoGrafanaTeam) { + o.GrafanaTeam = &v +} + +// GetZendeskGroup returns the ZendeskGroup field value if set, zero value otherwise. +func (o *GroupRemoteInfo) GetZendeskGroup() GroupRemoteInfoZendeskGroup { + if o == nil || IsNil(o.ZendeskGroup) { + var ret GroupRemoteInfoZendeskGroup + return ret + } + return *o.ZendeskGroup +} + +// GetZendeskGroupOk returns a tuple with the ZendeskGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupRemoteInfo) GetZendeskGroupOk() (*GroupRemoteInfoZendeskGroup, bool) { + if o == nil || IsNil(o.ZendeskGroup) { + return nil, false + } + return o.ZendeskGroup, true +} + +// HasZendeskGroup returns a boolean if a field has been set. +func (o *GroupRemoteInfo) HasZendeskGroup() bool { + if o != nil && !IsNil(o.ZendeskGroup) { + return true + } + + return false +} + +// SetZendeskGroup gets a reference to the given GroupRemoteInfoZendeskGroup and assigns it to the ZendeskGroup field. +func (o *GroupRemoteInfo) SetZendeskGroup(v GroupRemoteInfoZendeskGroup) { + o.ZendeskGroup = &v +} + +// GetZendeskOrganization returns the ZendeskOrganization field value if set, zero value otherwise. +func (o *GroupRemoteInfo) GetZendeskOrganization() GroupRemoteInfoZendeskOrganization { + if o == nil || IsNil(o.ZendeskOrganization) { + var ret GroupRemoteInfoZendeskOrganization + return ret + } + return *o.ZendeskOrganization +} + +// GetZendeskOrganizationOk returns a tuple with the ZendeskOrganization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupRemoteInfo) GetZendeskOrganizationOk() (*GroupRemoteInfoZendeskOrganization, bool) { + if o == nil || IsNil(o.ZendeskOrganization) { + return nil, false + } + return o.ZendeskOrganization, true +} + +// HasZendeskOrganization returns a boolean if a field has been set. +func (o *GroupRemoteInfo) HasZendeskOrganization() bool { + if o != nil && !IsNil(o.ZendeskOrganization) { + return true + } + + return false +} + +// SetZendeskOrganization gets a reference to the given GroupRemoteInfoZendeskOrganization and assigns it to the ZendeskOrganization field. +func (o *GroupRemoteInfo) SetZendeskOrganization(v GroupRemoteInfoZendeskOrganization) { + o.ZendeskOrganization = &v +} + func (o GroupRemoteInfo) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -751,6 +949,12 @@ func (o GroupRemoteInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.TailscaleGroup) { toSerialize["tailscale_group"] = o.TailscaleGroup } + if !IsNil(o.TwingateGroup) { + toSerialize["twingate_group"] = o.TwingateGroup + } + if !IsNil(o.TwingateGroupSynced) { + toSerialize["twingate_group_synced"] = o.TwingateGroupSynced + } if !IsNil(o.AwsSsoGroup) { toSerialize["aws_sso_group"] = o.AwsSsoGroup } @@ -808,6 +1012,18 @@ func (o GroupRemoteInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.DevinGroup) { toSerialize["devin_group"] = o.DevinGroup } + if !IsNil(o.ClickhouseRole) { + toSerialize["clickhouse_role"] = o.ClickhouseRole + } + if !IsNil(o.GrafanaTeam) { + toSerialize["grafana_team"] = o.GrafanaTeam + } + if !IsNil(o.ZendeskGroup) { + toSerialize["zendesk_group"] = o.ZendeskGroup + } + if !IsNil(o.ZendeskOrganization) { + toSerialize["zendesk_organization"] = o.ZendeskOrganization + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -832,6 +1048,8 @@ func (o *GroupRemoteInfo) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "active_directory_group") delete(additionalProperties, "tailscale_group") + delete(additionalProperties, "twingate_group") + delete(additionalProperties, "twingate_group_synced") delete(additionalProperties, "aws_sso_group") delete(additionalProperties, "databricks_account_group") delete(additionalProperties, "connector_group") @@ -851,6 +1069,10 @@ func (o *GroupRemoteInfo) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "incidentio_on_call_schedule") delete(additionalProperties, "rootly_on_call_schedule") delete(additionalProperties, "devin_group") + delete(additionalProperties, "clickhouse_role") + delete(additionalProperties, "grafana_team") + delete(additionalProperties, "zendesk_group") + delete(additionalProperties, "zendesk_organization") o.AdditionalProperties = additionalProperties } diff --git a/model_group_remote_info_clickhouse_role.go b/model_group_remote_info_clickhouse_role.go new file mode 100644 index 0000000..fb03af1 --- /dev/null +++ b/model_group_remote_info_clickhouse_role.go @@ -0,0 +1,170 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the GroupRemoteInfoClickhouseRole type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupRemoteInfoClickhouseRole{} + +// GroupRemoteInfoClickhouseRole Remote info for ClickHouse role. +type GroupRemoteInfoClickhouseRole struct { + // The name of the ClickHouse role. + RoleId string `json:"role_id"` + AdditionalProperties map[string]interface{} +} + +type _GroupRemoteInfoClickhouseRole GroupRemoteInfoClickhouseRole + +// NewGroupRemoteInfoClickhouseRole instantiates a new GroupRemoteInfoClickhouseRole object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupRemoteInfoClickhouseRole(roleId string) *GroupRemoteInfoClickhouseRole { + this := GroupRemoteInfoClickhouseRole{} + this.RoleId = roleId + return &this +} + +// NewGroupRemoteInfoClickhouseRoleWithDefaults instantiates a new GroupRemoteInfoClickhouseRole object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupRemoteInfoClickhouseRoleWithDefaults() *GroupRemoteInfoClickhouseRole { + this := GroupRemoteInfoClickhouseRole{} + return &this +} + +// GetRoleId returns the RoleId field value +func (o *GroupRemoteInfoClickhouseRole) GetRoleId() string { + if o == nil { + var ret string + return ret + } + + return o.RoleId +} + +// GetRoleIdOk returns a tuple with the RoleId field value +// and a boolean to check if the value has been set. +func (o *GroupRemoteInfoClickhouseRole) GetRoleIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RoleId, true +} + +// SetRoleId sets field value +func (o *GroupRemoteInfoClickhouseRole) SetRoleId(v string) { + o.RoleId = v +} + +func (o GroupRemoteInfoClickhouseRole) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupRemoteInfoClickhouseRole) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role_id"] = o.RoleId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GroupRemoteInfoClickhouseRole) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "role_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroupRemoteInfoClickhouseRole := _GroupRemoteInfoClickhouseRole{} + + err = json.Unmarshal(data, &varGroupRemoteInfoClickhouseRole) + + if err != nil { + return err + } + + *o = GroupRemoteInfoClickhouseRole(varGroupRemoteInfoClickhouseRole) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGroupRemoteInfoClickhouseRole struct { + value *GroupRemoteInfoClickhouseRole + isSet bool +} + +func (v NullableGroupRemoteInfoClickhouseRole) Get() *GroupRemoteInfoClickhouseRole { + return v.value +} + +func (v *NullableGroupRemoteInfoClickhouseRole) Set(val *GroupRemoteInfoClickhouseRole) { + v.value = val + v.isSet = true +} + +func (v NullableGroupRemoteInfoClickhouseRole) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupRemoteInfoClickhouseRole) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupRemoteInfoClickhouseRole(val *GroupRemoteInfoClickhouseRole) *NullableGroupRemoteInfoClickhouseRole { + return &NullableGroupRemoteInfoClickhouseRole{value: val, isSet: true} +} + +func (v NullableGroupRemoteInfoClickhouseRole) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupRemoteInfoClickhouseRole) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_group_remote_info_github_team.go b/model_group_remote_info_github_team.go index 44bd2df..4761bac 100644 --- a/model_group_remote_info_github_team.go +++ b/model_group_remote_info_github_team.go @@ -26,6 +26,8 @@ type GroupRemoteInfoGithubTeam struct { TeamId *string `json:"team_id,omitempty"` // The slug of the GitHub team. TeamSlug string `json:"team_slug"` + // GitHub team's org name, required only for Enterprise + OrgName *string `json:"org_name,omitempty"` AdditionalProperties map[string]interface{} } @@ -108,6 +110,38 @@ func (o *GroupRemoteInfoGithubTeam) SetTeamSlug(v string) { o.TeamSlug = v } +// GetOrgName returns the OrgName field value if set, zero value otherwise. +func (o *GroupRemoteInfoGithubTeam) GetOrgName() string { + if o == nil || IsNil(o.OrgName) { + var ret string + return ret + } + return *o.OrgName +} + +// GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupRemoteInfoGithubTeam) GetOrgNameOk() (*string, bool) { + if o == nil || IsNil(o.OrgName) { + return nil, false + } + return o.OrgName, true +} + +// HasOrgName returns a boolean if a field has been set. +func (o *GroupRemoteInfoGithubTeam) HasOrgName() bool { + if o != nil && !IsNil(o.OrgName) { + return true + } + + return false +} + +// SetOrgName gets a reference to the given string and assigns it to the OrgName field. +func (o *GroupRemoteInfoGithubTeam) SetOrgName(v string) { + o.OrgName = &v +} + func (o GroupRemoteInfoGithubTeam) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -122,6 +156,9 @@ func (o GroupRemoteInfoGithubTeam) ToMap() (map[string]interface{}, error) { toSerialize["team_id"] = o.TeamId } toSerialize["team_slug"] = o.TeamSlug + if !IsNil(o.OrgName) { + toSerialize["org_name"] = o.OrgName + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -167,6 +204,7 @@ func (o *GroupRemoteInfoGithubTeam) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "team_id") delete(additionalProperties, "team_slug") + delete(additionalProperties, "org_name") o.AdditionalProperties = additionalProperties } diff --git a/model_group_remote_info_grafana_team.go b/model_group_remote_info_grafana_team.go new file mode 100644 index 0000000..e133fbd --- /dev/null +++ b/model_group_remote_info_grafana_team.go @@ -0,0 +1,170 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the GroupRemoteInfoGrafanaTeam type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupRemoteInfoGrafanaTeam{} + +// GroupRemoteInfoGrafanaTeam Remote info for Grafana team. +type GroupRemoteInfoGrafanaTeam struct { + // The ID of the team. + TeamId string `json:"team_id"` + AdditionalProperties map[string]interface{} +} + +type _GroupRemoteInfoGrafanaTeam GroupRemoteInfoGrafanaTeam + +// NewGroupRemoteInfoGrafanaTeam instantiates a new GroupRemoteInfoGrafanaTeam object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupRemoteInfoGrafanaTeam(teamId string) *GroupRemoteInfoGrafanaTeam { + this := GroupRemoteInfoGrafanaTeam{} + this.TeamId = teamId + return &this +} + +// NewGroupRemoteInfoGrafanaTeamWithDefaults instantiates a new GroupRemoteInfoGrafanaTeam object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupRemoteInfoGrafanaTeamWithDefaults() *GroupRemoteInfoGrafanaTeam { + this := GroupRemoteInfoGrafanaTeam{} + return &this +} + +// GetTeamId returns the TeamId field value +func (o *GroupRemoteInfoGrafanaTeam) GetTeamId() string { + if o == nil { + var ret string + return ret + } + + return o.TeamId +} + +// GetTeamIdOk returns a tuple with the TeamId field value +// and a boolean to check if the value has been set. +func (o *GroupRemoteInfoGrafanaTeam) GetTeamIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TeamId, true +} + +// SetTeamId sets field value +func (o *GroupRemoteInfoGrafanaTeam) SetTeamId(v string) { + o.TeamId = v +} + +func (o GroupRemoteInfoGrafanaTeam) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupRemoteInfoGrafanaTeam) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["team_id"] = o.TeamId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GroupRemoteInfoGrafanaTeam) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "team_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroupRemoteInfoGrafanaTeam := _GroupRemoteInfoGrafanaTeam{} + + err = json.Unmarshal(data, &varGroupRemoteInfoGrafanaTeam) + + if err != nil { + return err + } + + *o = GroupRemoteInfoGrafanaTeam(varGroupRemoteInfoGrafanaTeam) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "team_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGroupRemoteInfoGrafanaTeam struct { + value *GroupRemoteInfoGrafanaTeam + isSet bool +} + +func (v NullableGroupRemoteInfoGrafanaTeam) Get() *GroupRemoteInfoGrafanaTeam { + return v.value +} + +func (v *NullableGroupRemoteInfoGrafanaTeam) Set(val *GroupRemoteInfoGrafanaTeam) { + v.value = val + v.isSet = true +} + +func (v NullableGroupRemoteInfoGrafanaTeam) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupRemoteInfoGrafanaTeam) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupRemoteInfoGrafanaTeam(val *GroupRemoteInfoGrafanaTeam) *NullableGroupRemoteInfoGrafanaTeam { + return &NullableGroupRemoteInfoGrafanaTeam{value: val, isSet: true} +} + +func (v NullableGroupRemoteInfoGrafanaTeam) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupRemoteInfoGrafanaTeam) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_group_remote_info_twingate_group.go b/model_group_remote_info_twingate_group.go new file mode 100644 index 0000000..a2e356f --- /dev/null +++ b/model_group_remote_info_twingate_group.go @@ -0,0 +1,170 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the GroupRemoteInfoTwingateGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupRemoteInfoTwingateGroup{} + +// GroupRemoteInfoTwingateGroup Remote info for Twingate group. +type GroupRemoteInfoTwingateGroup struct { + // The id of the Twingate group. + GroupId string `json:"group_id"` + AdditionalProperties map[string]interface{} +} + +type _GroupRemoteInfoTwingateGroup GroupRemoteInfoTwingateGroup + +// NewGroupRemoteInfoTwingateGroup instantiates a new GroupRemoteInfoTwingateGroup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupRemoteInfoTwingateGroup(groupId string) *GroupRemoteInfoTwingateGroup { + this := GroupRemoteInfoTwingateGroup{} + this.GroupId = groupId + return &this +} + +// NewGroupRemoteInfoTwingateGroupWithDefaults instantiates a new GroupRemoteInfoTwingateGroup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupRemoteInfoTwingateGroupWithDefaults() *GroupRemoteInfoTwingateGroup { + this := GroupRemoteInfoTwingateGroup{} + return &this +} + +// GetGroupId returns the GroupId field value +func (o *GroupRemoteInfoTwingateGroup) GetGroupId() string { + if o == nil { + var ret string + return ret + } + + return o.GroupId +} + +// GetGroupIdOk returns a tuple with the GroupId field value +// and a boolean to check if the value has been set. +func (o *GroupRemoteInfoTwingateGroup) GetGroupIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.GroupId, true +} + +// SetGroupId sets field value +func (o *GroupRemoteInfoTwingateGroup) SetGroupId(v string) { + o.GroupId = v +} + +func (o GroupRemoteInfoTwingateGroup) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupRemoteInfoTwingateGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["group_id"] = o.GroupId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GroupRemoteInfoTwingateGroup) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "group_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroupRemoteInfoTwingateGroup := _GroupRemoteInfoTwingateGroup{} + + err = json.Unmarshal(data, &varGroupRemoteInfoTwingateGroup) + + if err != nil { + return err + } + + *o = GroupRemoteInfoTwingateGroup(varGroupRemoteInfoTwingateGroup) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGroupRemoteInfoTwingateGroup struct { + value *GroupRemoteInfoTwingateGroup + isSet bool +} + +func (v NullableGroupRemoteInfoTwingateGroup) Get() *GroupRemoteInfoTwingateGroup { + return v.value +} + +func (v *NullableGroupRemoteInfoTwingateGroup) Set(val *GroupRemoteInfoTwingateGroup) { + v.value = val + v.isSet = true +} + +func (v NullableGroupRemoteInfoTwingateGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupRemoteInfoTwingateGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupRemoteInfoTwingateGroup(val *GroupRemoteInfoTwingateGroup) *NullableGroupRemoteInfoTwingateGroup { + return &NullableGroupRemoteInfoTwingateGroup{value: val, isSet: true} +} + +func (v NullableGroupRemoteInfoTwingateGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupRemoteInfoTwingateGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_group_remote_info_twingate_group_synced.go b/model_group_remote_info_twingate_group_synced.go new file mode 100644 index 0000000..f1ad895 --- /dev/null +++ b/model_group_remote_info_twingate_group_synced.go @@ -0,0 +1,170 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the GroupRemoteInfoTwingateGroupSynced type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupRemoteInfoTwingateGroupSynced{} + +// GroupRemoteInfoTwingateGroupSynced Remote info for Twingate synced group. +type GroupRemoteInfoTwingateGroupSynced struct { + // The id of the Twingate synced group. + GroupId string `json:"group_id"` + AdditionalProperties map[string]interface{} +} + +type _GroupRemoteInfoTwingateGroupSynced GroupRemoteInfoTwingateGroupSynced + +// NewGroupRemoteInfoTwingateGroupSynced instantiates a new GroupRemoteInfoTwingateGroupSynced object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupRemoteInfoTwingateGroupSynced(groupId string) *GroupRemoteInfoTwingateGroupSynced { + this := GroupRemoteInfoTwingateGroupSynced{} + this.GroupId = groupId + return &this +} + +// NewGroupRemoteInfoTwingateGroupSyncedWithDefaults instantiates a new GroupRemoteInfoTwingateGroupSynced object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupRemoteInfoTwingateGroupSyncedWithDefaults() *GroupRemoteInfoTwingateGroupSynced { + this := GroupRemoteInfoTwingateGroupSynced{} + return &this +} + +// GetGroupId returns the GroupId field value +func (o *GroupRemoteInfoTwingateGroupSynced) GetGroupId() string { + if o == nil { + var ret string + return ret + } + + return o.GroupId +} + +// GetGroupIdOk returns a tuple with the GroupId field value +// and a boolean to check if the value has been set. +func (o *GroupRemoteInfoTwingateGroupSynced) GetGroupIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.GroupId, true +} + +// SetGroupId sets field value +func (o *GroupRemoteInfoTwingateGroupSynced) SetGroupId(v string) { + o.GroupId = v +} + +func (o GroupRemoteInfoTwingateGroupSynced) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupRemoteInfoTwingateGroupSynced) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["group_id"] = o.GroupId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GroupRemoteInfoTwingateGroupSynced) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "group_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroupRemoteInfoTwingateGroupSynced := _GroupRemoteInfoTwingateGroupSynced{} + + err = json.Unmarshal(data, &varGroupRemoteInfoTwingateGroupSynced) + + if err != nil { + return err + } + + *o = GroupRemoteInfoTwingateGroupSynced(varGroupRemoteInfoTwingateGroupSynced) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGroupRemoteInfoTwingateGroupSynced struct { + value *GroupRemoteInfoTwingateGroupSynced + isSet bool +} + +func (v NullableGroupRemoteInfoTwingateGroupSynced) Get() *GroupRemoteInfoTwingateGroupSynced { + return v.value +} + +func (v *NullableGroupRemoteInfoTwingateGroupSynced) Set(val *GroupRemoteInfoTwingateGroupSynced) { + v.value = val + v.isSet = true +} + +func (v NullableGroupRemoteInfoTwingateGroupSynced) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupRemoteInfoTwingateGroupSynced) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupRemoteInfoTwingateGroupSynced(val *GroupRemoteInfoTwingateGroupSynced) *NullableGroupRemoteInfoTwingateGroupSynced { + return &NullableGroupRemoteInfoTwingateGroupSynced{value: val, isSet: true} +} + +func (v NullableGroupRemoteInfoTwingateGroupSynced) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupRemoteInfoTwingateGroupSynced) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_group_remote_info_zendesk_group.go b/model_group_remote_info_zendesk_group.go new file mode 100644 index 0000000..73f2057 --- /dev/null +++ b/model_group_remote_info_zendesk_group.go @@ -0,0 +1,170 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the GroupRemoteInfoZendeskGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupRemoteInfoZendeskGroup{} + +// GroupRemoteInfoZendeskGroup Remote info for Zendesk group. +type GroupRemoteInfoZendeskGroup struct { + // The ID of the Zendesk group. + GroupId string `json:"group_id"` + AdditionalProperties map[string]interface{} +} + +type _GroupRemoteInfoZendeskGroup GroupRemoteInfoZendeskGroup + +// NewGroupRemoteInfoZendeskGroup instantiates a new GroupRemoteInfoZendeskGroup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupRemoteInfoZendeskGroup(groupId string) *GroupRemoteInfoZendeskGroup { + this := GroupRemoteInfoZendeskGroup{} + this.GroupId = groupId + return &this +} + +// NewGroupRemoteInfoZendeskGroupWithDefaults instantiates a new GroupRemoteInfoZendeskGroup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupRemoteInfoZendeskGroupWithDefaults() *GroupRemoteInfoZendeskGroup { + this := GroupRemoteInfoZendeskGroup{} + return &this +} + +// GetGroupId returns the GroupId field value +func (o *GroupRemoteInfoZendeskGroup) GetGroupId() string { + if o == nil { + var ret string + return ret + } + + return o.GroupId +} + +// GetGroupIdOk returns a tuple with the GroupId field value +// and a boolean to check if the value has been set. +func (o *GroupRemoteInfoZendeskGroup) GetGroupIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.GroupId, true +} + +// SetGroupId sets field value +func (o *GroupRemoteInfoZendeskGroup) SetGroupId(v string) { + o.GroupId = v +} + +func (o GroupRemoteInfoZendeskGroup) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupRemoteInfoZendeskGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["group_id"] = o.GroupId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GroupRemoteInfoZendeskGroup) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "group_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroupRemoteInfoZendeskGroup := _GroupRemoteInfoZendeskGroup{} + + err = json.Unmarshal(data, &varGroupRemoteInfoZendeskGroup) + + if err != nil { + return err + } + + *o = GroupRemoteInfoZendeskGroup(varGroupRemoteInfoZendeskGroup) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGroupRemoteInfoZendeskGroup struct { + value *GroupRemoteInfoZendeskGroup + isSet bool +} + +func (v NullableGroupRemoteInfoZendeskGroup) Get() *GroupRemoteInfoZendeskGroup { + return v.value +} + +func (v *NullableGroupRemoteInfoZendeskGroup) Set(val *GroupRemoteInfoZendeskGroup) { + v.value = val + v.isSet = true +} + +func (v NullableGroupRemoteInfoZendeskGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupRemoteInfoZendeskGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupRemoteInfoZendeskGroup(val *GroupRemoteInfoZendeskGroup) *NullableGroupRemoteInfoZendeskGroup { + return &NullableGroupRemoteInfoZendeskGroup{value: val, isSet: true} +} + +func (v NullableGroupRemoteInfoZendeskGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupRemoteInfoZendeskGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_group_remote_info_zendesk_organization.go b/model_group_remote_info_zendesk_organization.go new file mode 100644 index 0000000..eeb5992 --- /dev/null +++ b/model_group_remote_info_zendesk_organization.go @@ -0,0 +1,170 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the GroupRemoteInfoZendeskOrganization type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupRemoteInfoZendeskOrganization{} + +// GroupRemoteInfoZendeskOrganization Remote info for Zendesk organization. +type GroupRemoteInfoZendeskOrganization struct { + // The ID of the Zendesk organization. + OrganizationId string `json:"organization_id"` + AdditionalProperties map[string]interface{} +} + +type _GroupRemoteInfoZendeskOrganization GroupRemoteInfoZendeskOrganization + +// NewGroupRemoteInfoZendeskOrganization instantiates a new GroupRemoteInfoZendeskOrganization object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupRemoteInfoZendeskOrganization(organizationId string) *GroupRemoteInfoZendeskOrganization { + this := GroupRemoteInfoZendeskOrganization{} + this.OrganizationId = organizationId + return &this +} + +// NewGroupRemoteInfoZendeskOrganizationWithDefaults instantiates a new GroupRemoteInfoZendeskOrganization object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupRemoteInfoZendeskOrganizationWithDefaults() *GroupRemoteInfoZendeskOrganization { + this := GroupRemoteInfoZendeskOrganization{} + return &this +} + +// GetOrganizationId returns the OrganizationId field value +func (o *GroupRemoteInfoZendeskOrganization) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *GroupRemoteInfoZendeskOrganization) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *GroupRemoteInfoZendeskOrganization) SetOrganizationId(v string) { + o.OrganizationId = v +} + +func (o GroupRemoteInfoZendeskOrganization) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupRemoteInfoZendeskOrganization) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["organization_id"] = o.OrganizationId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GroupRemoteInfoZendeskOrganization) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "organization_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroupRemoteInfoZendeskOrganization := _GroupRemoteInfoZendeskOrganization{} + + err = json.Unmarshal(data, &varGroupRemoteInfoZendeskOrganization) + + if err != nil { + return err + } + + *o = GroupRemoteInfoZendeskOrganization(varGroupRemoteInfoZendeskOrganization) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "organization_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGroupRemoteInfoZendeskOrganization struct { + value *GroupRemoteInfoZendeskOrganization + isSet bool +} + +func (v NullableGroupRemoteInfoZendeskOrganization) Get() *GroupRemoteInfoZendeskOrganization { + return v.value +} + +func (v *NullableGroupRemoteInfoZendeskOrganization) Set(val *GroupRemoteInfoZendeskOrganization) { + v.value = val + v.isSet = true +} + +func (v NullableGroupRemoteInfoZendeskOrganization) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupRemoteInfoZendeskOrganization) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupRemoteInfoZendeskOrganization(val *GroupRemoteInfoZendeskOrganization) *NullableGroupRemoteInfoZendeskOrganization { + return &NullableGroupRemoteInfoZendeskOrganization{value: val, isSet: true} +} + +func (v NullableGroupRemoteInfoZendeskOrganization) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupRemoteInfoZendeskOrganization) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_group_type_enum.go b/model_group_type_enum.go index b5ba4b8..d479677 100644 --- a/model_group_type_enum.go +++ b/model_group_type_enum.go @@ -45,6 +45,12 @@ const ( GROUPTYPEENUM_ROOTLY_ON_CALL_SCHEDULE GroupTypeEnum = "ROOTLY_ON_CALL_SCHEDULE" GROUPTYPEENUM_DEVIN_GROUP GroupTypeEnum = "DEVIN_GROUP" GROUPTYPEENUM_GIT_HUB_ENTERPRISE_TEAM GroupTypeEnum = "GIT_HUB_ENTERPRISE_TEAM" + GROUPTYPEENUM_GRAFANA_TEAM GroupTypeEnum = "GRAFANA_TEAM" + GROUPTYPEENUM_CLICKHOUSE_ROLE GroupTypeEnum = "CLICKHOUSE_ROLE" + GROUPTYPEENUM_TWINGATE_GROUP GroupTypeEnum = "TWINGATE_GROUP" + GROUPTYPEENUM_TWINGATE_GROUP_SYNCED GroupTypeEnum = "TWINGATE_GROUP_SYNCED" + GROUPTYPEENUM_ZENDESK_GROUP GroupTypeEnum = "ZENDESK_GROUP" + GROUPTYPEENUM_ZENDESK_ORGANIZATION GroupTypeEnum = "ZENDESK_ORGANIZATION" ) // All allowed values of GroupTypeEnum enum @@ -73,6 +79,12 @@ var AllowedGroupTypeEnumEnumValues = []GroupTypeEnum{ "ROOTLY_ON_CALL_SCHEDULE", "DEVIN_GROUP", "GIT_HUB_ENTERPRISE_TEAM", + "GRAFANA_TEAM", + "CLICKHOUSE_ROLE", + "TWINGATE_GROUP", + "TWINGATE_GROUP_SYNCED", + "ZENDESK_GROUP", + "ZENDESK_ORGANIZATION", } func (v *GroupTypeEnum) UnmarshalJSON(src []byte) error { diff --git a/model_opal_node_query.go b/model_opal_node_query.go new file mode 100644 index 0000000..d42b21c --- /dev/null +++ b/model_opal_node_query.go @@ -0,0 +1,282 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the OpalNodeQuery type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OpalNodeQuery{} + +// OpalNodeQuery Request body for a NODE-type OpalQuery. Returns entities (users, resources, groups) matching the given filters. +type OpalNodeQuery struct { + Type string `json:"type"` + Query *OpalNodeQueryBody `json:"query,omitempty"` + // Maximum number of results to return. Defaults to 200. + First *int32 `json:"first,omitempty"` + // Cursor from a previous response to fetch the next page of results. + After *string `json:"after,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OpalNodeQuery OpalNodeQuery + +// NewOpalNodeQuery instantiates a new OpalNodeQuery object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOpalNodeQuery(type_ string) *OpalNodeQuery { + this := OpalNodeQuery{} + this.Type = type_ + return &this +} + +// NewOpalNodeQueryWithDefaults instantiates a new OpalNodeQuery object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOpalNodeQueryWithDefaults() *OpalNodeQuery { + this := OpalNodeQuery{} + return &this +} + +// GetType returns the Type field value +func (o *OpalNodeQuery) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *OpalNodeQuery) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *OpalNodeQuery) SetType(v string) { + o.Type = v +} + +// GetQuery returns the Query field value if set, zero value otherwise. +func (o *OpalNodeQuery) GetQuery() OpalNodeQueryBody { + if o == nil || IsNil(o.Query) { + var ret OpalNodeQueryBody + return ret + } + return *o.Query +} + +// GetQueryOk returns a tuple with the Query field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OpalNodeQuery) GetQueryOk() (*OpalNodeQueryBody, bool) { + if o == nil || IsNil(o.Query) { + return nil, false + } + return o.Query, true +} + +// HasQuery returns a boolean if a field has been set. +func (o *OpalNodeQuery) HasQuery() bool { + if o != nil && !IsNil(o.Query) { + return true + } + + return false +} + +// SetQuery gets a reference to the given OpalNodeQueryBody and assigns it to the Query field. +func (o *OpalNodeQuery) SetQuery(v OpalNodeQueryBody) { + o.Query = &v +} + +// GetFirst returns the First field value if set, zero value otherwise. +func (o *OpalNodeQuery) GetFirst() int32 { + if o == nil || IsNil(o.First) { + var ret int32 + return ret + } + return *o.First +} + +// GetFirstOk returns a tuple with the First field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OpalNodeQuery) GetFirstOk() (*int32, bool) { + if o == nil || IsNil(o.First) { + return nil, false + } + return o.First, true +} + +// HasFirst returns a boolean if a field has been set. +func (o *OpalNodeQuery) HasFirst() bool { + if o != nil && !IsNil(o.First) { + return true + } + + return false +} + +// SetFirst gets a reference to the given int32 and assigns it to the First field. +func (o *OpalNodeQuery) SetFirst(v int32) { + o.First = &v +} + +// GetAfter returns the After field value if set, zero value otherwise. +func (o *OpalNodeQuery) GetAfter() string { + if o == nil || IsNil(o.After) { + var ret string + return ret + } + return *o.After +} + +// GetAfterOk returns a tuple with the After field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OpalNodeQuery) GetAfterOk() (*string, bool) { + if o == nil || IsNil(o.After) { + return nil, false + } + return o.After, true +} + +// HasAfter returns a boolean if a field has been set. +func (o *OpalNodeQuery) HasAfter() bool { + if o != nil && !IsNil(o.After) { + return true + } + + return false +} + +// SetAfter gets a reference to the given string and assigns it to the After field. +func (o *OpalNodeQuery) SetAfter(v string) { + o.After = &v +} + +func (o OpalNodeQuery) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OpalNodeQuery) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.Query) { + toSerialize["query"] = o.Query + } + if !IsNil(o.First) { + toSerialize["first"] = o.First + } + if !IsNil(o.After) { + toSerialize["after"] = o.After + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OpalNodeQuery) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOpalNodeQuery := _OpalNodeQuery{} + + err = json.Unmarshal(data, &varOpalNodeQuery) + + if err != nil { + return err + } + + *o = OpalNodeQuery(varOpalNodeQuery) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "query") + delete(additionalProperties, "first") + delete(additionalProperties, "after") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOpalNodeQuery struct { + value *OpalNodeQuery + isSet bool +} + +func (v NullableOpalNodeQuery) Get() *OpalNodeQuery { + return v.value +} + +func (v *NullableOpalNodeQuery) Set(val *OpalNodeQuery) { + v.value = val + v.isSet = true +} + +func (v NullableOpalNodeQuery) IsSet() bool { + return v.isSet +} + +func (v *NullableOpalNodeQuery) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOpalNodeQuery(val *OpalNodeQuery) *NullableOpalNodeQuery { + return &NullableOpalNodeQuery{value: val, isSet: true} +} + +func (v NullableOpalNodeQuery) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOpalNodeQuery) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_opal_node_query_body.go b/model_opal_node_query_body.go new file mode 100644 index 0000000..056ff5e --- /dev/null +++ b/model_opal_node_query_body.go @@ -0,0 +1,193 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" +) + +// checks if the OpalNodeQueryBody type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OpalNodeQueryBody{} + +// OpalNodeQueryBody The filter body for a NODE-type OpalQuery. +type OpalNodeQueryBody struct { + NodeFilters *AccessEntityFilters `json:"nodeFilters,omitempty"` + AccessFilters *AccessRelationshipFilters `json:"accessFilters,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OpalNodeQueryBody OpalNodeQueryBody + +// NewOpalNodeQueryBody instantiates a new OpalNodeQueryBody object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOpalNodeQueryBody() *OpalNodeQueryBody { + this := OpalNodeQueryBody{} + return &this +} + +// NewOpalNodeQueryBodyWithDefaults instantiates a new OpalNodeQueryBody object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOpalNodeQueryBodyWithDefaults() *OpalNodeQueryBody { + this := OpalNodeQueryBody{} + return &this +} + +// GetNodeFilters returns the NodeFilters field value if set, zero value otherwise. +func (o *OpalNodeQueryBody) GetNodeFilters() AccessEntityFilters { + if o == nil || IsNil(o.NodeFilters) { + var ret AccessEntityFilters + return ret + } + return *o.NodeFilters +} + +// GetNodeFiltersOk returns a tuple with the NodeFilters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OpalNodeQueryBody) GetNodeFiltersOk() (*AccessEntityFilters, bool) { + if o == nil || IsNil(o.NodeFilters) { + return nil, false + } + return o.NodeFilters, true +} + +// HasNodeFilters returns a boolean if a field has been set. +func (o *OpalNodeQueryBody) HasNodeFilters() bool { + if o != nil && !IsNil(o.NodeFilters) { + return true + } + + return false +} + +// SetNodeFilters gets a reference to the given AccessEntityFilters and assigns it to the NodeFilters field. +func (o *OpalNodeQueryBody) SetNodeFilters(v AccessEntityFilters) { + o.NodeFilters = &v +} + +// GetAccessFilters returns the AccessFilters field value if set, zero value otherwise. +func (o *OpalNodeQueryBody) GetAccessFilters() AccessRelationshipFilters { + if o == nil || IsNil(o.AccessFilters) { + var ret AccessRelationshipFilters + return ret + } + return *o.AccessFilters +} + +// GetAccessFiltersOk returns a tuple with the AccessFilters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OpalNodeQueryBody) GetAccessFiltersOk() (*AccessRelationshipFilters, bool) { + if o == nil || IsNil(o.AccessFilters) { + return nil, false + } + return o.AccessFilters, true +} + +// HasAccessFilters returns a boolean if a field has been set. +func (o *OpalNodeQueryBody) HasAccessFilters() bool { + if o != nil && !IsNil(o.AccessFilters) { + return true + } + + return false +} + +// SetAccessFilters gets a reference to the given AccessRelationshipFilters and assigns it to the AccessFilters field. +func (o *OpalNodeQueryBody) SetAccessFilters(v AccessRelationshipFilters) { + o.AccessFilters = &v +} + +func (o OpalNodeQueryBody) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OpalNodeQueryBody) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NodeFilters) { + toSerialize["nodeFilters"] = o.NodeFilters + } + if !IsNil(o.AccessFilters) { + toSerialize["accessFilters"] = o.AccessFilters + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OpalNodeQueryBody) UnmarshalJSON(data []byte) (err error) { + varOpalNodeQueryBody := _OpalNodeQueryBody{} + + err = json.Unmarshal(data, &varOpalNodeQueryBody) + + if err != nil { + return err + } + + *o = OpalNodeQueryBody(varOpalNodeQueryBody) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "nodeFilters") + delete(additionalProperties, "accessFilters") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOpalNodeQueryBody struct { + value *OpalNodeQueryBody + isSet bool +} + +func (v NullableOpalNodeQueryBody) Get() *OpalNodeQueryBody { + return v.value +} + +func (v *NullableOpalNodeQueryBody) Set(val *OpalNodeQueryBody) { + v.value = val + v.isSet = true +} + +func (v NullableOpalNodeQueryBody) IsSet() bool { + return v.isSet +} + +func (v *NullableOpalNodeQueryBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOpalNodeQueryBody(val *OpalNodeQueryBody) *NullableOpalNodeQueryBody { + return &NullableOpalNodeQueryBody{value: val, isSet: true} +} + +func (v NullableOpalNodeQueryBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOpalNodeQueryBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_opal_node_query_results.go b/model_opal_node_query_results.go new file mode 100644 index 0000000..1add873 --- /dev/null +++ b/model_opal_node_query_results.go @@ -0,0 +1,228 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the OpalNodeQueryResults type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OpalNodeQueryResults{} + +// OpalNodeQueryResults Paginated results of a NODE-type OpalQuery — one edge per matched entity (user, resource, or group). +type OpalNodeQueryResults struct { + Type string `json:"type"` + // List of matched entities. + Edges []OpalQueryResultEdge `json:"edges"` + PageInfo PageInfo `json:"pageInfo"` + AdditionalProperties map[string]interface{} +} + +type _OpalNodeQueryResults OpalNodeQueryResults + +// NewOpalNodeQueryResults instantiates a new OpalNodeQueryResults object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOpalNodeQueryResults(type_ string, edges []OpalQueryResultEdge, pageInfo PageInfo) *OpalNodeQueryResults { + this := OpalNodeQueryResults{} + this.Type = type_ + this.Edges = edges + this.PageInfo = pageInfo + return &this +} + +// NewOpalNodeQueryResultsWithDefaults instantiates a new OpalNodeQueryResults object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOpalNodeQueryResultsWithDefaults() *OpalNodeQueryResults { + this := OpalNodeQueryResults{} + return &this +} + +// GetType returns the Type field value +func (o *OpalNodeQueryResults) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *OpalNodeQueryResults) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *OpalNodeQueryResults) SetType(v string) { + o.Type = v +} + +// GetEdges returns the Edges field value +func (o *OpalNodeQueryResults) GetEdges() []OpalQueryResultEdge { + if o == nil { + var ret []OpalQueryResultEdge + return ret + } + + return o.Edges +} + +// GetEdgesOk returns a tuple with the Edges field value +// and a boolean to check if the value has been set. +func (o *OpalNodeQueryResults) GetEdgesOk() ([]OpalQueryResultEdge, bool) { + if o == nil { + return nil, false + } + return o.Edges, true +} + +// SetEdges sets field value +func (o *OpalNodeQueryResults) SetEdges(v []OpalQueryResultEdge) { + o.Edges = v +} + +// GetPageInfo returns the PageInfo field value +func (o *OpalNodeQueryResults) GetPageInfo() PageInfo { + if o == nil { + var ret PageInfo + return ret + } + + return o.PageInfo +} + +// GetPageInfoOk returns a tuple with the PageInfo field value +// and a boolean to check if the value has been set. +func (o *OpalNodeQueryResults) GetPageInfoOk() (*PageInfo, bool) { + if o == nil { + return nil, false + } + return &o.PageInfo, true +} + +// SetPageInfo sets field value +func (o *OpalNodeQueryResults) SetPageInfo(v PageInfo) { + o.PageInfo = v +} + +func (o OpalNodeQueryResults) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OpalNodeQueryResults) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["edges"] = o.Edges + toSerialize["pageInfo"] = o.PageInfo + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OpalNodeQueryResults) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "edges", + "pageInfo", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOpalNodeQueryResults := _OpalNodeQueryResults{} + + err = json.Unmarshal(data, &varOpalNodeQueryResults) + + if err != nil { + return err + } + + *o = OpalNodeQueryResults(varOpalNodeQueryResults) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "edges") + delete(additionalProperties, "pageInfo") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOpalNodeQueryResults struct { + value *OpalNodeQueryResults + isSet bool +} + +func (v NullableOpalNodeQueryResults) Get() *OpalNodeQueryResults { + return v.value +} + +func (v *NullableOpalNodeQueryResults) Set(val *OpalNodeQueryResults) { + v.value = val + v.isSet = true +} + +func (v NullableOpalNodeQueryResults) IsSet() bool { + return v.isSet +} + +func (v *NullableOpalNodeQueryResults) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOpalNodeQueryResults(val *OpalNodeQueryResults) *NullableOpalNodeQueryResults { + return &NullableOpalNodeQueryResults{value: val, isSet: true} +} + +func (v NullableOpalNodeQueryResults) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOpalNodeQueryResults) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_opal_query_result_edge.go b/model_opal_query_result_edge.go new file mode 100644 index 0000000..39db8aa --- /dev/null +++ b/model_opal_query_result_edge.go @@ -0,0 +1,199 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the OpalQueryResultEdge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OpalQueryResultEdge{} + +// OpalQueryResultEdge A single result edge from an OpalQuery, containing the matched entity and its pagination cursor. +type OpalQueryResultEdge struct { + Node OpalQueryResultNode `json:"node"` + // Opaque cursor for this entity, used for pagination. + Cursor string `json:"cursor"` + AdditionalProperties map[string]interface{} +} + +type _OpalQueryResultEdge OpalQueryResultEdge + +// NewOpalQueryResultEdge instantiates a new OpalQueryResultEdge object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOpalQueryResultEdge(node OpalQueryResultNode, cursor string) *OpalQueryResultEdge { + this := OpalQueryResultEdge{} + this.Node = node + this.Cursor = cursor + return &this +} + +// NewOpalQueryResultEdgeWithDefaults instantiates a new OpalQueryResultEdge object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOpalQueryResultEdgeWithDefaults() *OpalQueryResultEdge { + this := OpalQueryResultEdge{} + return &this +} + +// GetNode returns the Node field value +func (o *OpalQueryResultEdge) GetNode() OpalQueryResultNode { + if o == nil { + var ret OpalQueryResultNode + return ret + } + + return o.Node +} + +// GetNodeOk returns a tuple with the Node field value +// and a boolean to check if the value has been set. +func (o *OpalQueryResultEdge) GetNodeOk() (*OpalQueryResultNode, bool) { + if o == nil { + return nil, false + } + return &o.Node, true +} + +// SetNode sets field value +func (o *OpalQueryResultEdge) SetNode(v OpalQueryResultNode) { + o.Node = v +} + +// GetCursor returns the Cursor field value +func (o *OpalQueryResultEdge) GetCursor() string { + if o == nil { + var ret string + return ret + } + + return o.Cursor +} + +// GetCursorOk returns a tuple with the Cursor field value +// and a boolean to check if the value has been set. +func (o *OpalQueryResultEdge) GetCursorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Cursor, true +} + +// SetCursor sets field value +func (o *OpalQueryResultEdge) SetCursor(v string) { + o.Cursor = v +} + +func (o OpalQueryResultEdge) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OpalQueryResultEdge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["node"] = o.Node + toSerialize["cursor"] = o.Cursor + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OpalQueryResultEdge) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "node", + "cursor", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOpalQueryResultEdge := _OpalQueryResultEdge{} + + err = json.Unmarshal(data, &varOpalQueryResultEdge) + + if err != nil { + return err + } + + *o = OpalQueryResultEdge(varOpalQueryResultEdge) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "node") + delete(additionalProperties, "cursor") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOpalQueryResultEdge struct { + value *OpalQueryResultEdge + isSet bool +} + +func (v NullableOpalQueryResultEdge) Get() *OpalQueryResultEdge { + return v.value +} + +func (v *NullableOpalQueryResultEdge) Set(val *OpalQueryResultEdge) { + v.value = val + v.isSet = true +} + +func (v NullableOpalQueryResultEdge) IsSet() bool { + return v.isSet +} + +func (v *NullableOpalQueryResultEdge) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOpalQueryResultEdge(val *OpalQueryResultEdge) *NullableOpalQueryResultEdge { + return &NullableOpalQueryResultEdge{value: val, isSet: true} +} + +func (v NullableOpalQueryResultEdge) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOpalQueryResultEdge) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_opal_query_result_node.go b/model_opal_query_result_node.go new file mode 100644 index 0000000..9269180 --- /dev/null +++ b/model_opal_query_result_node.go @@ -0,0 +1,259 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the OpalQueryResultNode type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OpalQueryResultNode{} + +// OpalQueryResultNode A matched entity from an OpalQuery result. +type OpalQueryResultNode struct { + // The entity's unique identifier. + Id string `json:"id"` + // The display name of the entity. + Name string `json:"name"` + // The top-level entity type. + EntityType string `json:"entityType"` + EntityItemType EntityItemTypeEnum `json:"entityItemType"` + AdditionalProperties map[string]interface{} +} + +type _OpalQueryResultNode OpalQueryResultNode + +// NewOpalQueryResultNode instantiates a new OpalQueryResultNode object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOpalQueryResultNode(id string, name string, entityType string, entityItemType EntityItemTypeEnum) *OpalQueryResultNode { + this := OpalQueryResultNode{} + this.Id = id + this.Name = name + this.EntityType = entityType + this.EntityItemType = entityItemType + return &this +} + +// NewOpalQueryResultNodeWithDefaults instantiates a new OpalQueryResultNode object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOpalQueryResultNodeWithDefaults() *OpalQueryResultNode { + this := OpalQueryResultNode{} + return &this +} + +// GetId returns the Id field value +func (o *OpalQueryResultNode) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *OpalQueryResultNode) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *OpalQueryResultNode) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *OpalQueryResultNode) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *OpalQueryResultNode) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *OpalQueryResultNode) SetName(v string) { + o.Name = v +} + +// GetEntityType returns the EntityType field value +func (o *OpalQueryResultNode) GetEntityType() string { + if o == nil { + var ret string + return ret + } + + return o.EntityType +} + +// GetEntityTypeOk returns a tuple with the EntityType field value +// and a boolean to check if the value has been set. +func (o *OpalQueryResultNode) GetEntityTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EntityType, true +} + +// SetEntityType sets field value +func (o *OpalQueryResultNode) SetEntityType(v string) { + o.EntityType = v +} + +// GetEntityItemType returns the EntityItemType field value +func (o *OpalQueryResultNode) GetEntityItemType() EntityItemTypeEnum { + if o == nil { + var ret EntityItemTypeEnum + return ret + } + + return o.EntityItemType +} + +// GetEntityItemTypeOk returns a tuple with the EntityItemType field value +// and a boolean to check if the value has been set. +func (o *OpalQueryResultNode) GetEntityItemTypeOk() (*EntityItemTypeEnum, bool) { + if o == nil { + return nil, false + } + return &o.EntityItemType, true +} + +// SetEntityItemType sets field value +func (o *OpalQueryResultNode) SetEntityItemType(v EntityItemTypeEnum) { + o.EntityItemType = v +} + +func (o OpalQueryResultNode) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OpalQueryResultNode) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["entityType"] = o.EntityType + toSerialize["entityItemType"] = o.EntityItemType + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OpalQueryResultNode) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "entityType", + "entityItemType", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOpalQueryResultNode := _OpalQueryResultNode{} + + err = json.Unmarshal(data, &varOpalQueryResultNode) + + if err != nil { + return err + } + + *o = OpalQueryResultNode(varOpalQueryResultNode) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "entityType") + delete(additionalProperties, "entityItemType") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOpalQueryResultNode struct { + value *OpalQueryResultNode + isSet bool +} + +func (v NullableOpalQueryResultNode) Get() *OpalQueryResultNode { + return v.value +} + +func (v *NullableOpalQueryResultNode) Set(val *OpalQueryResultNode) { + v.value = val + v.isSet = true +} + +func (v NullableOpalQueryResultNode) IsSet() bool { + return v.isSet +} + +func (v *NullableOpalQueryResultNode) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOpalQueryResultNode(val *OpalQueryResultNode) *NullableOpalQueryResultNode { + return &NullableOpalQueryResultNode{value: val, isSet: true} +} + +func (v NullableOpalQueryResultNode) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOpalQueryResultNode) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_opal_query_results.go b/model_opal_query_results.go new file mode 100644 index 0000000..2f5a1a4 --- /dev/null +++ b/model_opal_query_results.go @@ -0,0 +1,228 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the OpalQueryResults type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OpalQueryResults{} + +// OpalQueryResults Paginated results of an OpalQuery. The `type` field discriminates which result schema applies and mirrors the `type` field on the request. +type OpalQueryResults struct { + Type string `json:"type"` + // List of matched entities. + Edges []OpalQueryResultEdge `json:"edges"` + PageInfo PageInfo `json:"pageInfo"` + AdditionalProperties map[string]interface{} +} + +type _OpalQueryResults OpalQueryResults + +// NewOpalQueryResults instantiates a new OpalQueryResults object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOpalQueryResults(type_ string, edges []OpalQueryResultEdge, pageInfo PageInfo) *OpalQueryResults { + this := OpalQueryResults{} + this.Type = type_ + this.Edges = edges + this.PageInfo = pageInfo + return &this +} + +// NewOpalQueryResultsWithDefaults instantiates a new OpalQueryResults object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOpalQueryResultsWithDefaults() *OpalQueryResults { + this := OpalQueryResults{} + return &this +} + +// GetType returns the Type field value +func (o *OpalQueryResults) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *OpalQueryResults) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *OpalQueryResults) SetType(v string) { + o.Type = v +} + +// GetEdges returns the Edges field value +func (o *OpalQueryResults) GetEdges() []OpalQueryResultEdge { + if o == nil { + var ret []OpalQueryResultEdge + return ret + } + + return o.Edges +} + +// GetEdgesOk returns a tuple with the Edges field value +// and a boolean to check if the value has been set. +func (o *OpalQueryResults) GetEdgesOk() ([]OpalQueryResultEdge, bool) { + if o == nil { + return nil, false + } + return o.Edges, true +} + +// SetEdges sets field value +func (o *OpalQueryResults) SetEdges(v []OpalQueryResultEdge) { + o.Edges = v +} + +// GetPageInfo returns the PageInfo field value +func (o *OpalQueryResults) GetPageInfo() PageInfo { + if o == nil { + var ret PageInfo + return ret + } + + return o.PageInfo +} + +// GetPageInfoOk returns a tuple with the PageInfo field value +// and a boolean to check if the value has been set. +func (o *OpalQueryResults) GetPageInfoOk() (*PageInfo, bool) { + if o == nil { + return nil, false + } + return &o.PageInfo, true +} + +// SetPageInfo sets field value +func (o *OpalQueryResults) SetPageInfo(v PageInfo) { + o.PageInfo = v +} + +func (o OpalQueryResults) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OpalQueryResults) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["edges"] = o.Edges + toSerialize["pageInfo"] = o.PageInfo + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OpalQueryResults) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "edges", + "pageInfo", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOpalQueryResults := _OpalQueryResults{} + + err = json.Unmarshal(data, &varOpalQueryResults) + + if err != nil { + return err + } + + *o = OpalQueryResults(varOpalQueryResults) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "edges") + delete(additionalProperties, "pageInfo") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOpalQueryResults struct { + value *OpalQueryResults + isSet bool +} + +func (v NullableOpalQueryResults) Get() *OpalQueryResults { + return v.value +} + +func (v *NullableOpalQueryResults) Set(val *OpalQueryResults) { + v.value = val + v.isSet = true +} + +func (v NullableOpalQueryResults) IsSet() bool { + return v.isSet +} + +func (v *NullableOpalQueryResults) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOpalQueryResults(val *OpalQueryResults) *NullableOpalQueryResults { + return &NullableOpalQueryResults{value: val, isSet: true} +} + +func (v NullableOpalQueryResults) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOpalQueryResults) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_paginated_access_rules_list.go b/model_paginated_access_rules_list.go new file mode 100644 index 0000000..14e2b40 --- /dev/null +++ b/model_paginated_access_rules_list.go @@ -0,0 +1,245 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the PaginatedAccessRulesList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedAccessRulesList{} + +// PaginatedAccessRulesList struct for PaginatedAccessRulesList +type PaginatedAccessRulesList struct { + // The cursor with which to continue pagination if additional result pages exist. + Next *string `json:"next,omitempty"` + // The cursor used to retrieve the previous page of results. + Previous *string `json:"previous,omitempty"` + Results []AccessRule `json:"results"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedAccessRulesList PaginatedAccessRulesList + +// NewPaginatedAccessRulesList instantiates a new PaginatedAccessRulesList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedAccessRulesList(results []AccessRule) *PaginatedAccessRulesList { + this := PaginatedAccessRulesList{} + this.Results = results + return &this +} + +// NewPaginatedAccessRulesListWithDefaults instantiates a new PaginatedAccessRulesList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedAccessRulesListWithDefaults() *PaginatedAccessRulesList { + this := PaginatedAccessRulesList{} + return &this +} + +// GetNext returns the Next field value if set, zero value otherwise. +func (o *PaginatedAccessRulesList) GetNext() string { + if o == nil || IsNil(o.Next) { + var ret string + return ret + } + return *o.Next +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedAccessRulesList) GetNextOk() (*string, bool) { + if o == nil || IsNil(o.Next) { + return nil, false + } + return o.Next, true +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedAccessRulesList) HasNext() bool { + if o != nil && !IsNil(o.Next) { + return true + } + + return false +} + +// SetNext gets a reference to the given string and assigns it to the Next field. +func (o *PaginatedAccessRulesList) SetNext(v string) { + o.Next = &v +} + +// GetPrevious returns the Previous field value if set, zero value otherwise. +func (o *PaginatedAccessRulesList) GetPrevious() string { + if o == nil || IsNil(o.Previous) { + var ret string + return ret + } + return *o.Previous +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedAccessRulesList) GetPreviousOk() (*string, bool) { + if o == nil || IsNil(o.Previous) { + return nil, false + } + return o.Previous, true +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedAccessRulesList) HasPrevious() bool { + if o != nil && !IsNil(o.Previous) { + return true + } + + return false +} + +// SetPrevious gets a reference to the given string and assigns it to the Previous field. +func (o *PaginatedAccessRulesList) SetPrevious(v string) { + o.Previous = &v +} + +// GetResults returns the Results field value +func (o *PaginatedAccessRulesList) GetResults() []AccessRule { + if o == nil { + var ret []AccessRule + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *PaginatedAccessRulesList) GetResultsOk() ([]AccessRule, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *PaginatedAccessRulesList) SetResults(v []AccessRule) { + o.Results = v +} + +func (o PaginatedAccessRulesList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedAccessRulesList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Next) { + toSerialize["next"] = o.Next + } + if !IsNil(o.Previous) { + toSerialize["previous"] = o.Previous + } + toSerialize["results"] = o.Results + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedAccessRulesList) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaginatedAccessRulesList := _PaginatedAccessRulesList{} + + err = json.Unmarshal(data, &varPaginatedAccessRulesList) + + if err != nil { + return err + } + + *o = PaginatedAccessRulesList(varPaginatedAccessRulesList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedAccessRulesList struct { + value *PaginatedAccessRulesList + isSet bool +} + +func (v NullablePaginatedAccessRulesList) Get() *PaginatedAccessRulesList { + return v.value +} + +func (v *NullablePaginatedAccessRulesList) Set(val *PaginatedAccessRulesList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedAccessRulesList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedAccessRulesList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedAccessRulesList(val *PaginatedAccessRulesList) *NullablePaginatedAccessRulesList { + return &NullablePaginatedAccessRulesList{value: val, isSet: true} +} + +func (v NullablePaginatedAccessRulesList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedAccessRulesList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_paginated_tokens_list.go b/model_paginated_tokens_list.go new file mode 100644 index 0000000..7684d16 --- /dev/null +++ b/model_paginated_tokens_list.go @@ -0,0 +1,245 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the PaginatedTokensList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedTokensList{} + +// PaginatedTokensList struct for PaginatedTokensList +type PaginatedTokensList struct { + // The cursor with which to continue pagination if additional result pages exist. + Next *string `json:"next,omitempty"` + // The cursor used to obtain the current result page. + Previous *string `json:"previous,omitempty"` + Results []Token `json:"results"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedTokensList PaginatedTokensList + +// NewPaginatedTokensList instantiates a new PaginatedTokensList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedTokensList(results []Token) *PaginatedTokensList { + this := PaginatedTokensList{} + this.Results = results + return &this +} + +// NewPaginatedTokensListWithDefaults instantiates a new PaginatedTokensList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedTokensListWithDefaults() *PaginatedTokensList { + this := PaginatedTokensList{} + return &this +} + +// GetNext returns the Next field value if set, zero value otherwise. +func (o *PaginatedTokensList) GetNext() string { + if o == nil || IsNil(o.Next) { + var ret string + return ret + } + return *o.Next +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTokensList) GetNextOk() (*string, bool) { + if o == nil || IsNil(o.Next) { + return nil, false + } + return o.Next, true +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedTokensList) HasNext() bool { + if o != nil && !IsNil(o.Next) { + return true + } + + return false +} + +// SetNext gets a reference to the given string and assigns it to the Next field. +func (o *PaginatedTokensList) SetNext(v string) { + o.Next = &v +} + +// GetPrevious returns the Previous field value if set, zero value otherwise. +func (o *PaginatedTokensList) GetPrevious() string { + if o == nil || IsNil(o.Previous) { + var ret string + return ret + } + return *o.Previous +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTokensList) GetPreviousOk() (*string, bool) { + if o == nil || IsNil(o.Previous) { + return nil, false + } + return o.Previous, true +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedTokensList) HasPrevious() bool { + if o != nil && !IsNil(o.Previous) { + return true + } + + return false +} + +// SetPrevious gets a reference to the given string and assigns it to the Previous field. +func (o *PaginatedTokensList) SetPrevious(v string) { + o.Previous = &v +} + +// GetResults returns the Results field value +func (o *PaginatedTokensList) GetResults() []Token { + if o == nil { + var ret []Token + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *PaginatedTokensList) GetResultsOk() ([]Token, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *PaginatedTokensList) SetResults(v []Token) { + o.Results = v +} + +func (o PaginatedTokensList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedTokensList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Next) { + toSerialize["next"] = o.Next + } + if !IsNil(o.Previous) { + toSerialize["previous"] = o.Previous + } + toSerialize["results"] = o.Results + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedTokensList) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaginatedTokensList := _PaginatedTokensList{} + + err = json.Unmarshal(data, &varPaginatedTokensList) + + if err != nil { + return err + } + + *o = PaginatedTokensList(varPaginatedTokensList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedTokensList struct { + value *PaginatedTokensList + isSet bool +} + +func (v NullablePaginatedTokensList) Get() *PaginatedTokensList { + return v.value +} + +func (v *NullablePaginatedTokensList) Set(val *PaginatedTokensList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedTokensList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedTokensList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedTokensList(val *PaginatedTokensList) *NullablePaginatedTokensList { + return &NullablePaginatedTokensList{value: val, isSet: true} +} + +func (v NullablePaginatedTokensList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedTokensList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_resource.go b/model_resource.go index 40c4743..64ed580 100644 --- a/model_resource.go +++ b/model_resource.go @@ -66,6 +66,7 @@ type Resource struct { // A list of configurations for requests to this resource. RequestConfigurations []RequestConfiguration `json:"request_configurations,omitempty"` // A list of configurations for requests to this resource. Deprecated in favor of `request_configurations`. + // Deprecated RequestConfigurationList []RequestConfiguration `json:"request_configuration_list,omitempty"` TicketPropagation *TicketPropagationConfiguration `json:"ticket_propagation,omitempty"` // Custom request notification sent upon request approval. @@ -806,6 +807,7 @@ func (o *Resource) SetRequestConfigurations(v []RequestConfiguration) { } // GetRequestConfigurationList returns the RequestConfigurationList field value if set, zero value otherwise. +// Deprecated func (o *Resource) GetRequestConfigurationList() []RequestConfiguration { if o == nil || IsNil(o.RequestConfigurationList) { var ret []RequestConfiguration @@ -816,6 +818,7 @@ func (o *Resource) GetRequestConfigurationList() []RequestConfiguration { // GetRequestConfigurationListOk returns a tuple with the RequestConfigurationList field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated func (o *Resource) GetRequestConfigurationListOk() ([]RequestConfiguration, bool) { if o == nil || IsNil(o.RequestConfigurationList) { return nil, false @@ -833,6 +836,7 @@ func (o *Resource) HasRequestConfigurationList() bool { } // SetRequestConfigurationList gets a reference to the given []RequestConfiguration and assigns it to the RequestConfigurationList field. +// Deprecated func (o *Resource) SetRequestConfigurationList(v []RequestConfiguration) { o.RequestConfigurationList = v } diff --git a/model_resource_custom_access_level_list.go b/model_resource_custom_access_level_list.go new file mode 100644 index 0000000..0eb7359 --- /dev/null +++ b/model_resource_custom_access_level_list.go @@ -0,0 +1,169 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the ResourceCustomAccessLevelList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceCustomAccessLevelList{} + +// ResourceCustomAccessLevelList A list of custom access levels. +type ResourceCustomAccessLevelList struct { + CustomAccessLevels []ResourceCustomAccessLevelResponse `json:"custom_access_levels"` + AdditionalProperties map[string]interface{} +} + +type _ResourceCustomAccessLevelList ResourceCustomAccessLevelList + +// NewResourceCustomAccessLevelList instantiates a new ResourceCustomAccessLevelList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceCustomAccessLevelList(customAccessLevels []ResourceCustomAccessLevelResponse) *ResourceCustomAccessLevelList { + this := ResourceCustomAccessLevelList{} + this.CustomAccessLevels = customAccessLevels + return &this +} + +// NewResourceCustomAccessLevelListWithDefaults instantiates a new ResourceCustomAccessLevelList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceCustomAccessLevelListWithDefaults() *ResourceCustomAccessLevelList { + this := ResourceCustomAccessLevelList{} + return &this +} + +// GetCustomAccessLevels returns the CustomAccessLevels field value +func (o *ResourceCustomAccessLevelList) GetCustomAccessLevels() []ResourceCustomAccessLevelResponse { + if o == nil { + var ret []ResourceCustomAccessLevelResponse + return ret + } + + return o.CustomAccessLevels +} + +// GetCustomAccessLevelsOk returns a tuple with the CustomAccessLevels field value +// and a boolean to check if the value has been set. +func (o *ResourceCustomAccessLevelList) GetCustomAccessLevelsOk() ([]ResourceCustomAccessLevelResponse, bool) { + if o == nil { + return nil, false + } + return o.CustomAccessLevels, true +} + +// SetCustomAccessLevels sets field value +func (o *ResourceCustomAccessLevelList) SetCustomAccessLevels(v []ResourceCustomAccessLevelResponse) { + o.CustomAccessLevels = v +} + +func (o ResourceCustomAccessLevelList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceCustomAccessLevelList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["custom_access_levels"] = o.CustomAccessLevels + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ResourceCustomAccessLevelList) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "custom_access_levels", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResourceCustomAccessLevelList := _ResourceCustomAccessLevelList{} + + err = json.Unmarshal(data, &varResourceCustomAccessLevelList) + + if err != nil { + return err + } + + *o = ResourceCustomAccessLevelList(varResourceCustomAccessLevelList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "custom_access_levels") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableResourceCustomAccessLevelList struct { + value *ResourceCustomAccessLevelList + isSet bool +} + +func (v NullableResourceCustomAccessLevelList) Get() *ResourceCustomAccessLevelList { + return v.value +} + +func (v *NullableResourceCustomAccessLevelList) Set(val *ResourceCustomAccessLevelList) { + v.value = val + v.isSet = true +} + +func (v NullableResourceCustomAccessLevelList) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceCustomAccessLevelList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceCustomAccessLevelList(val *ResourceCustomAccessLevelList) *NullableResourceCustomAccessLevelList { + return &NullableResourceCustomAccessLevelList{value: val, isSet: true} +} + +func (v NullableResourceCustomAccessLevelList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceCustomAccessLevelList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_resource_custom_access_level_response.go b/model_resource_custom_access_level_response.go new file mode 100644 index 0000000..6b6e8a8 --- /dev/null +++ b/model_resource_custom_access_level_response.go @@ -0,0 +1,448 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the ResourceCustomAccessLevelResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceCustomAccessLevelResponse{} + +// ResourceCustomAccessLevelResponse A custom access level for a resource. +type ResourceCustomAccessLevelResponse struct { + // The unique ID of the custom access level. + ResourceCustomAccessLevelId string `json:"resource_custom_access_level_id"` + // The resource this access level belongs to. + ResourceId string `json:"resource_id"` + AccessLevel ResourceAccessLevel `json:"access_level"` + // The policy document for this access level. + Policy *string `json:"policy,omitempty"` + // Whether this role is requestable. + RequestableByDefault bool `json:"requestable_by_default"` + // The sensitivity index in the access hierarchy. Null if unranked. + StackableSensitivityIndex *int32 `json:"stackable_sensitivity_index,omitempty"` + // When addressed via a parent resource, lists the child resource IDs that back this aggregated entry. + MemberResourceIds []string `json:"member_resource_ids,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ResourceCustomAccessLevelResponse ResourceCustomAccessLevelResponse + +// NewResourceCustomAccessLevelResponse instantiates a new ResourceCustomAccessLevelResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceCustomAccessLevelResponse(resourceCustomAccessLevelId string, resourceId string, accessLevel ResourceAccessLevel, requestableByDefault bool) *ResourceCustomAccessLevelResponse { + this := ResourceCustomAccessLevelResponse{} + this.ResourceCustomAccessLevelId = resourceCustomAccessLevelId + this.ResourceId = resourceId + this.AccessLevel = accessLevel + this.RequestableByDefault = requestableByDefault + return &this +} + +// NewResourceCustomAccessLevelResponseWithDefaults instantiates a new ResourceCustomAccessLevelResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceCustomAccessLevelResponseWithDefaults() *ResourceCustomAccessLevelResponse { + this := ResourceCustomAccessLevelResponse{} + return &this +} + +// GetResourceCustomAccessLevelId returns the ResourceCustomAccessLevelId field value +func (o *ResourceCustomAccessLevelResponse) GetResourceCustomAccessLevelId() string { + if o == nil { + var ret string + return ret + } + + return o.ResourceCustomAccessLevelId +} + +// GetResourceCustomAccessLevelIdOk returns a tuple with the ResourceCustomAccessLevelId field value +// and a boolean to check if the value has been set. +func (o *ResourceCustomAccessLevelResponse) GetResourceCustomAccessLevelIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ResourceCustomAccessLevelId, true +} + +// SetResourceCustomAccessLevelId sets field value +func (o *ResourceCustomAccessLevelResponse) SetResourceCustomAccessLevelId(v string) { + o.ResourceCustomAccessLevelId = v +} + +// GetResourceId returns the ResourceId field value +func (o *ResourceCustomAccessLevelResponse) GetResourceId() string { + if o == nil { + var ret string + return ret + } + + return o.ResourceId +} + +// GetResourceIdOk returns a tuple with the ResourceId field value +// and a boolean to check if the value has been set. +func (o *ResourceCustomAccessLevelResponse) GetResourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ResourceId, true +} + +// SetResourceId sets field value +func (o *ResourceCustomAccessLevelResponse) SetResourceId(v string) { + o.ResourceId = v +} + +// GetAccessLevel returns the AccessLevel field value +func (o *ResourceCustomAccessLevelResponse) GetAccessLevel() ResourceAccessLevel { + if o == nil { + var ret ResourceAccessLevel + return ret + } + + return o.AccessLevel +} + +// GetAccessLevelOk returns a tuple with the AccessLevel field value +// and a boolean to check if the value has been set. +func (o *ResourceCustomAccessLevelResponse) GetAccessLevelOk() (*ResourceAccessLevel, bool) { + if o == nil { + return nil, false + } + return &o.AccessLevel, true +} + +// SetAccessLevel sets field value +func (o *ResourceCustomAccessLevelResponse) SetAccessLevel(v ResourceAccessLevel) { + o.AccessLevel = v +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *ResourceCustomAccessLevelResponse) GetPolicy() string { + if o == nil || IsNil(o.Policy) { + var ret string + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceCustomAccessLevelResponse) GetPolicyOk() (*string, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *ResourceCustomAccessLevelResponse) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given string and assigns it to the Policy field. +func (o *ResourceCustomAccessLevelResponse) SetPolicy(v string) { + o.Policy = &v +} + +// GetRequestableByDefault returns the RequestableByDefault field value +func (o *ResourceCustomAccessLevelResponse) GetRequestableByDefault() bool { + if o == nil { + var ret bool + return ret + } + + return o.RequestableByDefault +} + +// GetRequestableByDefaultOk returns a tuple with the RequestableByDefault field value +// and a boolean to check if the value has been set. +func (o *ResourceCustomAccessLevelResponse) GetRequestableByDefaultOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.RequestableByDefault, true +} + +// SetRequestableByDefault sets field value +func (o *ResourceCustomAccessLevelResponse) SetRequestableByDefault(v bool) { + o.RequestableByDefault = v +} + +// GetStackableSensitivityIndex returns the StackableSensitivityIndex field value if set, zero value otherwise. +func (o *ResourceCustomAccessLevelResponse) GetStackableSensitivityIndex() int32 { + if o == nil || IsNil(o.StackableSensitivityIndex) { + var ret int32 + return ret + } + return *o.StackableSensitivityIndex +} + +// GetStackableSensitivityIndexOk returns a tuple with the StackableSensitivityIndex field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceCustomAccessLevelResponse) GetStackableSensitivityIndexOk() (*int32, bool) { + if o == nil || IsNil(o.StackableSensitivityIndex) { + return nil, false + } + return o.StackableSensitivityIndex, true +} + +// HasStackableSensitivityIndex returns a boolean if a field has been set. +func (o *ResourceCustomAccessLevelResponse) HasStackableSensitivityIndex() bool { + if o != nil && !IsNil(o.StackableSensitivityIndex) { + return true + } + + return false +} + +// SetStackableSensitivityIndex gets a reference to the given int32 and assigns it to the StackableSensitivityIndex field. +func (o *ResourceCustomAccessLevelResponse) SetStackableSensitivityIndex(v int32) { + o.StackableSensitivityIndex = &v +} + +// GetMemberResourceIds returns the MemberResourceIds field value if set, zero value otherwise. +func (o *ResourceCustomAccessLevelResponse) GetMemberResourceIds() []string { + if o == nil || IsNil(o.MemberResourceIds) { + var ret []string + return ret + } + return o.MemberResourceIds +} + +// GetMemberResourceIdsOk returns a tuple with the MemberResourceIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceCustomAccessLevelResponse) GetMemberResourceIdsOk() ([]string, bool) { + if o == nil || IsNil(o.MemberResourceIds) { + return nil, false + } + return o.MemberResourceIds, true +} + +// HasMemberResourceIds returns a boolean if a field has been set. +func (o *ResourceCustomAccessLevelResponse) HasMemberResourceIds() bool { + if o != nil && !IsNil(o.MemberResourceIds) { + return true + } + + return false +} + +// SetMemberResourceIds gets a reference to the given []string and assigns it to the MemberResourceIds field. +func (o *ResourceCustomAccessLevelResponse) SetMemberResourceIds(v []string) { + o.MemberResourceIds = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ResourceCustomAccessLevelResponse) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceCustomAccessLevelResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ResourceCustomAccessLevelResponse) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ResourceCustomAccessLevelResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ResourceCustomAccessLevelResponse) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceCustomAccessLevelResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ResourceCustomAccessLevelResponse) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ResourceCustomAccessLevelResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ResourceCustomAccessLevelResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceCustomAccessLevelResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["resource_custom_access_level_id"] = o.ResourceCustomAccessLevelId + toSerialize["resource_id"] = o.ResourceId + toSerialize["access_level"] = o.AccessLevel + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + toSerialize["requestable_by_default"] = o.RequestableByDefault + if !IsNil(o.StackableSensitivityIndex) { + toSerialize["stackable_sensitivity_index"] = o.StackableSensitivityIndex + } + if !IsNil(o.MemberResourceIds) { + toSerialize["member_resource_ids"] = o.MemberResourceIds + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ResourceCustomAccessLevelResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "resource_custom_access_level_id", + "resource_id", + "access_level", + "requestable_by_default", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResourceCustomAccessLevelResponse := _ResourceCustomAccessLevelResponse{} + + err = json.Unmarshal(data, &varResourceCustomAccessLevelResponse) + + if err != nil { + return err + } + + *o = ResourceCustomAccessLevelResponse(varResourceCustomAccessLevelResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "resource_custom_access_level_id") + delete(additionalProperties, "resource_id") + delete(additionalProperties, "access_level") + delete(additionalProperties, "policy") + delete(additionalProperties, "requestable_by_default") + delete(additionalProperties, "stackable_sensitivity_index") + delete(additionalProperties, "member_resource_ids") + delete(additionalProperties, "created_at") + delete(additionalProperties, "updated_at") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableResourceCustomAccessLevelResponse struct { + value *ResourceCustomAccessLevelResponse + isSet bool +} + +func (v NullableResourceCustomAccessLevelResponse) Get() *ResourceCustomAccessLevelResponse { + return v.value +} + +func (v *NullableResourceCustomAccessLevelResponse) Set(val *ResourceCustomAccessLevelResponse) { + v.value = val + v.isSet = true +} + +func (v NullableResourceCustomAccessLevelResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceCustomAccessLevelResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceCustomAccessLevelResponse(val *ResourceCustomAccessLevelResponse) *NullableResourceCustomAccessLevelResponse { + return &NullableResourceCustomAccessLevelResponse{value: val, isSet: true} +} + +func (v NullableResourceCustomAccessLevelResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceCustomAccessLevelResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_resource_remote_info.go b/model_resource_remote_info.go index 5057134..10c46f5 100644 --- a/model_resource_remote_info.go +++ b/model_resource_remote_info.go @@ -67,6 +67,7 @@ type ResourceRemoteInfo struct { SnowflakeTable *ResourceRemoteInfoSnowflakeTable `json:"snowflake_table,omitempty"` IlevelAdvancedRole *ResourceRemoteInfoIlevelAdvancedRole `json:"ilevel_advanced_role,omitempty"` TailscaleSsh *ResourceRemoteInfoTailscaleSsh `json:"tailscale_ssh,omitempty"` + TwingateResource *ResourceRemoteInfoTwingateResource `json:"twingate_resource,omitempty"` PagerdutyRole *ResourceRemoteInfoPagerdutyRole `json:"pagerduty_role,omitempty"` WorkdayRole *ResourceRemoteInfoWorkdayRole `json:"workday_role,omitempty"` SalesforcePermissionSet *ResourceRemoteInfoSalesforcePermissionSet `json:"salesforce_permission_set,omitempty"` @@ -82,6 +83,14 @@ type ResourceRemoteInfo struct { OracleFusionRole *ResourceRemoteInfoOracleFusionRole `json:"oracle_fusion_role,omitempty"` DevinOrganization *ResourceRemoteInfoDevinOrganization `json:"devin_organization,omitempty"` DevinRole *ResourceRemoteInfoDevinRole `json:"devin_role,omitempty"` + NetsuiteRole *ResourceRemoteInfoNetsuiteRole `json:"netsuite_role,omitempty"` + DatadogRole *ResourceRemoteInfoDatadogRole `json:"datadog_role,omitempty"` + ClickhouseDatabase *ResourceRemoteInfoClickhouseDatabase `json:"clickhouse_database,omitempty"` + ClickhouseTable *ResourceRemoteInfoClickhouseTable `json:"clickhouse_table,omitempty"` + GrafanaFolder *ResourceRemoteInfoGrafanaFolder `json:"grafana_folder,omitempty"` + GrafanaDashboard *ResourceRemoteInfoGrafanaDashboard `json:"grafana_dashboard,omitempty"` + GrafanaRole *ResourceRemoteInfoGrafanaRole `json:"grafana_role,omitempty"` + ZendeskRole *ResourceRemoteInfoZendeskRole `json:"zendesk_role,omitempty"` AdditionalProperties map[string]interface{} } @@ -1608,6 +1617,38 @@ func (o *ResourceRemoteInfo) SetTailscaleSsh(v ResourceRemoteInfoTailscaleSsh) { o.TailscaleSsh = &v } +// GetTwingateResource returns the TwingateResource field value if set, zero value otherwise. +func (o *ResourceRemoteInfo) GetTwingateResource() ResourceRemoteInfoTwingateResource { + if o == nil || IsNil(o.TwingateResource) { + var ret ResourceRemoteInfoTwingateResource + return ret + } + return *o.TwingateResource +} + +// GetTwingateResourceOk returns a tuple with the TwingateResource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfo) GetTwingateResourceOk() (*ResourceRemoteInfoTwingateResource, bool) { + if o == nil || IsNil(o.TwingateResource) { + return nil, false + } + return o.TwingateResource, true +} + +// HasTwingateResource returns a boolean if a field has been set. +func (o *ResourceRemoteInfo) HasTwingateResource() bool { + if o != nil && !IsNil(o.TwingateResource) { + return true + } + + return false +} + +// SetTwingateResource gets a reference to the given ResourceRemoteInfoTwingateResource and assigns it to the TwingateResource field. +func (o *ResourceRemoteInfo) SetTwingateResource(v ResourceRemoteInfoTwingateResource) { + o.TwingateResource = &v +} + // GetPagerdutyRole returns the PagerdutyRole field value if set, zero value otherwise. func (o *ResourceRemoteInfo) GetPagerdutyRole() ResourceRemoteInfoPagerdutyRole { if o == nil || IsNil(o.PagerdutyRole) { @@ -2088,6 +2129,262 @@ func (o *ResourceRemoteInfo) SetDevinRole(v ResourceRemoteInfoDevinRole) { o.DevinRole = &v } +// GetNetsuiteRole returns the NetsuiteRole field value if set, zero value otherwise. +func (o *ResourceRemoteInfo) GetNetsuiteRole() ResourceRemoteInfoNetsuiteRole { + if o == nil || IsNil(o.NetsuiteRole) { + var ret ResourceRemoteInfoNetsuiteRole + return ret + } + return *o.NetsuiteRole +} + +// GetNetsuiteRoleOk returns a tuple with the NetsuiteRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfo) GetNetsuiteRoleOk() (*ResourceRemoteInfoNetsuiteRole, bool) { + if o == nil || IsNil(o.NetsuiteRole) { + return nil, false + } + return o.NetsuiteRole, true +} + +// HasNetsuiteRole returns a boolean if a field has been set. +func (o *ResourceRemoteInfo) HasNetsuiteRole() bool { + if o != nil && !IsNil(o.NetsuiteRole) { + return true + } + + return false +} + +// SetNetsuiteRole gets a reference to the given ResourceRemoteInfoNetsuiteRole and assigns it to the NetsuiteRole field. +func (o *ResourceRemoteInfo) SetNetsuiteRole(v ResourceRemoteInfoNetsuiteRole) { + o.NetsuiteRole = &v +} + +// GetDatadogRole returns the DatadogRole field value if set, zero value otherwise. +func (o *ResourceRemoteInfo) GetDatadogRole() ResourceRemoteInfoDatadogRole { + if o == nil || IsNil(o.DatadogRole) { + var ret ResourceRemoteInfoDatadogRole + return ret + } + return *o.DatadogRole +} + +// GetDatadogRoleOk returns a tuple with the DatadogRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfo) GetDatadogRoleOk() (*ResourceRemoteInfoDatadogRole, bool) { + if o == nil || IsNil(o.DatadogRole) { + return nil, false + } + return o.DatadogRole, true +} + +// HasDatadogRole returns a boolean if a field has been set. +func (o *ResourceRemoteInfo) HasDatadogRole() bool { + if o != nil && !IsNil(o.DatadogRole) { + return true + } + + return false +} + +// SetDatadogRole gets a reference to the given ResourceRemoteInfoDatadogRole and assigns it to the DatadogRole field. +func (o *ResourceRemoteInfo) SetDatadogRole(v ResourceRemoteInfoDatadogRole) { + o.DatadogRole = &v +} + +// GetClickhouseDatabase returns the ClickhouseDatabase field value if set, zero value otherwise. +func (o *ResourceRemoteInfo) GetClickhouseDatabase() ResourceRemoteInfoClickhouseDatabase { + if o == nil || IsNil(o.ClickhouseDatabase) { + var ret ResourceRemoteInfoClickhouseDatabase + return ret + } + return *o.ClickhouseDatabase +} + +// GetClickhouseDatabaseOk returns a tuple with the ClickhouseDatabase field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfo) GetClickhouseDatabaseOk() (*ResourceRemoteInfoClickhouseDatabase, bool) { + if o == nil || IsNil(o.ClickhouseDatabase) { + return nil, false + } + return o.ClickhouseDatabase, true +} + +// HasClickhouseDatabase returns a boolean if a field has been set. +func (o *ResourceRemoteInfo) HasClickhouseDatabase() bool { + if o != nil && !IsNil(o.ClickhouseDatabase) { + return true + } + + return false +} + +// SetClickhouseDatabase gets a reference to the given ResourceRemoteInfoClickhouseDatabase and assigns it to the ClickhouseDatabase field. +func (o *ResourceRemoteInfo) SetClickhouseDatabase(v ResourceRemoteInfoClickhouseDatabase) { + o.ClickhouseDatabase = &v +} + +// GetClickhouseTable returns the ClickhouseTable field value if set, zero value otherwise. +func (o *ResourceRemoteInfo) GetClickhouseTable() ResourceRemoteInfoClickhouseTable { + if o == nil || IsNil(o.ClickhouseTable) { + var ret ResourceRemoteInfoClickhouseTable + return ret + } + return *o.ClickhouseTable +} + +// GetClickhouseTableOk returns a tuple with the ClickhouseTable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfo) GetClickhouseTableOk() (*ResourceRemoteInfoClickhouseTable, bool) { + if o == nil || IsNil(o.ClickhouseTable) { + return nil, false + } + return o.ClickhouseTable, true +} + +// HasClickhouseTable returns a boolean if a field has been set. +func (o *ResourceRemoteInfo) HasClickhouseTable() bool { + if o != nil && !IsNil(o.ClickhouseTable) { + return true + } + + return false +} + +// SetClickhouseTable gets a reference to the given ResourceRemoteInfoClickhouseTable and assigns it to the ClickhouseTable field. +func (o *ResourceRemoteInfo) SetClickhouseTable(v ResourceRemoteInfoClickhouseTable) { + o.ClickhouseTable = &v +} + +// GetGrafanaFolder returns the GrafanaFolder field value if set, zero value otherwise. +func (o *ResourceRemoteInfo) GetGrafanaFolder() ResourceRemoteInfoGrafanaFolder { + if o == nil || IsNil(o.GrafanaFolder) { + var ret ResourceRemoteInfoGrafanaFolder + return ret + } + return *o.GrafanaFolder +} + +// GetGrafanaFolderOk returns a tuple with the GrafanaFolder field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfo) GetGrafanaFolderOk() (*ResourceRemoteInfoGrafanaFolder, bool) { + if o == nil || IsNil(o.GrafanaFolder) { + return nil, false + } + return o.GrafanaFolder, true +} + +// HasGrafanaFolder returns a boolean if a field has been set. +func (o *ResourceRemoteInfo) HasGrafanaFolder() bool { + if o != nil && !IsNil(o.GrafanaFolder) { + return true + } + + return false +} + +// SetGrafanaFolder gets a reference to the given ResourceRemoteInfoGrafanaFolder and assigns it to the GrafanaFolder field. +func (o *ResourceRemoteInfo) SetGrafanaFolder(v ResourceRemoteInfoGrafanaFolder) { + o.GrafanaFolder = &v +} + +// GetGrafanaDashboard returns the GrafanaDashboard field value if set, zero value otherwise. +func (o *ResourceRemoteInfo) GetGrafanaDashboard() ResourceRemoteInfoGrafanaDashboard { + if o == nil || IsNil(o.GrafanaDashboard) { + var ret ResourceRemoteInfoGrafanaDashboard + return ret + } + return *o.GrafanaDashboard +} + +// GetGrafanaDashboardOk returns a tuple with the GrafanaDashboard field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfo) GetGrafanaDashboardOk() (*ResourceRemoteInfoGrafanaDashboard, bool) { + if o == nil || IsNil(o.GrafanaDashboard) { + return nil, false + } + return o.GrafanaDashboard, true +} + +// HasGrafanaDashboard returns a boolean if a field has been set. +func (o *ResourceRemoteInfo) HasGrafanaDashboard() bool { + if o != nil && !IsNil(o.GrafanaDashboard) { + return true + } + + return false +} + +// SetGrafanaDashboard gets a reference to the given ResourceRemoteInfoGrafanaDashboard and assigns it to the GrafanaDashboard field. +func (o *ResourceRemoteInfo) SetGrafanaDashboard(v ResourceRemoteInfoGrafanaDashboard) { + o.GrafanaDashboard = &v +} + +// GetGrafanaRole returns the GrafanaRole field value if set, zero value otherwise. +func (o *ResourceRemoteInfo) GetGrafanaRole() ResourceRemoteInfoGrafanaRole { + if o == nil || IsNil(o.GrafanaRole) { + var ret ResourceRemoteInfoGrafanaRole + return ret + } + return *o.GrafanaRole +} + +// GetGrafanaRoleOk returns a tuple with the GrafanaRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfo) GetGrafanaRoleOk() (*ResourceRemoteInfoGrafanaRole, bool) { + if o == nil || IsNil(o.GrafanaRole) { + return nil, false + } + return o.GrafanaRole, true +} + +// HasGrafanaRole returns a boolean if a field has been set. +func (o *ResourceRemoteInfo) HasGrafanaRole() bool { + if o != nil && !IsNil(o.GrafanaRole) { + return true + } + + return false +} + +// SetGrafanaRole gets a reference to the given ResourceRemoteInfoGrafanaRole and assigns it to the GrafanaRole field. +func (o *ResourceRemoteInfo) SetGrafanaRole(v ResourceRemoteInfoGrafanaRole) { + o.GrafanaRole = &v +} + +// GetZendeskRole returns the ZendeskRole field value if set, zero value otherwise. +func (o *ResourceRemoteInfo) GetZendeskRole() ResourceRemoteInfoZendeskRole { + if o == nil || IsNil(o.ZendeskRole) { + var ret ResourceRemoteInfoZendeskRole + return ret + } + return *o.ZendeskRole +} + +// GetZendeskRoleOk returns a tuple with the ZendeskRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfo) GetZendeskRoleOk() (*ResourceRemoteInfoZendeskRole, bool) { + if o == nil || IsNil(o.ZendeskRole) { + return nil, false + } + return o.ZendeskRole, true +} + +// HasZendeskRole returns a boolean if a field has been set. +func (o *ResourceRemoteInfo) HasZendeskRole() bool { + if o != nil && !IsNil(o.ZendeskRole) { + return true + } + + return false +} + +// SetZendeskRole gets a reference to the given ResourceRemoteInfoZendeskRole and assigns it to the ZendeskRole field. +func (o *ResourceRemoteInfo) SetZendeskRole(v ResourceRemoteInfoZendeskRole) { + o.ZendeskRole = &v +} + func (o ResourceRemoteInfo) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -2239,6 +2536,9 @@ func (o ResourceRemoteInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.TailscaleSsh) { toSerialize["tailscale_ssh"] = o.TailscaleSsh } + if !IsNil(o.TwingateResource) { + toSerialize["twingate_resource"] = o.TwingateResource + } if !IsNil(o.PagerdutyRole) { toSerialize["pagerduty_role"] = o.PagerdutyRole } @@ -2284,6 +2584,30 @@ func (o ResourceRemoteInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.DevinRole) { toSerialize["devin_role"] = o.DevinRole } + if !IsNil(o.NetsuiteRole) { + toSerialize["netsuite_role"] = o.NetsuiteRole + } + if !IsNil(o.DatadogRole) { + toSerialize["datadog_role"] = o.DatadogRole + } + if !IsNil(o.ClickhouseDatabase) { + toSerialize["clickhouse_database"] = o.ClickhouseDatabase + } + if !IsNil(o.ClickhouseTable) { + toSerialize["clickhouse_table"] = o.ClickhouseTable + } + if !IsNil(o.GrafanaFolder) { + toSerialize["grafana_folder"] = o.GrafanaFolder + } + if !IsNil(o.GrafanaDashboard) { + toSerialize["grafana_dashboard"] = o.GrafanaDashboard + } + if !IsNil(o.GrafanaRole) { + toSerialize["grafana_role"] = o.GrafanaRole + } + if !IsNil(o.ZendeskRole) { + toSerialize["zendesk_role"] = o.ZendeskRole + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -2353,6 +2677,7 @@ func (o *ResourceRemoteInfo) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "snowflake_table") delete(additionalProperties, "ilevel_advanced_role") delete(additionalProperties, "tailscale_ssh") + delete(additionalProperties, "twingate_resource") delete(additionalProperties, "pagerduty_role") delete(additionalProperties, "workday_role") delete(additionalProperties, "salesforce_permission_set") @@ -2368,6 +2693,14 @@ func (o *ResourceRemoteInfo) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "oracle_fusion_role") delete(additionalProperties, "devin_organization") delete(additionalProperties, "devin_role") + delete(additionalProperties, "netsuite_role") + delete(additionalProperties, "datadog_role") + delete(additionalProperties, "clickhouse_database") + delete(additionalProperties, "clickhouse_table") + delete(additionalProperties, "grafana_folder") + delete(additionalProperties, "grafana_dashboard") + delete(additionalProperties, "grafana_role") + delete(additionalProperties, "zendesk_role") o.AdditionalProperties = additionalProperties } diff --git a/model_resource_remote_info_clickhouse_database.go b/model_resource_remote_info_clickhouse_database.go new file mode 100644 index 0000000..8af1810 --- /dev/null +++ b/model_resource_remote_info_clickhouse_database.go @@ -0,0 +1,170 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the ResourceRemoteInfoClickhouseDatabase type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceRemoteInfoClickhouseDatabase{} + +// ResourceRemoteInfoClickhouseDatabase Remote info for ClickHouse database. +type ResourceRemoteInfoClickhouseDatabase struct { + // The name of the ClickHouse database. + DatabaseName string `json:"database_name"` + AdditionalProperties map[string]interface{} +} + +type _ResourceRemoteInfoClickhouseDatabase ResourceRemoteInfoClickhouseDatabase + +// NewResourceRemoteInfoClickhouseDatabase instantiates a new ResourceRemoteInfoClickhouseDatabase object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceRemoteInfoClickhouseDatabase(databaseName string) *ResourceRemoteInfoClickhouseDatabase { + this := ResourceRemoteInfoClickhouseDatabase{} + this.DatabaseName = databaseName + return &this +} + +// NewResourceRemoteInfoClickhouseDatabaseWithDefaults instantiates a new ResourceRemoteInfoClickhouseDatabase object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceRemoteInfoClickhouseDatabaseWithDefaults() *ResourceRemoteInfoClickhouseDatabase { + this := ResourceRemoteInfoClickhouseDatabase{} + return &this +} + +// GetDatabaseName returns the DatabaseName field value +func (o *ResourceRemoteInfoClickhouseDatabase) GetDatabaseName() string { + if o == nil { + var ret string + return ret + } + + return o.DatabaseName +} + +// GetDatabaseNameOk returns a tuple with the DatabaseName field value +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfoClickhouseDatabase) GetDatabaseNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatabaseName, true +} + +// SetDatabaseName sets field value +func (o *ResourceRemoteInfoClickhouseDatabase) SetDatabaseName(v string) { + o.DatabaseName = v +} + +func (o ResourceRemoteInfoClickhouseDatabase) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceRemoteInfoClickhouseDatabase) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["database_name"] = o.DatabaseName + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ResourceRemoteInfoClickhouseDatabase) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "database_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResourceRemoteInfoClickhouseDatabase := _ResourceRemoteInfoClickhouseDatabase{} + + err = json.Unmarshal(data, &varResourceRemoteInfoClickhouseDatabase) + + if err != nil { + return err + } + + *o = ResourceRemoteInfoClickhouseDatabase(varResourceRemoteInfoClickhouseDatabase) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "database_name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableResourceRemoteInfoClickhouseDatabase struct { + value *ResourceRemoteInfoClickhouseDatabase + isSet bool +} + +func (v NullableResourceRemoteInfoClickhouseDatabase) Get() *ResourceRemoteInfoClickhouseDatabase { + return v.value +} + +func (v *NullableResourceRemoteInfoClickhouseDatabase) Set(val *ResourceRemoteInfoClickhouseDatabase) { + v.value = val + v.isSet = true +} + +func (v NullableResourceRemoteInfoClickhouseDatabase) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceRemoteInfoClickhouseDatabase) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceRemoteInfoClickhouseDatabase(val *ResourceRemoteInfoClickhouseDatabase) *NullableResourceRemoteInfoClickhouseDatabase { + return &NullableResourceRemoteInfoClickhouseDatabase{value: val, isSet: true} +} + +func (v NullableResourceRemoteInfoClickhouseDatabase) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceRemoteInfoClickhouseDatabase) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_resource_remote_info_clickhouse_table.go b/model_resource_remote_info_clickhouse_table.go new file mode 100644 index 0000000..b440458 --- /dev/null +++ b/model_resource_remote_info_clickhouse_table.go @@ -0,0 +1,200 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the ResourceRemoteInfoClickhouseTable type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceRemoteInfoClickhouseTable{} + +// ResourceRemoteInfoClickhouseTable Remote info for ClickHouse table. +type ResourceRemoteInfoClickhouseTable struct { + // The name of the ClickHouse database containing the table. + DatabaseName string `json:"database_name"` + // The name of the ClickHouse table. + TableName string `json:"table_name"` + AdditionalProperties map[string]interface{} +} + +type _ResourceRemoteInfoClickhouseTable ResourceRemoteInfoClickhouseTable + +// NewResourceRemoteInfoClickhouseTable instantiates a new ResourceRemoteInfoClickhouseTable object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceRemoteInfoClickhouseTable(databaseName string, tableName string) *ResourceRemoteInfoClickhouseTable { + this := ResourceRemoteInfoClickhouseTable{} + this.DatabaseName = databaseName + this.TableName = tableName + return &this +} + +// NewResourceRemoteInfoClickhouseTableWithDefaults instantiates a new ResourceRemoteInfoClickhouseTable object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceRemoteInfoClickhouseTableWithDefaults() *ResourceRemoteInfoClickhouseTable { + this := ResourceRemoteInfoClickhouseTable{} + return &this +} + +// GetDatabaseName returns the DatabaseName field value +func (o *ResourceRemoteInfoClickhouseTable) GetDatabaseName() string { + if o == nil { + var ret string + return ret + } + + return o.DatabaseName +} + +// GetDatabaseNameOk returns a tuple with the DatabaseName field value +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfoClickhouseTable) GetDatabaseNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatabaseName, true +} + +// SetDatabaseName sets field value +func (o *ResourceRemoteInfoClickhouseTable) SetDatabaseName(v string) { + o.DatabaseName = v +} + +// GetTableName returns the TableName field value +func (o *ResourceRemoteInfoClickhouseTable) GetTableName() string { + if o == nil { + var ret string + return ret + } + + return o.TableName +} + +// GetTableNameOk returns a tuple with the TableName field value +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfoClickhouseTable) GetTableNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TableName, true +} + +// SetTableName sets field value +func (o *ResourceRemoteInfoClickhouseTable) SetTableName(v string) { + o.TableName = v +} + +func (o ResourceRemoteInfoClickhouseTable) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceRemoteInfoClickhouseTable) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["database_name"] = o.DatabaseName + toSerialize["table_name"] = o.TableName + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ResourceRemoteInfoClickhouseTable) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "database_name", + "table_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResourceRemoteInfoClickhouseTable := _ResourceRemoteInfoClickhouseTable{} + + err = json.Unmarshal(data, &varResourceRemoteInfoClickhouseTable) + + if err != nil { + return err + } + + *o = ResourceRemoteInfoClickhouseTable(varResourceRemoteInfoClickhouseTable) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "database_name") + delete(additionalProperties, "table_name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableResourceRemoteInfoClickhouseTable struct { + value *ResourceRemoteInfoClickhouseTable + isSet bool +} + +func (v NullableResourceRemoteInfoClickhouseTable) Get() *ResourceRemoteInfoClickhouseTable { + return v.value +} + +func (v *NullableResourceRemoteInfoClickhouseTable) Set(val *ResourceRemoteInfoClickhouseTable) { + v.value = val + v.isSet = true +} + +func (v NullableResourceRemoteInfoClickhouseTable) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceRemoteInfoClickhouseTable) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceRemoteInfoClickhouseTable(val *ResourceRemoteInfoClickhouseTable) *NullableResourceRemoteInfoClickhouseTable { + return &NullableResourceRemoteInfoClickhouseTable{value: val, isSet: true} +} + +func (v NullableResourceRemoteInfoClickhouseTable) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceRemoteInfoClickhouseTable) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_resource_remote_info_datadog_role.go b/model_resource_remote_info_datadog_role.go new file mode 100644 index 0000000..cb5feed --- /dev/null +++ b/model_resource_remote_info_datadog_role.go @@ -0,0 +1,170 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the ResourceRemoteInfoDatadogRole type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceRemoteInfoDatadogRole{} + +// ResourceRemoteInfoDatadogRole Remote info for Datadog role. +type ResourceRemoteInfoDatadogRole struct { + // The id of the role. + RoleId string `json:"role_id"` + AdditionalProperties map[string]interface{} +} + +type _ResourceRemoteInfoDatadogRole ResourceRemoteInfoDatadogRole + +// NewResourceRemoteInfoDatadogRole instantiates a new ResourceRemoteInfoDatadogRole object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceRemoteInfoDatadogRole(roleId string) *ResourceRemoteInfoDatadogRole { + this := ResourceRemoteInfoDatadogRole{} + this.RoleId = roleId + return &this +} + +// NewResourceRemoteInfoDatadogRoleWithDefaults instantiates a new ResourceRemoteInfoDatadogRole object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceRemoteInfoDatadogRoleWithDefaults() *ResourceRemoteInfoDatadogRole { + this := ResourceRemoteInfoDatadogRole{} + return &this +} + +// GetRoleId returns the RoleId field value +func (o *ResourceRemoteInfoDatadogRole) GetRoleId() string { + if o == nil { + var ret string + return ret + } + + return o.RoleId +} + +// GetRoleIdOk returns a tuple with the RoleId field value +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfoDatadogRole) GetRoleIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RoleId, true +} + +// SetRoleId sets field value +func (o *ResourceRemoteInfoDatadogRole) SetRoleId(v string) { + o.RoleId = v +} + +func (o ResourceRemoteInfoDatadogRole) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceRemoteInfoDatadogRole) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role_id"] = o.RoleId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ResourceRemoteInfoDatadogRole) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "role_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResourceRemoteInfoDatadogRole := _ResourceRemoteInfoDatadogRole{} + + err = json.Unmarshal(data, &varResourceRemoteInfoDatadogRole) + + if err != nil { + return err + } + + *o = ResourceRemoteInfoDatadogRole(varResourceRemoteInfoDatadogRole) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableResourceRemoteInfoDatadogRole struct { + value *ResourceRemoteInfoDatadogRole + isSet bool +} + +func (v NullableResourceRemoteInfoDatadogRole) Get() *ResourceRemoteInfoDatadogRole { + return v.value +} + +func (v *NullableResourceRemoteInfoDatadogRole) Set(val *ResourceRemoteInfoDatadogRole) { + v.value = val + v.isSet = true +} + +func (v NullableResourceRemoteInfoDatadogRole) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceRemoteInfoDatadogRole) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceRemoteInfoDatadogRole(val *ResourceRemoteInfoDatadogRole) *NullableResourceRemoteInfoDatadogRole { + return &NullableResourceRemoteInfoDatadogRole{value: val, isSet: true} +} + +func (v NullableResourceRemoteInfoDatadogRole) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceRemoteInfoDatadogRole) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_resource_remote_info_github_org_role.go b/model_resource_remote_info_github_org_role.go index 9393b3c..64214c2 100644 --- a/model_resource_remote_info_github_org_role.go +++ b/model_resource_remote_info_github_org_role.go @@ -23,6 +23,8 @@ var _ MappedNullable = &ResourceRemoteInfoGithubOrgRole{} type ResourceRemoteInfoGithubOrgRole struct { // The id of the role. RoleId string `json:"role_id"` + // GitHub org role's org name, required only for Enterprise. + OrgName *string `json:"org_name,omitempty"` AdditionalProperties map[string]interface{} } @@ -70,6 +72,38 @@ func (o *ResourceRemoteInfoGithubOrgRole) SetRoleId(v string) { o.RoleId = v } +// GetOrgName returns the OrgName field value if set, zero value otherwise. +func (o *ResourceRemoteInfoGithubOrgRole) GetOrgName() string { + if o == nil || IsNil(o.OrgName) { + var ret string + return ret + } + return *o.OrgName +} + +// GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfoGithubOrgRole) GetOrgNameOk() (*string, bool) { + if o == nil || IsNil(o.OrgName) { + return nil, false + } + return o.OrgName, true +} + +// HasOrgName returns a boolean if a field has been set. +func (o *ResourceRemoteInfoGithubOrgRole) HasOrgName() bool { + if o != nil && !IsNil(o.OrgName) { + return true + } + + return false +} + +// SetOrgName gets a reference to the given string and assigns it to the OrgName field. +func (o *ResourceRemoteInfoGithubOrgRole) SetOrgName(v string) { + o.OrgName = &v +} + func (o ResourceRemoteInfoGithubOrgRole) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -81,6 +115,9 @@ func (o ResourceRemoteInfoGithubOrgRole) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoGithubOrgRole) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["role_id"] = o.RoleId + if !IsNil(o.OrgName) { + toSerialize["org_name"] = o.OrgName + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -125,6 +162,7 @@ func (o *ResourceRemoteInfoGithubOrgRole) UnmarshalJSON(data []byte) (err error) if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "role_id") + delete(additionalProperties, "org_name") o.AdditionalProperties = additionalProperties } diff --git a/model_resource_remote_info_github_repo.go b/model_resource_remote_info_github_repo.go index ac9b857..34b623a 100644 --- a/model_resource_remote_info_github_repo.go +++ b/model_resource_remote_info_github_repo.go @@ -26,6 +26,8 @@ type ResourceRemoteInfoGithubRepo struct { RepoId *string `json:"repo_id,omitempty"` // The name of the repository. RepoName string `json:"repo_name"` + // GitHub repo's org name, required only for Enterprise. + OrgName *string `json:"org_name,omitempty"` AdditionalProperties map[string]interface{} } @@ -108,6 +110,38 @@ func (o *ResourceRemoteInfoGithubRepo) SetRepoName(v string) { o.RepoName = v } +// GetOrgName returns the OrgName field value if set, zero value otherwise. +func (o *ResourceRemoteInfoGithubRepo) GetOrgName() string { + if o == nil || IsNil(o.OrgName) { + var ret string + return ret + } + return *o.OrgName +} + +// GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfoGithubRepo) GetOrgNameOk() (*string, bool) { + if o == nil || IsNil(o.OrgName) { + return nil, false + } + return o.OrgName, true +} + +// HasOrgName returns a boolean if a field has been set. +func (o *ResourceRemoteInfoGithubRepo) HasOrgName() bool { + if o != nil && !IsNil(o.OrgName) { + return true + } + + return false +} + +// SetOrgName gets a reference to the given string and assigns it to the OrgName field. +func (o *ResourceRemoteInfoGithubRepo) SetOrgName(v string) { + o.OrgName = &v +} + func (o ResourceRemoteInfoGithubRepo) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -122,6 +156,9 @@ func (o ResourceRemoteInfoGithubRepo) ToMap() (map[string]interface{}, error) { toSerialize["repo_id"] = o.RepoId } toSerialize["repo_name"] = o.RepoName + if !IsNil(o.OrgName) { + toSerialize["org_name"] = o.OrgName + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -167,6 +204,7 @@ func (o *ResourceRemoteInfoGithubRepo) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "repo_id") delete(additionalProperties, "repo_name") + delete(additionalProperties, "org_name") o.AdditionalProperties = additionalProperties } diff --git a/model_resource_remote_info_grafana_dashboard.go b/model_resource_remote_info_grafana_dashboard.go new file mode 100644 index 0000000..4b7ce3f --- /dev/null +++ b/model_resource_remote_info_grafana_dashboard.go @@ -0,0 +1,170 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the ResourceRemoteInfoGrafanaDashboard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceRemoteInfoGrafanaDashboard{} + +// ResourceRemoteInfoGrafanaDashboard Remote info for Grafana dashboard. +type ResourceRemoteInfoGrafanaDashboard struct { + // The UID of the Grafana dashboard. + DashboardUid string `json:"dashboard_uid"` + AdditionalProperties map[string]interface{} +} + +type _ResourceRemoteInfoGrafanaDashboard ResourceRemoteInfoGrafanaDashboard + +// NewResourceRemoteInfoGrafanaDashboard instantiates a new ResourceRemoteInfoGrafanaDashboard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceRemoteInfoGrafanaDashboard(dashboardUid string) *ResourceRemoteInfoGrafanaDashboard { + this := ResourceRemoteInfoGrafanaDashboard{} + this.DashboardUid = dashboardUid + return &this +} + +// NewResourceRemoteInfoGrafanaDashboardWithDefaults instantiates a new ResourceRemoteInfoGrafanaDashboard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceRemoteInfoGrafanaDashboardWithDefaults() *ResourceRemoteInfoGrafanaDashboard { + this := ResourceRemoteInfoGrafanaDashboard{} + return &this +} + +// GetDashboardUid returns the DashboardUid field value +func (o *ResourceRemoteInfoGrafanaDashboard) GetDashboardUid() string { + if o == nil { + var ret string + return ret + } + + return o.DashboardUid +} + +// GetDashboardUidOk returns a tuple with the DashboardUid field value +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfoGrafanaDashboard) GetDashboardUidOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DashboardUid, true +} + +// SetDashboardUid sets field value +func (o *ResourceRemoteInfoGrafanaDashboard) SetDashboardUid(v string) { + o.DashboardUid = v +} + +func (o ResourceRemoteInfoGrafanaDashboard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceRemoteInfoGrafanaDashboard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dashboard_uid"] = o.DashboardUid + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ResourceRemoteInfoGrafanaDashboard) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dashboard_uid", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResourceRemoteInfoGrafanaDashboard := _ResourceRemoteInfoGrafanaDashboard{} + + err = json.Unmarshal(data, &varResourceRemoteInfoGrafanaDashboard) + + if err != nil { + return err + } + + *o = ResourceRemoteInfoGrafanaDashboard(varResourceRemoteInfoGrafanaDashboard) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "dashboard_uid") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableResourceRemoteInfoGrafanaDashboard struct { + value *ResourceRemoteInfoGrafanaDashboard + isSet bool +} + +func (v NullableResourceRemoteInfoGrafanaDashboard) Get() *ResourceRemoteInfoGrafanaDashboard { + return v.value +} + +func (v *NullableResourceRemoteInfoGrafanaDashboard) Set(val *ResourceRemoteInfoGrafanaDashboard) { + v.value = val + v.isSet = true +} + +func (v NullableResourceRemoteInfoGrafanaDashboard) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceRemoteInfoGrafanaDashboard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceRemoteInfoGrafanaDashboard(val *ResourceRemoteInfoGrafanaDashboard) *NullableResourceRemoteInfoGrafanaDashboard { + return &NullableResourceRemoteInfoGrafanaDashboard{value: val, isSet: true} +} + +func (v NullableResourceRemoteInfoGrafanaDashboard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceRemoteInfoGrafanaDashboard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_resource_remote_info_grafana_folder.go b/model_resource_remote_info_grafana_folder.go new file mode 100644 index 0000000..8b90d20 --- /dev/null +++ b/model_resource_remote_info_grafana_folder.go @@ -0,0 +1,170 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the ResourceRemoteInfoGrafanaFolder type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceRemoteInfoGrafanaFolder{} + +// ResourceRemoteInfoGrafanaFolder Remote info for Grafana folder. +type ResourceRemoteInfoGrafanaFolder struct { + // The UID of the Grafana folder. + FolderUid string `json:"folder_uid"` + AdditionalProperties map[string]interface{} +} + +type _ResourceRemoteInfoGrafanaFolder ResourceRemoteInfoGrafanaFolder + +// NewResourceRemoteInfoGrafanaFolder instantiates a new ResourceRemoteInfoGrafanaFolder object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceRemoteInfoGrafanaFolder(folderUid string) *ResourceRemoteInfoGrafanaFolder { + this := ResourceRemoteInfoGrafanaFolder{} + this.FolderUid = folderUid + return &this +} + +// NewResourceRemoteInfoGrafanaFolderWithDefaults instantiates a new ResourceRemoteInfoGrafanaFolder object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceRemoteInfoGrafanaFolderWithDefaults() *ResourceRemoteInfoGrafanaFolder { + this := ResourceRemoteInfoGrafanaFolder{} + return &this +} + +// GetFolderUid returns the FolderUid field value +func (o *ResourceRemoteInfoGrafanaFolder) GetFolderUid() string { + if o == nil { + var ret string + return ret + } + + return o.FolderUid +} + +// GetFolderUidOk returns a tuple with the FolderUid field value +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfoGrafanaFolder) GetFolderUidOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FolderUid, true +} + +// SetFolderUid sets field value +func (o *ResourceRemoteInfoGrafanaFolder) SetFolderUid(v string) { + o.FolderUid = v +} + +func (o ResourceRemoteInfoGrafanaFolder) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceRemoteInfoGrafanaFolder) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["folder_uid"] = o.FolderUid + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ResourceRemoteInfoGrafanaFolder) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "folder_uid", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResourceRemoteInfoGrafanaFolder := _ResourceRemoteInfoGrafanaFolder{} + + err = json.Unmarshal(data, &varResourceRemoteInfoGrafanaFolder) + + if err != nil { + return err + } + + *o = ResourceRemoteInfoGrafanaFolder(varResourceRemoteInfoGrafanaFolder) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "folder_uid") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableResourceRemoteInfoGrafanaFolder struct { + value *ResourceRemoteInfoGrafanaFolder + isSet bool +} + +func (v NullableResourceRemoteInfoGrafanaFolder) Get() *ResourceRemoteInfoGrafanaFolder { + return v.value +} + +func (v *NullableResourceRemoteInfoGrafanaFolder) Set(val *ResourceRemoteInfoGrafanaFolder) { + v.value = val + v.isSet = true +} + +func (v NullableResourceRemoteInfoGrafanaFolder) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceRemoteInfoGrafanaFolder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceRemoteInfoGrafanaFolder(val *ResourceRemoteInfoGrafanaFolder) *NullableResourceRemoteInfoGrafanaFolder { + return &NullableResourceRemoteInfoGrafanaFolder{value: val, isSet: true} +} + +func (v NullableResourceRemoteInfoGrafanaFolder) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceRemoteInfoGrafanaFolder) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_resource_remote_info_grafana_role.go b/model_resource_remote_info_grafana_role.go new file mode 100644 index 0000000..6233b48 --- /dev/null +++ b/model_resource_remote_info_grafana_role.go @@ -0,0 +1,170 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the ResourceRemoteInfoGrafanaRole type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceRemoteInfoGrafanaRole{} + +// ResourceRemoteInfoGrafanaRole Remote info for Grafana role(fixed or custom). +type ResourceRemoteInfoGrafanaRole struct { + // The UID of the Grafana role. + RoleUid string `json:"role_uid"` + AdditionalProperties map[string]interface{} +} + +type _ResourceRemoteInfoGrafanaRole ResourceRemoteInfoGrafanaRole + +// NewResourceRemoteInfoGrafanaRole instantiates a new ResourceRemoteInfoGrafanaRole object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceRemoteInfoGrafanaRole(roleUid string) *ResourceRemoteInfoGrafanaRole { + this := ResourceRemoteInfoGrafanaRole{} + this.RoleUid = roleUid + return &this +} + +// NewResourceRemoteInfoGrafanaRoleWithDefaults instantiates a new ResourceRemoteInfoGrafanaRole object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceRemoteInfoGrafanaRoleWithDefaults() *ResourceRemoteInfoGrafanaRole { + this := ResourceRemoteInfoGrafanaRole{} + return &this +} + +// GetRoleUid returns the RoleUid field value +func (o *ResourceRemoteInfoGrafanaRole) GetRoleUid() string { + if o == nil { + var ret string + return ret + } + + return o.RoleUid +} + +// GetRoleUidOk returns a tuple with the RoleUid field value +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfoGrafanaRole) GetRoleUidOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RoleUid, true +} + +// SetRoleUid sets field value +func (o *ResourceRemoteInfoGrafanaRole) SetRoleUid(v string) { + o.RoleUid = v +} + +func (o ResourceRemoteInfoGrafanaRole) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceRemoteInfoGrafanaRole) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role_uid"] = o.RoleUid + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ResourceRemoteInfoGrafanaRole) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "role_uid", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResourceRemoteInfoGrafanaRole := _ResourceRemoteInfoGrafanaRole{} + + err = json.Unmarshal(data, &varResourceRemoteInfoGrafanaRole) + + if err != nil { + return err + } + + *o = ResourceRemoteInfoGrafanaRole(varResourceRemoteInfoGrafanaRole) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role_uid") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableResourceRemoteInfoGrafanaRole struct { + value *ResourceRemoteInfoGrafanaRole + isSet bool +} + +func (v NullableResourceRemoteInfoGrafanaRole) Get() *ResourceRemoteInfoGrafanaRole { + return v.value +} + +func (v *NullableResourceRemoteInfoGrafanaRole) Set(val *ResourceRemoteInfoGrafanaRole) { + v.value = val + v.isSet = true +} + +func (v NullableResourceRemoteInfoGrafanaRole) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceRemoteInfoGrafanaRole) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceRemoteInfoGrafanaRole(val *ResourceRemoteInfoGrafanaRole) *NullableResourceRemoteInfoGrafanaRole { + return &NullableResourceRemoteInfoGrafanaRole{value: val, isSet: true} +} + +func (v NullableResourceRemoteInfoGrafanaRole) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceRemoteInfoGrafanaRole) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_resource_remote_info_netsuite_role.go b/model_resource_remote_info_netsuite_role.go new file mode 100644 index 0000000..bc8f45d --- /dev/null +++ b/model_resource_remote_info_netsuite_role.go @@ -0,0 +1,170 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the ResourceRemoteInfoNetsuiteRole type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceRemoteInfoNetsuiteRole{} + +// ResourceRemoteInfoNetsuiteRole Remote info for NetSuite role. +type ResourceRemoteInfoNetsuiteRole struct { + // The id of the role. + RoleId string `json:"role_id"` + AdditionalProperties map[string]interface{} +} + +type _ResourceRemoteInfoNetsuiteRole ResourceRemoteInfoNetsuiteRole + +// NewResourceRemoteInfoNetsuiteRole instantiates a new ResourceRemoteInfoNetsuiteRole object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceRemoteInfoNetsuiteRole(roleId string) *ResourceRemoteInfoNetsuiteRole { + this := ResourceRemoteInfoNetsuiteRole{} + this.RoleId = roleId + return &this +} + +// NewResourceRemoteInfoNetsuiteRoleWithDefaults instantiates a new ResourceRemoteInfoNetsuiteRole object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceRemoteInfoNetsuiteRoleWithDefaults() *ResourceRemoteInfoNetsuiteRole { + this := ResourceRemoteInfoNetsuiteRole{} + return &this +} + +// GetRoleId returns the RoleId field value +func (o *ResourceRemoteInfoNetsuiteRole) GetRoleId() string { + if o == nil { + var ret string + return ret + } + + return o.RoleId +} + +// GetRoleIdOk returns a tuple with the RoleId field value +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfoNetsuiteRole) GetRoleIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RoleId, true +} + +// SetRoleId sets field value +func (o *ResourceRemoteInfoNetsuiteRole) SetRoleId(v string) { + o.RoleId = v +} + +func (o ResourceRemoteInfoNetsuiteRole) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceRemoteInfoNetsuiteRole) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role_id"] = o.RoleId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ResourceRemoteInfoNetsuiteRole) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "role_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResourceRemoteInfoNetsuiteRole := _ResourceRemoteInfoNetsuiteRole{} + + err = json.Unmarshal(data, &varResourceRemoteInfoNetsuiteRole) + + if err != nil { + return err + } + + *o = ResourceRemoteInfoNetsuiteRole(varResourceRemoteInfoNetsuiteRole) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableResourceRemoteInfoNetsuiteRole struct { + value *ResourceRemoteInfoNetsuiteRole + isSet bool +} + +func (v NullableResourceRemoteInfoNetsuiteRole) Get() *ResourceRemoteInfoNetsuiteRole { + return v.value +} + +func (v *NullableResourceRemoteInfoNetsuiteRole) Set(val *ResourceRemoteInfoNetsuiteRole) { + v.value = val + v.isSet = true +} + +func (v NullableResourceRemoteInfoNetsuiteRole) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceRemoteInfoNetsuiteRole) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceRemoteInfoNetsuiteRole(val *ResourceRemoteInfoNetsuiteRole) *NullableResourceRemoteInfoNetsuiteRole { + return &NullableResourceRemoteInfoNetsuiteRole{value: val, isSet: true} +} + +func (v NullableResourceRemoteInfoNetsuiteRole) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceRemoteInfoNetsuiteRole) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_resource_remote_info_twingate_resource.go b/model_resource_remote_info_twingate_resource.go new file mode 100644 index 0000000..063fd73 --- /dev/null +++ b/model_resource_remote_info_twingate_resource.go @@ -0,0 +1,170 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the ResourceRemoteInfoTwingateResource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceRemoteInfoTwingateResource{} + +// ResourceRemoteInfoTwingateResource Remote info for Twingate resource. +type ResourceRemoteInfoTwingateResource struct { + // The id of the Twingate resource. + ResourceId string `json:"resource_id"` + AdditionalProperties map[string]interface{} +} + +type _ResourceRemoteInfoTwingateResource ResourceRemoteInfoTwingateResource + +// NewResourceRemoteInfoTwingateResource instantiates a new ResourceRemoteInfoTwingateResource object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceRemoteInfoTwingateResource(resourceId string) *ResourceRemoteInfoTwingateResource { + this := ResourceRemoteInfoTwingateResource{} + this.ResourceId = resourceId + return &this +} + +// NewResourceRemoteInfoTwingateResourceWithDefaults instantiates a new ResourceRemoteInfoTwingateResource object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceRemoteInfoTwingateResourceWithDefaults() *ResourceRemoteInfoTwingateResource { + this := ResourceRemoteInfoTwingateResource{} + return &this +} + +// GetResourceId returns the ResourceId field value +func (o *ResourceRemoteInfoTwingateResource) GetResourceId() string { + if o == nil { + var ret string + return ret + } + + return o.ResourceId +} + +// GetResourceIdOk returns a tuple with the ResourceId field value +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfoTwingateResource) GetResourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ResourceId, true +} + +// SetResourceId sets field value +func (o *ResourceRemoteInfoTwingateResource) SetResourceId(v string) { + o.ResourceId = v +} + +func (o ResourceRemoteInfoTwingateResource) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceRemoteInfoTwingateResource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["resource_id"] = o.ResourceId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ResourceRemoteInfoTwingateResource) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "resource_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResourceRemoteInfoTwingateResource := _ResourceRemoteInfoTwingateResource{} + + err = json.Unmarshal(data, &varResourceRemoteInfoTwingateResource) + + if err != nil { + return err + } + + *o = ResourceRemoteInfoTwingateResource(varResourceRemoteInfoTwingateResource) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "resource_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableResourceRemoteInfoTwingateResource struct { + value *ResourceRemoteInfoTwingateResource + isSet bool +} + +func (v NullableResourceRemoteInfoTwingateResource) Get() *ResourceRemoteInfoTwingateResource { + return v.value +} + +func (v *NullableResourceRemoteInfoTwingateResource) Set(val *ResourceRemoteInfoTwingateResource) { + v.value = val + v.isSet = true +} + +func (v NullableResourceRemoteInfoTwingateResource) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceRemoteInfoTwingateResource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceRemoteInfoTwingateResource(val *ResourceRemoteInfoTwingateResource) *NullableResourceRemoteInfoTwingateResource { + return &NullableResourceRemoteInfoTwingateResource{value: val, isSet: true} +} + +func (v NullableResourceRemoteInfoTwingateResource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceRemoteInfoTwingateResource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_resource_remote_info_zendesk_role.go b/model_resource_remote_info_zendesk_role.go new file mode 100644 index 0000000..ebc87b4 --- /dev/null +++ b/model_resource_remote_info_zendesk_role.go @@ -0,0 +1,170 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the ResourceRemoteInfoZendeskRole type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourceRemoteInfoZendeskRole{} + +// ResourceRemoteInfoZendeskRole Remote info for Zendesk custom role. +type ResourceRemoteInfoZendeskRole struct { + // The ID of the Zendesk custom role. + RoleId string `json:"role_id"` + AdditionalProperties map[string]interface{} +} + +type _ResourceRemoteInfoZendeskRole ResourceRemoteInfoZendeskRole + +// NewResourceRemoteInfoZendeskRole instantiates a new ResourceRemoteInfoZendeskRole object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResourceRemoteInfoZendeskRole(roleId string) *ResourceRemoteInfoZendeskRole { + this := ResourceRemoteInfoZendeskRole{} + this.RoleId = roleId + return &this +} + +// NewResourceRemoteInfoZendeskRoleWithDefaults instantiates a new ResourceRemoteInfoZendeskRole object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResourceRemoteInfoZendeskRoleWithDefaults() *ResourceRemoteInfoZendeskRole { + this := ResourceRemoteInfoZendeskRole{} + return &this +} + +// GetRoleId returns the RoleId field value +func (o *ResourceRemoteInfoZendeskRole) GetRoleId() string { + if o == nil { + var ret string + return ret + } + + return o.RoleId +} + +// GetRoleIdOk returns a tuple with the RoleId field value +// and a boolean to check if the value has been set. +func (o *ResourceRemoteInfoZendeskRole) GetRoleIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RoleId, true +} + +// SetRoleId sets field value +func (o *ResourceRemoteInfoZendeskRole) SetRoleId(v string) { + o.RoleId = v +} + +func (o ResourceRemoteInfoZendeskRole) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceRemoteInfoZendeskRole) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role_id"] = o.RoleId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ResourceRemoteInfoZendeskRole) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "role_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResourceRemoteInfoZendeskRole := _ResourceRemoteInfoZendeskRole{} + + err = json.Unmarshal(data, &varResourceRemoteInfoZendeskRole) + + if err != nil { + return err + } + + *o = ResourceRemoteInfoZendeskRole(varResourceRemoteInfoZendeskRole) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableResourceRemoteInfoZendeskRole struct { + value *ResourceRemoteInfoZendeskRole + isSet bool +} + +func (v NullableResourceRemoteInfoZendeskRole) Get() *ResourceRemoteInfoZendeskRole { + return v.value +} + +func (v *NullableResourceRemoteInfoZendeskRole) Set(val *ResourceRemoteInfoZendeskRole) { + v.value = val + v.isSet = true +} + +func (v NullableResourceRemoteInfoZendeskRole) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceRemoteInfoZendeskRole) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceRemoteInfoZendeskRole(val *ResourceRemoteInfoZendeskRole) *NullableResourceRemoteInfoZendeskRole { + return &NullableResourceRemoteInfoZendeskRole{value: val, isSet: true} +} + +func (v NullableResourceRemoteInfoZendeskRole) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceRemoteInfoZendeskRole) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_resource_type_enum.go b/model_resource_type_enum.go index ac227ff..033e955 100644 --- a/model_resource_type_enum.go +++ b/model_resource_type_enum.go @@ -64,6 +64,8 @@ const ( RESOURCETYPEENUM_GOOGLE_WORKSPACE_ROLE ResourceTypeEnum = "GOOGLE_WORKSPACE_ROLE" RESOURCETYPEENUM_MONGO_INSTANCE ResourceTypeEnum = "MONGO_INSTANCE" RESOURCETYPEENUM_MONGO_ATLAS_INSTANCE ResourceTypeEnum = "MONGO_ATLAS_INSTANCE" + RESOURCETYPEENUM_NETSUITE_ROLE ResourceTypeEnum = "NETSUITE_ROLE" + RESOURCETYPEENUM_DATADOG_ROLE ResourceTypeEnum = "DATADOG_ROLE" RESOURCETYPEENUM_OKTA_APP ResourceTypeEnum = "OKTA_APP" RESOURCETYPEENUM_OKTA_ROLE ResourceTypeEnum = "OKTA_ROLE" RESOURCETYPEENUM_OPAL_ROLE ResourceTypeEnum = "OPAL_ROLE" @@ -96,6 +98,14 @@ const ( RESOURCETYPEENUM_VAULT_POLICY ResourceTypeEnum = "VAULT_POLICY" RESOURCETYPEENUM_VAULT_OIDC_ROLE ResourceTypeEnum = "VAULT_OIDC_ROLE" RESOURCETYPEENUM_GIT_HUB_ENTERPRISE_ROLE ResourceTypeEnum = "GIT_HUB_ENTERPRISE_ROLE" + RESOURCETYPEENUM_GRAFANA_FOLDER ResourceTypeEnum = "GRAFANA_FOLDER" + RESOURCETYPEENUM_GRAFANA_DASHBOARD ResourceTypeEnum = "GRAFANA_DASHBOARD" + RESOURCETYPEENUM_GRAFANA_BASIC_ROLE ResourceTypeEnum = "GRAFANA_BASIC_ROLE" + RESOURCETYPEENUM_GRAFANA_ROLE ResourceTypeEnum = "GRAFANA_ROLE" + RESOURCETYPEENUM_CLICKHOUSE_DATABASE ResourceTypeEnum = "CLICKHOUSE_DATABASE" + RESOURCETYPEENUM_CLICKHOUSE_TABLE ResourceTypeEnum = "CLICKHOUSE_TABLE" + RESOURCETYPEENUM_TWINGATE_RESOURCE ResourceTypeEnum = "TWINGATE_RESOURCE" + RESOURCETYPEENUM_ZENDESK_ROLE ResourceTypeEnum = "ZENDESK_ROLE" ) // All allowed values of ResourceTypeEnum enum @@ -143,6 +153,8 @@ var AllowedResourceTypeEnumEnumValues = []ResourceTypeEnum{ "GOOGLE_WORKSPACE_ROLE", "MONGO_INSTANCE", "MONGO_ATLAS_INSTANCE", + "NETSUITE_ROLE", + "DATADOG_ROLE", "OKTA_APP", "OKTA_ROLE", "OPAL_ROLE", @@ -175,6 +187,14 @@ var AllowedResourceTypeEnumEnumValues = []ResourceTypeEnum{ "VAULT_POLICY", "VAULT_OIDC_ROLE", "GIT_HUB_ENTERPRISE_ROLE", + "GRAFANA_FOLDER", + "GRAFANA_DASHBOARD", + "GRAFANA_BASIC_ROLE", + "GRAFANA_ROLE", + "CLICKHOUSE_DATABASE", + "CLICKHOUSE_TABLE", + "TWINGATE_RESOURCE", + "ZENDESK_ROLE", } func (v *ResourceTypeEnum) UnmarshalJSON(src []byte) error { diff --git a/model_reviewer_stage.go b/model_reviewer_stage.go index e65c19b..ad09542 100644 --- a/model_reviewer_stage.go +++ b/model_reviewer_stage.go @@ -27,7 +27,10 @@ type ReviewerStage struct { RequireAdminApproval *bool `json:"require_admin_approval,omitempty"` // The operator of the reviewer stage. Admin and manager approval are also treated as reviewers. Operator string `json:"operator"` + // The IDs of owners assigned as reviewers for this stage. OwnerIds []string `json:"owner_ids"` + // The IDs of service users assigned as reviewers for this stage. + ServiceUserIds []string `json:"service_user_ids,omitempty"` AdditionalProperties map[string]interface{} } @@ -157,6 +160,38 @@ func (o *ReviewerStage) SetOwnerIds(v []string) { o.OwnerIds = v } +// GetServiceUserIds returns the ServiceUserIds field value if set, zero value otherwise. +func (o *ReviewerStage) GetServiceUserIds() []string { + if o == nil || IsNil(o.ServiceUserIds) { + var ret []string + return ret + } + return o.ServiceUserIds +} + +// GetServiceUserIdsOk returns a tuple with the ServiceUserIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReviewerStage) GetServiceUserIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ServiceUserIds) { + return nil, false + } + return o.ServiceUserIds, true +} + +// HasServiceUserIds returns a boolean if a field has been set. +func (o *ReviewerStage) HasServiceUserIds() bool { + if o != nil && !IsNil(o.ServiceUserIds) { + return true + } + + return false +} + +// SetServiceUserIds gets a reference to the given []string and assigns it to the ServiceUserIds field. +func (o *ReviewerStage) SetServiceUserIds(v []string) { + o.ServiceUserIds = v +} + func (o ReviewerStage) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -173,6 +208,9 @@ func (o ReviewerStage) ToMap() (map[string]interface{}, error) { } toSerialize["operator"] = o.Operator toSerialize["owner_ids"] = o.OwnerIds + if !IsNil(o.ServiceUserIds) { + toSerialize["service_user_ids"] = o.ServiceUserIds + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -222,6 +260,7 @@ func (o *ReviewerStage) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "require_admin_approval") delete(additionalProperties, "operator") delete(additionalProperties, "owner_ids") + delete(additionalProperties, "service_user_ids") o.AdditionalProperties = additionalProperties } diff --git a/model_rule_disjunction.go b/model_rule_disjunction.go index 480fdf7..79b4916 100644 --- a/model_rule_disjunction.go +++ b/model_rule_disjunction.go @@ -22,6 +22,7 @@ var _ MappedNullable = &RuleDisjunction{} // RuleDisjunction struct for RuleDisjunction type RuleDisjunction struct { Selectors []TagSelector `json:"selectors"` + AttributeSelectors []UserAttributeSelector `json:"attribute_selectors,omitempty"` AdditionalProperties map[string]interface{} } @@ -69,6 +70,38 @@ func (o *RuleDisjunction) SetSelectors(v []TagSelector) { o.Selectors = v } +// GetAttributeSelectors returns the AttributeSelectors field value if set, zero value otherwise. +func (o *RuleDisjunction) GetAttributeSelectors() []UserAttributeSelector { + if o == nil || IsNil(o.AttributeSelectors) { + var ret []UserAttributeSelector + return ret + } + return o.AttributeSelectors +} + +// GetAttributeSelectorsOk returns a tuple with the AttributeSelectors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RuleDisjunction) GetAttributeSelectorsOk() ([]UserAttributeSelector, bool) { + if o == nil || IsNil(o.AttributeSelectors) { + return nil, false + } + return o.AttributeSelectors, true +} + +// HasAttributeSelectors returns a boolean if a field has been set. +func (o *RuleDisjunction) HasAttributeSelectors() bool { + if o != nil && !IsNil(o.AttributeSelectors) { + return true + } + + return false +} + +// SetAttributeSelectors gets a reference to the given []UserAttributeSelector and assigns it to the AttributeSelectors field. +func (o *RuleDisjunction) SetAttributeSelectors(v []UserAttributeSelector) { + o.AttributeSelectors = v +} + func (o RuleDisjunction) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -80,6 +113,9 @@ func (o RuleDisjunction) MarshalJSON() ([]byte, error) { func (o RuleDisjunction) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["selectors"] = o.Selectors + if !IsNil(o.AttributeSelectors) { + toSerialize["attribute_selectors"] = o.AttributeSelectors + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -124,6 +160,7 @@ func (o *RuleDisjunction) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "selectors") + delete(additionalProperties, "attribute_selectors") o.AdditionalProperties = additionalProperties } diff --git a/model_run_opal_query_request.go b/model_run_opal_query_request.go new file mode 100644 index 0000000..e420318 --- /dev/null +++ b/model_run_opal_query_request.go @@ -0,0 +1,282 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the RunOpalQueryRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunOpalQueryRequest{} + +// RunOpalQueryRequest Request body for running an ad-hoc OpalQuery. The `type` field determines which query schema applies. +type RunOpalQueryRequest struct { + Type string `json:"type"` + Query *OpalNodeQueryBody `json:"query,omitempty"` + // Maximum number of results to return. Defaults to 200. + First *int32 `json:"first,omitempty"` + // Cursor from a previous response to fetch the next page of results. + After *string `json:"after,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RunOpalQueryRequest RunOpalQueryRequest + +// NewRunOpalQueryRequest instantiates a new RunOpalQueryRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunOpalQueryRequest(type_ string) *RunOpalQueryRequest { + this := RunOpalQueryRequest{} + this.Type = type_ + return &this +} + +// NewRunOpalQueryRequestWithDefaults instantiates a new RunOpalQueryRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunOpalQueryRequestWithDefaults() *RunOpalQueryRequest { + this := RunOpalQueryRequest{} + return &this +} + +// GetType returns the Type field value +func (o *RunOpalQueryRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *RunOpalQueryRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *RunOpalQueryRequest) SetType(v string) { + o.Type = v +} + +// GetQuery returns the Query field value if set, zero value otherwise. +func (o *RunOpalQueryRequest) GetQuery() OpalNodeQueryBody { + if o == nil || IsNil(o.Query) { + var ret OpalNodeQueryBody + return ret + } + return *o.Query +} + +// GetQueryOk returns a tuple with the Query field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunOpalQueryRequest) GetQueryOk() (*OpalNodeQueryBody, bool) { + if o == nil || IsNil(o.Query) { + return nil, false + } + return o.Query, true +} + +// HasQuery returns a boolean if a field has been set. +func (o *RunOpalQueryRequest) HasQuery() bool { + if o != nil && !IsNil(o.Query) { + return true + } + + return false +} + +// SetQuery gets a reference to the given OpalNodeQueryBody and assigns it to the Query field. +func (o *RunOpalQueryRequest) SetQuery(v OpalNodeQueryBody) { + o.Query = &v +} + +// GetFirst returns the First field value if set, zero value otherwise. +func (o *RunOpalQueryRequest) GetFirst() int32 { + if o == nil || IsNil(o.First) { + var ret int32 + return ret + } + return *o.First +} + +// GetFirstOk returns a tuple with the First field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunOpalQueryRequest) GetFirstOk() (*int32, bool) { + if o == nil || IsNil(o.First) { + return nil, false + } + return o.First, true +} + +// HasFirst returns a boolean if a field has been set. +func (o *RunOpalQueryRequest) HasFirst() bool { + if o != nil && !IsNil(o.First) { + return true + } + + return false +} + +// SetFirst gets a reference to the given int32 and assigns it to the First field. +func (o *RunOpalQueryRequest) SetFirst(v int32) { + o.First = &v +} + +// GetAfter returns the After field value if set, zero value otherwise. +func (o *RunOpalQueryRequest) GetAfter() string { + if o == nil || IsNil(o.After) { + var ret string + return ret + } + return *o.After +} + +// GetAfterOk returns a tuple with the After field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunOpalQueryRequest) GetAfterOk() (*string, bool) { + if o == nil || IsNil(o.After) { + return nil, false + } + return o.After, true +} + +// HasAfter returns a boolean if a field has been set. +func (o *RunOpalQueryRequest) HasAfter() bool { + if o != nil && !IsNil(o.After) { + return true + } + + return false +} + +// SetAfter gets a reference to the given string and assigns it to the After field. +func (o *RunOpalQueryRequest) SetAfter(v string) { + o.After = &v +} + +func (o RunOpalQueryRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunOpalQueryRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if !IsNil(o.Query) { + toSerialize["query"] = o.Query + } + if !IsNil(o.First) { + toSerialize["first"] = o.First + } + if !IsNil(o.After) { + toSerialize["after"] = o.After + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RunOpalQueryRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRunOpalQueryRequest := _RunOpalQueryRequest{} + + err = json.Unmarshal(data, &varRunOpalQueryRequest) + + if err != nil { + return err + } + + *o = RunOpalQueryRequest(varRunOpalQueryRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "query") + delete(additionalProperties, "first") + delete(additionalProperties, "after") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRunOpalQueryRequest struct { + value *RunOpalQueryRequest + isSet bool +} + +func (v NullableRunOpalQueryRequest) Get() *RunOpalQueryRequest { + return v.value +} + +func (v *NullableRunOpalQueryRequest) Set(val *RunOpalQueryRequest) { + v.value = val + v.isSet = true +} + +func (v NullableRunOpalQueryRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableRunOpalQueryRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunOpalQueryRequest(val *RunOpalQueryRequest) *NullableRunOpalQueryRequest { + return &NullableRunOpalQueryRequest{value: val, isSet: true} +} + +func (v NullableRunOpalQueryRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunOpalQueryRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_string_match_type.go b/model_string_match_type.go new file mode 100644 index 0000000..3f9cd2b --- /dev/null +++ b/model_string_match_type.go @@ -0,0 +1,116 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// StringMatchType How to match a string value against entity names. +type StringMatchType string + +// List of StringMatchType +const ( + STRINGMATCHTYPE_CONTAINS StringMatchType = "CONTAINS" + STRINGMATCHTYPE_EQUALS StringMatchType = "EQUALS" + STRINGMATCHTYPE_STARTS_WITH StringMatchType = "STARTS_WITH" + STRINGMATCHTYPE_ENDS_WITH StringMatchType = "ENDS_WITH" +) + +// All allowed values of StringMatchType enum +var AllowedStringMatchTypeEnumValues = []StringMatchType{ + "CONTAINS", + "EQUALS", + "STARTS_WITH", + "ENDS_WITH", +} + +func (v *StringMatchType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := StringMatchType(value) + for _, existing := range AllowedStringMatchTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid StringMatchType", value) +} + +// NewStringMatchTypeFromValue returns a pointer to a valid StringMatchType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewStringMatchTypeFromValue(v string) (*StringMatchType, error) { + ev := StringMatchType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for StringMatchType: valid values are %v", v, AllowedStringMatchTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v StringMatchType) IsValid() bool { + for _, existing := range AllowedStringMatchTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to StringMatchType value +func (v StringMatchType) Ptr() *StringMatchType { + return &v +} + +type NullableStringMatchType struct { + value *StringMatchType + isSet bool +} + +func (v NullableStringMatchType) Get() *StringMatchType { + return v.value +} + +func (v *NullableStringMatchType) Set(val *StringMatchType) { + v.value = val + v.isSet = true +} + +func (v NullableStringMatchType) IsSet() bool { + return v.isSet +} + +func (v *NullableStringMatchType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStringMatchType(val *StringMatchType) *NullableStringMatchType { + return &NullableStringMatchType{value: val, isSet: true} +} + +func (v NullableStringMatchType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStringMatchType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/model_token.go b/model_token.go new file mode 100644 index 0000000..8007d29 --- /dev/null +++ b/model_token.go @@ -0,0 +1,396 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the Token type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Token{} + +// Token A first-party API token. +type Token struct { + // The ID of the API token. + TokenId string `json:"token_id"` + // The date and time the token was created. + CreatedAt time.Time `json:"created_at"` + // A human-readable label for the token. + TokenLabel string `json:"token_label"` + // The ID of the user who created the token. + CreatorUserId string `json:"creator_user_id"` + // The ID of the user the token authenticates as. + UserId string `json:"user_id"` + // The date and time the token was last used. + LastUsedAt *time.Time `json:"last_used_at,omitempty"` + AccessLevel ApiAccessLevelEnum `json:"access_level"` + // The date and time the token expires. + ExpiresAt *time.Time `json:"expires_at,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Token Token + +// NewToken instantiates a new Token object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewToken(tokenId string, createdAt time.Time, tokenLabel string, creatorUserId string, userId string, accessLevel ApiAccessLevelEnum) *Token { + this := Token{} + this.TokenId = tokenId + this.CreatedAt = createdAt + this.TokenLabel = tokenLabel + this.CreatorUserId = creatorUserId + this.UserId = userId + this.AccessLevel = accessLevel + return &this +} + +// NewTokenWithDefaults instantiates a new Token object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTokenWithDefaults() *Token { + this := Token{} + return &this +} + +// GetTokenId returns the TokenId field value +func (o *Token) GetTokenId() string { + if o == nil { + var ret string + return ret + } + + return o.TokenId +} + +// GetTokenIdOk returns a tuple with the TokenId field value +// and a boolean to check if the value has been set. +func (o *Token) GetTokenIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TokenId, true +} + +// SetTokenId sets field value +func (o *Token) SetTokenId(v string) { + o.TokenId = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *Token) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *Token) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *Token) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetTokenLabel returns the TokenLabel field value +func (o *Token) GetTokenLabel() string { + if o == nil { + var ret string + return ret + } + + return o.TokenLabel +} + +// GetTokenLabelOk returns a tuple with the TokenLabel field value +// and a boolean to check if the value has been set. +func (o *Token) GetTokenLabelOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TokenLabel, true +} + +// SetTokenLabel sets field value +func (o *Token) SetTokenLabel(v string) { + o.TokenLabel = v +} + +// GetCreatorUserId returns the CreatorUserId field value +func (o *Token) GetCreatorUserId() string { + if o == nil { + var ret string + return ret + } + + return o.CreatorUserId +} + +// GetCreatorUserIdOk returns a tuple with the CreatorUserId field value +// and a boolean to check if the value has been set. +func (o *Token) GetCreatorUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatorUserId, true +} + +// SetCreatorUserId sets field value +func (o *Token) SetCreatorUserId(v string) { + o.CreatorUserId = v +} + +// GetUserId returns the UserId field value +func (o *Token) GetUserId() string { + if o == nil { + var ret string + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *Token) GetUserIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *Token) SetUserId(v string) { + o.UserId = v +} + +// GetLastUsedAt returns the LastUsedAt field value if set, zero value otherwise. +func (o *Token) GetLastUsedAt() time.Time { + if o == nil || IsNil(o.LastUsedAt) { + var ret time.Time + return ret + } + return *o.LastUsedAt +} + +// GetLastUsedAtOk returns a tuple with the LastUsedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Token) GetLastUsedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastUsedAt) { + return nil, false + } + return o.LastUsedAt, true +} + +// HasLastUsedAt returns a boolean if a field has been set. +func (o *Token) HasLastUsedAt() bool { + if o != nil && !IsNil(o.LastUsedAt) { + return true + } + + return false +} + +// SetLastUsedAt gets a reference to the given time.Time and assigns it to the LastUsedAt field. +func (o *Token) SetLastUsedAt(v time.Time) { + o.LastUsedAt = &v +} + +// GetAccessLevel returns the AccessLevel field value +func (o *Token) GetAccessLevel() ApiAccessLevelEnum { + if o == nil { + var ret ApiAccessLevelEnum + return ret + } + + return o.AccessLevel +} + +// GetAccessLevelOk returns a tuple with the AccessLevel field value +// and a boolean to check if the value has been set. +func (o *Token) GetAccessLevelOk() (*ApiAccessLevelEnum, bool) { + if o == nil { + return nil, false + } + return &o.AccessLevel, true +} + +// SetAccessLevel sets field value +func (o *Token) SetAccessLevel(v ApiAccessLevelEnum) { + o.AccessLevel = v +} + +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. +func (o *Token) GetExpiresAt() time.Time { + if o == nil || IsNil(o.ExpiresAt) { + var ret time.Time + return ret + } + return *o.ExpiresAt +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Token) GetExpiresAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.ExpiresAt) { + return nil, false + } + return o.ExpiresAt, true +} + +// HasExpiresAt returns a boolean if a field has been set. +func (o *Token) HasExpiresAt() bool { + if o != nil && !IsNil(o.ExpiresAt) { + return true + } + + return false +} + +// SetExpiresAt gets a reference to the given time.Time and assigns it to the ExpiresAt field. +func (o *Token) SetExpiresAt(v time.Time) { + o.ExpiresAt = &v +} + +func (o Token) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Token) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["token_id"] = o.TokenId + toSerialize["created_at"] = o.CreatedAt + toSerialize["token_label"] = o.TokenLabel + toSerialize["creator_user_id"] = o.CreatorUserId + toSerialize["user_id"] = o.UserId + if !IsNil(o.LastUsedAt) { + toSerialize["last_used_at"] = o.LastUsedAt + } + toSerialize["access_level"] = o.AccessLevel + if !IsNil(o.ExpiresAt) { + toSerialize["expires_at"] = o.ExpiresAt + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Token) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "token_id", + "created_at", + "token_label", + "creator_user_id", + "user_id", + "access_level", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varToken := _Token{} + + err = json.Unmarshal(data, &varToken) + + if err != nil { + return err + } + + *o = Token(varToken) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "token_id") + delete(additionalProperties, "created_at") + delete(additionalProperties, "token_label") + delete(additionalProperties, "creator_user_id") + delete(additionalProperties, "user_id") + delete(additionalProperties, "last_used_at") + delete(additionalProperties, "access_level") + delete(additionalProperties, "expires_at") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableToken struct { + value *Token + isSet bool +} + +func (v NullableToken) Get() *Token { + return v.value +} + +func (v *NullableToken) Set(val *Token) { + v.value = val + v.isSet = true +} + +func (v NullableToken) IsSet() bool { + return v.isSet +} + +func (v *NullableToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableToken(val *Token) *NullableToken { + return &NullableToken{value: val, isSet: true} +} + +func (v NullableToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_update_event_stream_info.go b/model_update_event_stream_info.go new file mode 100644 index 0000000..32d92c9 --- /dev/null +++ b/model_update_event_stream_info.go @@ -0,0 +1,270 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" +) + +// checks if the UpdateEventStreamInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateEventStreamInfo{} + +// UpdateEventStreamInfo Information needed to update an event stream. +type UpdateEventStreamInfo struct { + // Updated name for the event stream. + Name *string `json:"name,omitempty"` + // Whether the event stream should be enabled. + Enabled *bool `json:"enabled,omitempty"` + // Updated webhook URL. + WebhookUrl *string `json:"webhook_url,omitempty"` + Credentials *WebhookCredentials `json:"credentials,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateEventStreamInfo UpdateEventStreamInfo + +// NewUpdateEventStreamInfo instantiates a new UpdateEventStreamInfo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateEventStreamInfo() *UpdateEventStreamInfo { + this := UpdateEventStreamInfo{} + return &this +} + +// NewUpdateEventStreamInfoWithDefaults instantiates a new UpdateEventStreamInfo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateEventStreamInfoWithDefaults() *UpdateEventStreamInfo { + this := UpdateEventStreamInfo{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateEventStreamInfo) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateEventStreamInfo) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateEventStreamInfo) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateEventStreamInfo) SetName(v string) { + o.Name = &v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *UpdateEventStreamInfo) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateEventStreamInfo) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *UpdateEventStreamInfo) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *UpdateEventStreamInfo) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetWebhookUrl returns the WebhookUrl field value if set, zero value otherwise. +func (o *UpdateEventStreamInfo) GetWebhookUrl() string { + if o == nil || IsNil(o.WebhookUrl) { + var ret string + return ret + } + return *o.WebhookUrl +} + +// GetWebhookUrlOk returns a tuple with the WebhookUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateEventStreamInfo) GetWebhookUrlOk() (*string, bool) { + if o == nil || IsNil(o.WebhookUrl) { + return nil, false + } + return o.WebhookUrl, true +} + +// HasWebhookUrl returns a boolean if a field has been set. +func (o *UpdateEventStreamInfo) HasWebhookUrl() bool { + if o != nil && !IsNil(o.WebhookUrl) { + return true + } + + return false +} + +// SetWebhookUrl gets a reference to the given string and assigns it to the WebhookUrl field. +func (o *UpdateEventStreamInfo) SetWebhookUrl(v string) { + o.WebhookUrl = &v +} + +// GetCredentials returns the Credentials field value if set, zero value otherwise. +func (o *UpdateEventStreamInfo) GetCredentials() WebhookCredentials { + if o == nil || IsNil(o.Credentials) { + var ret WebhookCredentials + return ret + } + return *o.Credentials +} + +// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateEventStreamInfo) GetCredentialsOk() (*WebhookCredentials, bool) { + if o == nil || IsNil(o.Credentials) { + return nil, false + } + return o.Credentials, true +} + +// HasCredentials returns a boolean if a field has been set. +func (o *UpdateEventStreamInfo) HasCredentials() bool { + if o != nil && !IsNil(o.Credentials) { + return true + } + + return false +} + +// SetCredentials gets a reference to the given WebhookCredentials and assigns it to the Credentials field. +func (o *UpdateEventStreamInfo) SetCredentials(v WebhookCredentials) { + o.Credentials = &v +} + +func (o UpdateEventStreamInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateEventStreamInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.WebhookUrl) { + toSerialize["webhook_url"] = o.WebhookUrl + } + if !IsNil(o.Credentials) { + toSerialize["credentials"] = o.Credentials + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateEventStreamInfo) UnmarshalJSON(data []byte) (err error) { + varUpdateEventStreamInfo := _UpdateEventStreamInfo{} + + err = json.Unmarshal(data, &varUpdateEventStreamInfo) + + if err != nil { + return err + } + + *o = UpdateEventStreamInfo(varUpdateEventStreamInfo) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "enabled") + delete(additionalProperties, "webhook_url") + delete(additionalProperties, "credentials") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateEventStreamInfo struct { + value *UpdateEventStreamInfo + isSet bool +} + +func (v NullableUpdateEventStreamInfo) Get() *UpdateEventStreamInfo { + return v.value +} + +func (v *NullableUpdateEventStreamInfo) Set(val *UpdateEventStreamInfo) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateEventStreamInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateEventStreamInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateEventStreamInfo(val *UpdateEventStreamInfo) *NullableUpdateEventStreamInfo { + return &NullableUpdateEventStreamInfo{value: val, isSet: true} +} + +func (v NullableUpdateEventStreamInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateEventStreamInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_update_group_user_request.go b/model_update_group_user_request.go index aed0731..7a42b87 100644 --- a/model_update_group_user_request.go +++ b/model_update_group_user_request.go @@ -21,7 +21,7 @@ var _ MappedNullable = &UpdateGroupUserRequest{} // UpdateGroupUserRequest struct for UpdateGroupUserRequest type UpdateGroupUserRequest struct { - // The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite. + // The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite, or a negative value to revoke access. DurationMinutes int32 `json:"duration_minutes"` // The updated remote ID of the access level granted to this user. AccessLevelRemoteId *string `json:"access_level_remote_id,omitempty"` diff --git a/model_update_resource_custom_access_level_info.go b/model_update_resource_custom_access_level_info.go new file mode 100644 index 0000000..76866af --- /dev/null +++ b/model_update_resource_custom_access_level_info.go @@ -0,0 +1,309 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" +) + +// checks if the UpdateResourceCustomAccessLevelInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateResourceCustomAccessLevelInfo{} + +// UpdateResourceCustomAccessLevelInfo Info for updating a custom access level. +type UpdateResourceCustomAccessLevelInfo struct { + // The new human-readable name. + AccessLevelName *string `json:"access_level_name,omitempty"` + // The new policy document. + Policy *string `json:"policy,omitempty"` + // Whether the role is requestable. + RequestableByDefault *bool `json:"requestable_by_default,omitempty"` + // The new sensitivity index. + StackableSensitivityIndex *int32 `json:"stackable_sensitivity_index,omitempty"` + // Set to true to remove from the hierarchy. + ClearStackableSensitivityIndex *bool `json:"clear_stackable_sensitivity_index,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateResourceCustomAccessLevelInfo UpdateResourceCustomAccessLevelInfo + +// NewUpdateResourceCustomAccessLevelInfo instantiates a new UpdateResourceCustomAccessLevelInfo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateResourceCustomAccessLevelInfo() *UpdateResourceCustomAccessLevelInfo { + this := UpdateResourceCustomAccessLevelInfo{} + return &this +} + +// NewUpdateResourceCustomAccessLevelInfoWithDefaults instantiates a new UpdateResourceCustomAccessLevelInfo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateResourceCustomAccessLevelInfoWithDefaults() *UpdateResourceCustomAccessLevelInfo { + this := UpdateResourceCustomAccessLevelInfo{} + return &this +} + +// GetAccessLevelName returns the AccessLevelName field value if set, zero value otherwise. +func (o *UpdateResourceCustomAccessLevelInfo) GetAccessLevelName() string { + if o == nil || IsNil(o.AccessLevelName) { + var ret string + return ret + } + return *o.AccessLevelName +} + +// GetAccessLevelNameOk returns a tuple with the AccessLevelName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateResourceCustomAccessLevelInfo) GetAccessLevelNameOk() (*string, bool) { + if o == nil || IsNil(o.AccessLevelName) { + return nil, false + } + return o.AccessLevelName, true +} + +// HasAccessLevelName returns a boolean if a field has been set. +func (o *UpdateResourceCustomAccessLevelInfo) HasAccessLevelName() bool { + if o != nil && !IsNil(o.AccessLevelName) { + return true + } + + return false +} + +// SetAccessLevelName gets a reference to the given string and assigns it to the AccessLevelName field. +func (o *UpdateResourceCustomAccessLevelInfo) SetAccessLevelName(v string) { + o.AccessLevelName = &v +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *UpdateResourceCustomAccessLevelInfo) GetPolicy() string { + if o == nil || IsNil(o.Policy) { + var ret string + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateResourceCustomAccessLevelInfo) GetPolicyOk() (*string, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *UpdateResourceCustomAccessLevelInfo) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given string and assigns it to the Policy field. +func (o *UpdateResourceCustomAccessLevelInfo) SetPolicy(v string) { + o.Policy = &v +} + +// GetRequestableByDefault returns the RequestableByDefault field value if set, zero value otherwise. +func (o *UpdateResourceCustomAccessLevelInfo) GetRequestableByDefault() bool { + if o == nil || IsNil(o.RequestableByDefault) { + var ret bool + return ret + } + return *o.RequestableByDefault +} + +// GetRequestableByDefaultOk returns a tuple with the RequestableByDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateResourceCustomAccessLevelInfo) GetRequestableByDefaultOk() (*bool, bool) { + if o == nil || IsNil(o.RequestableByDefault) { + return nil, false + } + return o.RequestableByDefault, true +} + +// HasRequestableByDefault returns a boolean if a field has been set. +func (o *UpdateResourceCustomAccessLevelInfo) HasRequestableByDefault() bool { + if o != nil && !IsNil(o.RequestableByDefault) { + return true + } + + return false +} + +// SetRequestableByDefault gets a reference to the given bool and assigns it to the RequestableByDefault field. +func (o *UpdateResourceCustomAccessLevelInfo) SetRequestableByDefault(v bool) { + o.RequestableByDefault = &v +} + +// GetStackableSensitivityIndex returns the StackableSensitivityIndex field value if set, zero value otherwise. +func (o *UpdateResourceCustomAccessLevelInfo) GetStackableSensitivityIndex() int32 { + if o == nil || IsNil(o.StackableSensitivityIndex) { + var ret int32 + return ret + } + return *o.StackableSensitivityIndex +} + +// GetStackableSensitivityIndexOk returns a tuple with the StackableSensitivityIndex field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateResourceCustomAccessLevelInfo) GetStackableSensitivityIndexOk() (*int32, bool) { + if o == nil || IsNil(o.StackableSensitivityIndex) { + return nil, false + } + return o.StackableSensitivityIndex, true +} + +// HasStackableSensitivityIndex returns a boolean if a field has been set. +func (o *UpdateResourceCustomAccessLevelInfo) HasStackableSensitivityIndex() bool { + if o != nil && !IsNil(o.StackableSensitivityIndex) { + return true + } + + return false +} + +// SetStackableSensitivityIndex gets a reference to the given int32 and assigns it to the StackableSensitivityIndex field. +func (o *UpdateResourceCustomAccessLevelInfo) SetStackableSensitivityIndex(v int32) { + o.StackableSensitivityIndex = &v +} + +// GetClearStackableSensitivityIndex returns the ClearStackableSensitivityIndex field value if set, zero value otherwise. +func (o *UpdateResourceCustomAccessLevelInfo) GetClearStackableSensitivityIndex() bool { + if o == nil || IsNil(o.ClearStackableSensitivityIndex) { + var ret bool + return ret + } + return *o.ClearStackableSensitivityIndex +} + +// GetClearStackableSensitivityIndexOk returns a tuple with the ClearStackableSensitivityIndex field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateResourceCustomAccessLevelInfo) GetClearStackableSensitivityIndexOk() (*bool, bool) { + if o == nil || IsNil(o.ClearStackableSensitivityIndex) { + return nil, false + } + return o.ClearStackableSensitivityIndex, true +} + +// HasClearStackableSensitivityIndex returns a boolean if a field has been set. +func (o *UpdateResourceCustomAccessLevelInfo) HasClearStackableSensitivityIndex() bool { + if o != nil && !IsNil(o.ClearStackableSensitivityIndex) { + return true + } + + return false +} + +// SetClearStackableSensitivityIndex gets a reference to the given bool and assigns it to the ClearStackableSensitivityIndex field. +func (o *UpdateResourceCustomAccessLevelInfo) SetClearStackableSensitivityIndex(v bool) { + o.ClearStackableSensitivityIndex = &v +} + +func (o UpdateResourceCustomAccessLevelInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateResourceCustomAccessLevelInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AccessLevelName) { + toSerialize["access_level_name"] = o.AccessLevelName + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if !IsNil(o.RequestableByDefault) { + toSerialize["requestable_by_default"] = o.RequestableByDefault + } + if !IsNil(o.StackableSensitivityIndex) { + toSerialize["stackable_sensitivity_index"] = o.StackableSensitivityIndex + } + if !IsNil(o.ClearStackableSensitivityIndex) { + toSerialize["clear_stackable_sensitivity_index"] = o.ClearStackableSensitivityIndex + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateResourceCustomAccessLevelInfo) UnmarshalJSON(data []byte) (err error) { + varUpdateResourceCustomAccessLevelInfo := _UpdateResourceCustomAccessLevelInfo{} + + err = json.Unmarshal(data, &varUpdateResourceCustomAccessLevelInfo) + + if err != nil { + return err + } + + *o = UpdateResourceCustomAccessLevelInfo(varUpdateResourceCustomAccessLevelInfo) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "access_level_name") + delete(additionalProperties, "policy") + delete(additionalProperties, "requestable_by_default") + delete(additionalProperties, "stackable_sensitivity_index") + delete(additionalProperties, "clear_stackable_sensitivity_index") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateResourceCustomAccessLevelInfo struct { + value *UpdateResourceCustomAccessLevelInfo + isSet bool +} + +func (v NullableUpdateResourceCustomAccessLevelInfo) Get() *UpdateResourceCustomAccessLevelInfo { + return v.value +} + +func (v *NullableUpdateResourceCustomAccessLevelInfo) Set(val *UpdateResourceCustomAccessLevelInfo) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateResourceCustomAccessLevelInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateResourceCustomAccessLevelInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateResourceCustomAccessLevelInfo(val *UpdateResourceCustomAccessLevelInfo) *NullableUpdateResourceCustomAccessLevelInfo { + return &NullableUpdateResourceCustomAccessLevelInfo{value: val, isSet: true} +} + +func (v NullableUpdateResourceCustomAccessLevelInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateResourceCustomAccessLevelInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_update_resource_info.go b/model_update_resource_info.go index 4756690..4d7fd3c 100644 --- a/model_update_resource_info.go +++ b/model_update_resource_info.go @@ -69,6 +69,8 @@ type UpdateResourceInfo struct { // 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. // Deprecated ExtensionsDurationInMinutes *int32 `json:"extensions_duration_in_minutes,omitempty"` + // The ID of the parent resource. + ParentResourceId *string `json:"parent_resource_id,omitempty"` // A list of configurations for requests to this resource. If not provided, the default request configuration will be used. RequestConfigurations []RequestConfiguration `json:"request_configurations,omitempty"` // 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`. @@ -759,6 +761,38 @@ func (o *UpdateResourceInfo) SetExtensionsDurationInMinutes(v int32) { o.ExtensionsDurationInMinutes = &v } +// GetParentResourceId returns the ParentResourceId field value if set, zero value otherwise. +func (o *UpdateResourceInfo) GetParentResourceId() string { + if o == nil || IsNil(o.ParentResourceId) { + var ret string + return ret + } + return *o.ParentResourceId +} + +// GetParentResourceIdOk returns a tuple with the ParentResourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateResourceInfo) GetParentResourceIdOk() (*string, bool) { + if o == nil || IsNil(o.ParentResourceId) { + return nil, false + } + return o.ParentResourceId, true +} + +// HasParentResourceId returns a boolean if a field has been set. +func (o *UpdateResourceInfo) HasParentResourceId() bool { + if o != nil && !IsNil(o.ParentResourceId) { + return true + } + + return false +} + +// SetParentResourceId gets a reference to the given string and assigns it to the ParentResourceId field. +func (o *UpdateResourceInfo) SetParentResourceId(v string) { + o.ParentResourceId = &v +} + // GetRequestConfigurations returns the RequestConfigurations field value if set, zero value otherwise. func (o *UpdateResourceInfo) GetRequestConfigurations() []RequestConfiguration { if o == nil || IsNil(o.RequestConfigurations) { @@ -894,6 +928,9 @@ func (o UpdateResourceInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.ExtensionsDurationInMinutes) { toSerialize["extensions_duration_in_minutes"] = o.ExtensionsDurationInMinutes } + if !IsNil(o.ParentResourceId) { + toSerialize["parent_resource_id"] = o.ParentResourceId + } if !IsNil(o.RequestConfigurations) { toSerialize["request_configurations"] = o.RequestConfigurations } @@ -963,6 +1000,7 @@ func (o *UpdateResourceInfo) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "request_template_id") delete(additionalProperties, "is_requestable") delete(additionalProperties, "extensions_duration_in_minutes") + delete(additionalProperties, "parent_resource_id") delete(additionalProperties, "request_configurations") delete(additionalProperties, "request_configuration_list") o.AdditionalProperties = additionalProperties diff --git a/model_user_attribute_selector.go b/model_user_attribute_selector.go new file mode 100644 index 0000000..e82b1dc --- /dev/null +++ b/model_user_attribute_selector.go @@ -0,0 +1,198 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the UserAttributeSelector type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserAttributeSelector{} + +// UserAttributeSelector struct for UserAttributeSelector +type UserAttributeSelector struct { + Attribute string `json:"attribute"` + Values []string `json:"values"` + AdditionalProperties map[string]interface{} +} + +type _UserAttributeSelector UserAttributeSelector + +// NewUserAttributeSelector instantiates a new UserAttributeSelector object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserAttributeSelector(attribute string, values []string) *UserAttributeSelector { + this := UserAttributeSelector{} + this.Attribute = attribute + this.Values = values + return &this +} + +// NewUserAttributeSelectorWithDefaults instantiates a new UserAttributeSelector object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserAttributeSelectorWithDefaults() *UserAttributeSelector { + this := UserAttributeSelector{} + return &this +} + +// GetAttribute returns the Attribute field value +func (o *UserAttributeSelector) GetAttribute() string { + if o == nil { + var ret string + return ret + } + + return o.Attribute +} + +// GetAttributeOk returns a tuple with the Attribute field value +// and a boolean to check if the value has been set. +func (o *UserAttributeSelector) GetAttributeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Attribute, true +} + +// SetAttribute sets field value +func (o *UserAttributeSelector) SetAttribute(v string) { + o.Attribute = v +} + +// GetValues returns the Values field value +func (o *UserAttributeSelector) GetValues() []string { + if o == nil { + var ret []string + return ret + } + + return o.Values +} + +// GetValuesOk returns a tuple with the Values field value +// and a boolean to check if the value has been set. +func (o *UserAttributeSelector) GetValuesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Values, true +} + +// SetValues sets field value +func (o *UserAttributeSelector) SetValues(v []string) { + o.Values = v +} + +func (o UserAttributeSelector) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserAttributeSelector) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["attribute"] = o.Attribute + toSerialize["values"] = o.Values + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UserAttributeSelector) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "attribute", + "values", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserAttributeSelector := _UserAttributeSelector{} + + err = json.Unmarshal(data, &varUserAttributeSelector) + + if err != nil { + return err + } + + *o = UserAttributeSelector(varUserAttributeSelector) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "attribute") + delete(additionalProperties, "values") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUserAttributeSelector struct { + value *UserAttributeSelector + isSet bool +} + +func (v NullableUserAttributeSelector) Get() *UserAttributeSelector { + return v.value +} + +func (v *NullableUserAttributeSelector) Set(val *UserAttributeSelector) { + v.value = val + v.isSet = true +} + +func (v NullableUserAttributeSelector) IsSet() bool { + return v.isSet +} + +func (v *NullableUserAttributeSelector) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserAttributeSelector(val *UserAttributeSelector) *NullableUserAttributeSelector { + return &NullableUserAttributeSelector{value: val, isSet: true} +} + +func (v NullableUserAttributeSelector) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserAttributeSelector) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_webhook_api_key_credential.go b/model_webhook_api_key_credential.go new file mode 100644 index 0000000..1d5ec12 --- /dev/null +++ b/model_webhook_api_key_credential.go @@ -0,0 +1,259 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the WebhookApiKeyCredential type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WebhookApiKeyCredential{} + +// WebhookApiKeyCredential An API key credential for webhook authentication. +type WebhookApiKeyCredential struct { + // The unique identifier for the credential. + Id string `json:"id"` + // The name of the API key. + Name string `json:"name"` + // The value of the API key. + Value string `json:"value"` + Location WebhookApiKeyLocationEnum `json:"location"` + AdditionalProperties map[string]interface{} +} + +type _WebhookApiKeyCredential WebhookApiKeyCredential + +// NewWebhookApiKeyCredential instantiates a new WebhookApiKeyCredential object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWebhookApiKeyCredential(id string, name string, value string, location WebhookApiKeyLocationEnum) *WebhookApiKeyCredential { + this := WebhookApiKeyCredential{} + this.Id = id + this.Name = name + this.Value = value + this.Location = location + return &this +} + +// NewWebhookApiKeyCredentialWithDefaults instantiates a new WebhookApiKeyCredential object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWebhookApiKeyCredentialWithDefaults() *WebhookApiKeyCredential { + this := WebhookApiKeyCredential{} + return &this +} + +// GetId returns the Id field value +func (o *WebhookApiKeyCredential) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WebhookApiKeyCredential) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *WebhookApiKeyCredential) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *WebhookApiKeyCredential) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WebhookApiKeyCredential) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *WebhookApiKeyCredential) SetName(v string) { + o.Name = v +} + +// GetValue returns the Value field value +func (o *WebhookApiKeyCredential) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *WebhookApiKeyCredential) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *WebhookApiKeyCredential) SetValue(v string) { + o.Value = v +} + +// GetLocation returns the Location field value +func (o *WebhookApiKeyCredential) GetLocation() WebhookApiKeyLocationEnum { + if o == nil { + var ret WebhookApiKeyLocationEnum + return ret + } + + return o.Location +} + +// GetLocationOk returns a tuple with the Location field value +// and a boolean to check if the value has been set. +func (o *WebhookApiKeyCredential) GetLocationOk() (*WebhookApiKeyLocationEnum, bool) { + if o == nil { + return nil, false + } + return &o.Location, true +} + +// SetLocation sets field value +func (o *WebhookApiKeyCredential) SetLocation(v WebhookApiKeyLocationEnum) { + o.Location = v +} + +func (o WebhookApiKeyCredential) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WebhookApiKeyCredential) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["value"] = o.Value + toSerialize["location"] = o.Location + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *WebhookApiKeyCredential) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "value", + "location", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWebhookApiKeyCredential := _WebhookApiKeyCredential{} + + err = json.Unmarshal(data, &varWebhookApiKeyCredential) + + if err != nil { + return err + } + + *o = WebhookApiKeyCredential(varWebhookApiKeyCredential) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "value") + delete(additionalProperties, "location") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableWebhookApiKeyCredential struct { + value *WebhookApiKeyCredential + isSet bool +} + +func (v NullableWebhookApiKeyCredential) Get() *WebhookApiKeyCredential { + return v.value +} + +func (v *NullableWebhookApiKeyCredential) Set(val *WebhookApiKeyCredential) { + v.value = val + v.isSet = true +} + +func (v NullableWebhookApiKeyCredential) IsSet() bool { + return v.isSet +} + +func (v *NullableWebhookApiKeyCredential) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWebhookApiKeyCredential(val *WebhookApiKeyCredential) *NullableWebhookApiKeyCredential { + return &NullableWebhookApiKeyCredential{value: val, isSet: true} +} + +func (v NullableWebhookApiKeyCredential) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWebhookApiKeyCredential) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_webhook_api_key_location_enum.go b/model_webhook_api_key_location_enum.go new file mode 100644 index 0000000..0410a9d --- /dev/null +++ b/model_webhook_api_key_location_enum.go @@ -0,0 +1,112 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// WebhookApiKeyLocationEnum Where the API key is placed in webhook requests. +type WebhookApiKeyLocationEnum string + +// List of WebhookApiKeyLocationEnum +const ( + WEBHOOKAPIKEYLOCATIONENUM_HEADER WebhookApiKeyLocationEnum = "HEADER" + WEBHOOKAPIKEYLOCATIONENUM_QUERY_PARAM WebhookApiKeyLocationEnum = "QUERY_PARAM" +) + +// All allowed values of WebhookApiKeyLocationEnum enum +var AllowedWebhookApiKeyLocationEnumEnumValues = []WebhookApiKeyLocationEnum{ + "HEADER", + "QUERY_PARAM", +} + +func (v *WebhookApiKeyLocationEnum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := WebhookApiKeyLocationEnum(value) + for _, existing := range AllowedWebhookApiKeyLocationEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid WebhookApiKeyLocationEnum", value) +} + +// NewWebhookApiKeyLocationEnumFromValue returns a pointer to a valid WebhookApiKeyLocationEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewWebhookApiKeyLocationEnumFromValue(v string) (*WebhookApiKeyLocationEnum, error) { + ev := WebhookApiKeyLocationEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for WebhookApiKeyLocationEnum: valid values are %v", v, AllowedWebhookApiKeyLocationEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v WebhookApiKeyLocationEnum) IsValid() bool { + for _, existing := range AllowedWebhookApiKeyLocationEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to WebhookApiKeyLocationEnum value +func (v WebhookApiKeyLocationEnum) Ptr() *WebhookApiKeyLocationEnum { + return &v +} + +type NullableWebhookApiKeyLocationEnum struct { + value *WebhookApiKeyLocationEnum + isSet bool +} + +func (v NullableWebhookApiKeyLocationEnum) Get() *WebhookApiKeyLocationEnum { + return v.value +} + +func (v *NullableWebhookApiKeyLocationEnum) Set(val *WebhookApiKeyLocationEnum) { + v.value = val + v.isSet = true +} + +func (v NullableWebhookApiKeyLocationEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableWebhookApiKeyLocationEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWebhookApiKeyLocationEnum(val *WebhookApiKeyLocationEnum) *NullableWebhookApiKeyLocationEnum { + return &NullableWebhookApiKeyLocationEnum{value: val, isSet: true} +} + +func (v NullableWebhookApiKeyLocationEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWebhookApiKeyLocationEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/model_webhook_auth_type_enum.go b/model_webhook_auth_type_enum.go new file mode 100644 index 0000000..a430115 --- /dev/null +++ b/model_webhook_auth_type_enum.go @@ -0,0 +1,114 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// WebhookAuthTypeEnum The authentication type for webhook connections. +type WebhookAuthTypeEnum string + +// List of WebhookAuthTypeEnum +const ( + WEBHOOKAUTHTYPEENUM_NONE WebhookAuthTypeEnum = "NONE" + WEBHOOKAUTHTYPEENUM_API_KEY WebhookAuthTypeEnum = "API_KEY" + WEBHOOKAUTHTYPEENUM_HMAC WebhookAuthTypeEnum = "HMAC" +) + +// All allowed values of WebhookAuthTypeEnum enum +var AllowedWebhookAuthTypeEnumEnumValues = []WebhookAuthTypeEnum{ + "NONE", + "API_KEY", + "HMAC", +} + +func (v *WebhookAuthTypeEnum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := WebhookAuthTypeEnum(value) + for _, existing := range AllowedWebhookAuthTypeEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid WebhookAuthTypeEnum", value) +} + +// NewWebhookAuthTypeEnumFromValue returns a pointer to a valid WebhookAuthTypeEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewWebhookAuthTypeEnumFromValue(v string) (*WebhookAuthTypeEnum, error) { + ev := WebhookAuthTypeEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for WebhookAuthTypeEnum: valid values are %v", v, AllowedWebhookAuthTypeEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v WebhookAuthTypeEnum) IsValid() bool { + for _, existing := range AllowedWebhookAuthTypeEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to WebhookAuthTypeEnum value +func (v WebhookAuthTypeEnum) Ptr() *WebhookAuthTypeEnum { + return &v +} + +type NullableWebhookAuthTypeEnum struct { + value *WebhookAuthTypeEnum + isSet bool +} + +func (v NullableWebhookAuthTypeEnum) Get() *WebhookAuthTypeEnum { + return v.value +} + +func (v *NullableWebhookAuthTypeEnum) Set(val *WebhookAuthTypeEnum) { + v.value = val + v.isSet = true +} + +func (v NullableWebhookAuthTypeEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableWebhookAuthTypeEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWebhookAuthTypeEnum(val *WebhookAuthTypeEnum) *NullableWebhookAuthTypeEnum { + return &NullableWebhookAuthTypeEnum{value: val, isSet: true} +} + +func (v NullableWebhookAuthTypeEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWebhookAuthTypeEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/model_webhook_credentials.go b/model_webhook_credentials.go new file mode 100644 index 0000000..be44d70 --- /dev/null +++ b/model_webhook_credentials.go @@ -0,0 +1,283 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "fmt" +) + +// checks if the WebhookCredentials type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WebhookCredentials{} + +// WebhookCredentials Authentication credentials for a webhook connection. +type WebhookCredentials struct { + AuthType WebhookAuthTypeEnum `json:"auth_type"` + // API key credentials, present when auth_type is API_KEY. + ApiKeyCredentials []WebhookApiKeyCredential `json:"api_key_credentials,omitempty"` + // Primary HMAC credential, present when auth_type is HMAC. + HmacCredential1 *WebhookHmacCredential `json:"hmac_credential_1,omitempty"` + // Secondary HMAC credential for rotation, present when auth_type is HMAC. + HmacCredential2 *WebhookHmacCredential `json:"hmac_credential_2,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _WebhookCredentials WebhookCredentials + +// NewWebhookCredentials instantiates a new WebhookCredentials object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWebhookCredentials(authType WebhookAuthTypeEnum) *WebhookCredentials { + this := WebhookCredentials{} + this.AuthType = authType + return &this +} + +// NewWebhookCredentialsWithDefaults instantiates a new WebhookCredentials object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWebhookCredentialsWithDefaults() *WebhookCredentials { + this := WebhookCredentials{} + return &this +} + +// GetAuthType returns the AuthType field value +func (o *WebhookCredentials) GetAuthType() WebhookAuthTypeEnum { + if o == nil { + var ret WebhookAuthTypeEnum + return ret + } + + return o.AuthType +} + +// GetAuthTypeOk returns a tuple with the AuthType field value +// and a boolean to check if the value has been set. +func (o *WebhookCredentials) GetAuthTypeOk() (*WebhookAuthTypeEnum, bool) { + if o == nil { + return nil, false + } + return &o.AuthType, true +} + +// SetAuthType sets field value +func (o *WebhookCredentials) SetAuthType(v WebhookAuthTypeEnum) { + o.AuthType = v +} + +// GetApiKeyCredentials returns the ApiKeyCredentials field value if set, zero value otherwise. +func (o *WebhookCredentials) GetApiKeyCredentials() []WebhookApiKeyCredential { + if o == nil || IsNil(o.ApiKeyCredentials) { + var ret []WebhookApiKeyCredential + return ret + } + return o.ApiKeyCredentials +} + +// GetApiKeyCredentialsOk returns a tuple with the ApiKeyCredentials field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WebhookCredentials) GetApiKeyCredentialsOk() ([]WebhookApiKeyCredential, bool) { + if o == nil || IsNil(o.ApiKeyCredentials) { + return nil, false + } + return o.ApiKeyCredentials, true +} + +// HasApiKeyCredentials returns a boolean if a field has been set. +func (o *WebhookCredentials) HasApiKeyCredentials() bool { + if o != nil && !IsNil(o.ApiKeyCredentials) { + return true + } + + return false +} + +// SetApiKeyCredentials gets a reference to the given []WebhookApiKeyCredential and assigns it to the ApiKeyCredentials field. +func (o *WebhookCredentials) SetApiKeyCredentials(v []WebhookApiKeyCredential) { + o.ApiKeyCredentials = v +} + +// GetHmacCredential1 returns the HmacCredential1 field value if set, zero value otherwise. +func (o *WebhookCredentials) GetHmacCredential1() WebhookHmacCredential { + if o == nil || IsNil(o.HmacCredential1) { + var ret WebhookHmacCredential + return ret + } + return *o.HmacCredential1 +} + +// GetHmacCredential1Ok returns a tuple with the HmacCredential1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WebhookCredentials) GetHmacCredential1Ok() (*WebhookHmacCredential, bool) { + if o == nil || IsNil(o.HmacCredential1) { + return nil, false + } + return o.HmacCredential1, true +} + +// HasHmacCredential1 returns a boolean if a field has been set. +func (o *WebhookCredentials) HasHmacCredential1() bool { + if o != nil && !IsNil(o.HmacCredential1) { + return true + } + + return false +} + +// SetHmacCredential1 gets a reference to the given WebhookHmacCredential and assigns it to the HmacCredential1 field. +func (o *WebhookCredentials) SetHmacCredential1(v WebhookHmacCredential) { + o.HmacCredential1 = &v +} + +// GetHmacCredential2 returns the HmacCredential2 field value if set, zero value otherwise. +func (o *WebhookCredentials) GetHmacCredential2() WebhookHmacCredential { + if o == nil || IsNil(o.HmacCredential2) { + var ret WebhookHmacCredential + return ret + } + return *o.HmacCredential2 +} + +// GetHmacCredential2Ok returns a tuple with the HmacCredential2 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WebhookCredentials) GetHmacCredential2Ok() (*WebhookHmacCredential, bool) { + if o == nil || IsNil(o.HmacCredential2) { + return nil, false + } + return o.HmacCredential2, true +} + +// HasHmacCredential2 returns a boolean if a field has been set. +func (o *WebhookCredentials) HasHmacCredential2() bool { + if o != nil && !IsNil(o.HmacCredential2) { + return true + } + + return false +} + +// SetHmacCredential2 gets a reference to the given WebhookHmacCredential and assigns it to the HmacCredential2 field. +func (o *WebhookCredentials) SetHmacCredential2(v WebhookHmacCredential) { + o.HmacCredential2 = &v +} + +func (o WebhookCredentials) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WebhookCredentials) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["auth_type"] = o.AuthType + if !IsNil(o.ApiKeyCredentials) { + toSerialize["api_key_credentials"] = o.ApiKeyCredentials + } + if !IsNil(o.HmacCredential1) { + toSerialize["hmac_credential_1"] = o.HmacCredential1 + } + if !IsNil(o.HmacCredential2) { + toSerialize["hmac_credential_2"] = o.HmacCredential2 + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *WebhookCredentials) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "auth_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWebhookCredentials := _WebhookCredentials{} + + err = json.Unmarshal(data, &varWebhookCredentials) + + if err != nil { + return err + } + + *o = WebhookCredentials(varWebhookCredentials) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "auth_type") + delete(additionalProperties, "api_key_credentials") + delete(additionalProperties, "hmac_credential_1") + delete(additionalProperties, "hmac_credential_2") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableWebhookCredentials struct { + value *WebhookCredentials + isSet bool +} + +func (v NullableWebhookCredentials) Get() *WebhookCredentials { + return v.value +} + +func (v *NullableWebhookCredentials) Set(val *WebhookCredentials) { + v.value = val + v.isSet = true +} + +func (v NullableWebhookCredentials) IsSet() bool { + return v.isSet +} + +func (v *NullableWebhookCredentials) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWebhookCredentials(val *WebhookCredentials) *NullableWebhookCredentials { + return &NullableWebhookCredentials{value: val, isSet: true} +} + +func (v NullableWebhookCredentials) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWebhookCredentials) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_webhook_hmac_credential.go b/model_webhook_hmac_credential.go new file mode 100644 index 0000000..f7c4f19 --- /dev/null +++ b/model_webhook_hmac_credential.go @@ -0,0 +1,231 @@ +/* +Opal API + +The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. + +API version: 1.0 +Contact: hello@opal.dev +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package opal + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the WebhookHmacCredential type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WebhookHmacCredential{} + +// WebhookHmacCredential An HMAC credential for webhook authentication. +type WebhookHmacCredential struct { + // The unique identifier for the credential. + Id string `json:"id"` + // The HMAC secret value. + Secret string `json:"secret"` + // When the credential was created. + CreatedAt time.Time `json:"created_at"` + AdditionalProperties map[string]interface{} +} + +type _WebhookHmacCredential WebhookHmacCredential + +// NewWebhookHmacCredential instantiates a new WebhookHmacCredential object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWebhookHmacCredential(id string, secret string, createdAt time.Time) *WebhookHmacCredential { + this := WebhookHmacCredential{} + this.Id = id + this.Secret = secret + this.CreatedAt = createdAt + return &this +} + +// NewWebhookHmacCredentialWithDefaults instantiates a new WebhookHmacCredential object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWebhookHmacCredentialWithDefaults() *WebhookHmacCredential { + this := WebhookHmacCredential{} + return &this +} + +// GetId returns the Id field value +func (o *WebhookHmacCredential) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WebhookHmacCredential) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *WebhookHmacCredential) SetId(v string) { + o.Id = v +} + +// GetSecret returns the Secret field value +func (o *WebhookHmacCredential) GetSecret() string { + if o == nil { + var ret string + return ret + } + + return o.Secret +} + +// GetSecretOk returns a tuple with the Secret field value +// and a boolean to check if the value has been set. +func (o *WebhookHmacCredential) GetSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Secret, true +} + +// SetSecret sets field value +func (o *WebhookHmacCredential) SetSecret(v string) { + o.Secret = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *WebhookHmacCredential) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *WebhookHmacCredential) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *WebhookHmacCredential) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +func (o WebhookHmacCredential) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WebhookHmacCredential) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["secret"] = o.Secret + toSerialize["created_at"] = o.CreatedAt + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *WebhookHmacCredential) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "secret", + "created_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWebhookHmacCredential := _WebhookHmacCredential{} + + err = json.Unmarshal(data, &varWebhookHmacCredential) + + if err != nil { + return err + } + + *o = WebhookHmacCredential(varWebhookHmacCredential) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "secret") + delete(additionalProperties, "created_at") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableWebhookHmacCredential struct { + value *WebhookHmacCredential + isSet bool +} + +func (v NullableWebhookHmacCredential) Get() *WebhookHmacCredential { + return v.value +} + +func (v *NullableWebhookHmacCredential) Set(val *WebhookHmacCredential) { + v.value = val + v.isSet = true +} + +func (v NullableWebhookHmacCredential) IsSet() bool { + return v.isSet +} + +func (v *NullableWebhookHmacCredential) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWebhookHmacCredential(val *WebhookHmacCredential) *NullableWebhookHmacCredential { + return &NullableWebhookHmacCredential{value: val, isSet: true} +} + +func (v NullableWebhookHmacCredential) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWebhookHmacCredential) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +