From c0a4221388d012a5efc7b0366e7abbe777513bfa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 Apr 2026 00:33:55 +0000 Subject: [PATCH] Auto-update SDK on 2026-04-28 --- .openapi-generator/FILES | 30 ++ .openapi-generator/VERSION | 2 +- README.md | 18 +- api/openapi.yaml | 372 +++++++++++++++- api_groups.go | 19 + api_requests.go | 20 + api_resources.go | 19 + api_tokens.go | 256 +++++++++++ api_users.go | 18 + client.go | 8 +- docs/ApiAccessLevelEnum.md | 13 + docs/AppTypeEnum.md | 8 + docs/GroupRemoteInfo.md | 78 ++++ docs/GroupRemoteInfoClickhouseRole.md | 51 +++ docs/GroupRemoteInfoGrafanaTeam.md | 51 +++ docs/GroupRemoteInfoTwingateGroup.md | 51 +++ docs/GroupTypeEnum.md | 6 + docs/GroupsAPI.md | 6 +- docs/PaginatedTokensList.md | 103 +++++ docs/RequestsAPI.md | 8 +- docs/ResourceRemoteInfo.md | 208 +++++++++ docs/ResourceRemoteInfoClickhouseDatabase.md | 51 +++ docs/ResourceRemoteInfoClickhouseTable.md | 72 ++++ docs/ResourceRemoteInfoDatadogRole.md | 51 +++ docs/ResourceRemoteInfoGrafanaDashboard.md | 51 +++ docs/ResourceRemoteInfoGrafanaFolder.md | 51 +++ docs/ResourceRemoteInfoGrafanaRole.md | 51 +++ docs/ResourceRemoteInfoNetsuiteRole.md | 51 +++ docs/ResourceRemoteInfoTwingateResource.md | 51 +++ docs/ResourceTypeEnum.md | 18 + docs/ResourcesAPI.md | 6 +- docs/ReviewerStage.md | 28 +- docs/Token.md | 208 +++++++++ docs/TokensAPI.md | 150 +++++++ docs/UpdateResourceInfo.md | 26 ++ docs/UsersAPI.md | 6 +- model_api_access_level_enum.go | 112 +++++ model_app_type_enum.go | 8 + model_group_remote_info.go | 111 +++++ model_group_remote_info_clickhouse_role.go | 170 ++++++++ model_group_remote_info_grafana_team.go | 170 ++++++++ model_group_remote_info_twingate_group.go | 170 ++++++++ model_group_type_enum.go | 6 + model_paginated_tokens_list.go | 245 +++++++++++ model_resource_remote_info.go | 296 +++++++++++++ ...esource_remote_info_clickhouse_database.go | 170 ++++++++ ...l_resource_remote_info_clickhouse_table.go | 200 +++++++++ model_resource_remote_info_datadog_role.go | 170 ++++++++ ..._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_type_enum.go | 18 + model_reviewer_stage.go | 39 ++ model_token.go | 396 ++++++++++++++++++ model_update_resource_info.go | 38 ++ 57 files changed, 5372 insertions(+), 13 deletions(-) create mode 100644 api_tokens.go create mode 100644 docs/ApiAccessLevelEnum.md create mode 100644 docs/GroupRemoteInfoClickhouseRole.md create mode 100644 docs/GroupRemoteInfoGrafanaTeam.md create mode 100644 docs/GroupRemoteInfoTwingateGroup.md create mode 100644 docs/PaginatedTokensList.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/Token.md create mode 100644 docs/TokensAPI.md create mode 100644 model_api_access_level_enum.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_paginated_tokens_list.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_token.go diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 24a3c4a..bc63e45 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -16,6 +16,7 @@ api_requests.go api_resources.go api_sessions.go api_tags.go +api_tokens.go api_uars.go api_users.go client.go @@ -30,6 +31,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 @@ -88,6 +90,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 +99,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,6 +108,7 @@ docs/GroupRemoteInfoPagerdutyOnCallSchedule.md docs/GroupRemoteInfoRootlyOnCallSchedule.md docs/GroupRemoteInfoSnowflakeRole.md docs/GroupRemoteInfoTailscaleGroup.md +docs/GroupRemoteInfoTwingateGroup.md docs/GroupRemoteInfoWorkdayUserSecurityGroup.md docs/GroupResource.md docs/GroupResourceList.md @@ -142,6 +147,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 @@ -194,10 +200,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 +226,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,6 +246,7 @@ docs/ResourceRemoteInfoSnowflakeSchema.md docs/ResourceRemoteInfoSnowflakeTable.md docs/ResourceRemoteInfoTailscaleSsh.md docs/ResourceRemoteInfoTeleportRole.md +docs/ResourceRemoteInfoTwingateResource.md docs/ResourceRemoteInfoWorkdayRole.md docs/ResourceTypeEnum.md docs/ResourceUser.md @@ -267,6 +281,8 @@ 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 @@ -303,6 +319,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 @@ -355,6 +372,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 +381,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,6 +390,7 @@ 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_workday_user_security_group.go model_group_resource.go model_group_resource_list.go @@ -403,6 +423,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 @@ -454,10 +475,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 +501,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,6 +521,7 @@ 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_type_enum.go model_resource_user.go @@ -524,6 +553,7 @@ 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 diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 3821090..e465da4 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.19.0 +7.14.0 diff --git a/README.md b/README.md index e95ad90..09cf0e1 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ 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.14.0 - Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit [https://www.opal.dev/](https://www.opal.dev/) @@ -208,6 +208,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} | @@ -228,6 +230,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) @@ -280,6 +283,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 +292,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,6 +301,7 @@ Class | Method | HTTP request | Description - [GroupRemoteInfoRootlyOnCallSchedule](docs/GroupRemoteInfoRootlyOnCallSchedule.md) - [GroupRemoteInfoSnowflakeRole](docs/GroupRemoteInfoSnowflakeRole.md) - [GroupRemoteInfoTailscaleGroup](docs/GroupRemoteInfoTailscaleGroup.md) + - [GroupRemoteInfoTwingateGroup](docs/GroupRemoteInfoTwingateGroup.md) - [GroupRemoteInfoWorkdayUserSecurityGroup](docs/GroupRemoteInfoWorkdayUserSecurityGroup.md) - [GroupResource](docs/GroupResource.md) - [GroupResourceList](docs/GroupResourceList.md) @@ -328,6 +334,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) @@ -379,10 +386,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 +412,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,6 +432,7 @@ 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) - [ResourceTypeEnum](docs/ResourceTypeEnum.md) - [ResourceUser](docs/ResourceUser.md) @@ -449,6 +464,7 @@ 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) diff --git a/api/openapi.yaml b/api/openapi.yaml index 34c8556..0b7612b 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -46,6 +46,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 @@ -829,6 +831,15 @@ 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: @@ -2376,6 +2387,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 @@ -2641,7 +2670,6 @@ paths: content: application/json: schema: - type: object $ref: "#/components/schemas/RequestCommentList" security: - BearerAuth: [] @@ -2772,6 +2800,16 @@ paths: 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: @@ -3874,6 +3912,16 @@ 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: @@ -4547,6 +4595,90 @@ paths: - BearerAuth: [] tags: - on-call-schedules + /tokens: + get: + summary: Get tokens + description: Returns a list of first-party API tokens for your organization. Requires admin access. + operationId: getTokens + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + - description: Filter by token IDs. + explode: false + in: query + name: token_ids + required: false + schema: + items: + format: uuid + type: string + type: array + style: form + - description: Filter by user ID. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: true + in: query + name: user_id + required: false + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedTokensList" + description: A list of API tokens for your organization. + security: + - BearerAuth: [] + tags: + - tokens + /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. @@ -5250,6 +5382,7 @@ components: - COUPA - CURSOR - CUSTOM + - CUSTOM_CONNECTOR - DATABRICKS - DATASTAX_ASTRA - DUO @@ -5265,6 +5398,8 @@ components: - MONGO - MONGO_ATLAS - MYSQL + - NETSUITE + - DATADOG - OKTA_DIRECTORY - OPENAI_PLATFORM - OPAL @@ -5273,6 +5408,7 @@ components: - SNOWFLAKE - TAILSCALE - TELEPORT + - TWINGATE - WORKDAY example: OKTA_DIRECTORY type: string @@ -6686,6 +6822,9 @@ components: - ROOTLY_ON_CALL_SCHEDULE - DEVIN_GROUP - GIT_HUB_ENTERPRISE_TEAM + - GRAFANA_TEAM + - CLICKHOUSE_ROLE + - TWINGATE_GROUP example: OPAL_GROUP type: string ResourceTypeEnum: @@ -6734,6 +6873,8 @@ components: - GOOGLE_WORKSPACE_ROLE - MONGO_INSTANCE - MONGO_ATLAS_INSTANCE + - NETSUITE_ROLE + - DATADOG_ROLE - OKTA_APP - OKTA_ROLE - OPAL_ROLE @@ -6766,6 +6907,13 @@ 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 example: AWS_IAM_ROLE type: string VisibilityTypeEnum: @@ -7058,6 +7206,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. @@ -7075,6 +7225,13 @@ components: 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 @@ -7240,6 +7397,16 @@ 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 aws_sso_group: description: Remote info for AWS SSO group. properties: @@ -7435,6 +7602,26 @@ 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 type: object ResourceRemoteInfo: description: Information that defines the remote resource. This replaces the deprecated remote_id and metadata fields. @@ -8047,6 +8234,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: @@ -8208,6 +8405,81 @@ components: 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: + - database_name + - table_name + grafana_folder: + description: Remote info for Grafana folder. + properties: + folder_uid: + description: The UID of the Grafana folder. + example: fffRTXX + type: string + type: object + required: + - folder_uid + grafana_dashboard: + description: Remote info for Grafana dashboard. + properties: + dashboard_uid: + description: The UID of the Grafana dashboard. + example: dddRTXX + type: string + type: object + required: + - dashboard_uid + grafana_role: + description: Remote info for Grafana role(fixed or custom). + properties: + role_uid: + description: The UID of the Grafana role. + example: rrfRTXX + type: string + type: object + required: + - role_uid type: object RiskSensitivityEnum: type: string @@ -9443,6 +9715,12 @@ components: 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: @@ -11236,6 +11514,98 @@ components: - start_time - end_time - reason + ApiAccessLevelEnum: + description: The access level of an API token. + enum: + - READ_ONLY + - FULL_ACCESS + type: string + 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_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_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..1e269c3 100644 --- a/api_resources.go +++ b/api_resources.go @@ -18,6 +18,7 @@ import ( "net/http" "net/url" "strings" + "reflect" ) @@ -1868,6 +1869,7 @@ type ApiGetResourcesRequest struct { parentResourceId *string ancestorResourceId *string remoteId *string + tagIds *[]string } // The pagination cursor value. @@ -1918,6 +1920,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 +1990,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{} 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..9e95dc8 100644 --- a/client.go +++ b/client.go @@ -84,6 +84,8 @@ type APIClient struct { TagsAPI *TagsAPIService + TokensAPI *TokensAPIService + UarsAPI *UarsAPIService UsersAPI *UsersAPIService @@ -122,6 +124,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { 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) @@ -547,7 +550,10 @@ func addFile(w *multipart.Writer, fieldName, path string) error { if err != nil { return err } - defer file.Close() + err = file.Close() + if err != nil { + return err + } part, err := w.CreateFormFile(fieldName, filepath.Base(path)) if err != nil { 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/GroupRemoteInfo.md b/docs/GroupRemoteInfo.md index 509e0cf..54b8b8e 100644 --- a/docs/GroupRemoteInfo.md +++ b/docs/GroupRemoteInfo.md @@ -6,6 +6,7 @@ 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] **AwsSsoGroup** | Pointer to [**GroupRemoteInfoAwsSsoGroup**](GroupRemoteInfoAwsSsoGroup.md) | | [optional] **DatabricksAccountGroup** | Pointer to [**GroupRemoteInfoDatabricksAccountGroup**](GroupRemoteInfoDatabricksAccountGroup.md) | | [optional] **ConnectorGroup** | Pointer to [**GroupRemoteInfoConnectorGroup**](GroupRemoteInfoConnectorGroup.md) | | [optional] @@ -25,6 +26,8 @@ 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] ## Methods @@ -95,6 +98,31 @@ 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. + ### GetAwsSsoGroup `func (o *GroupRemoteInfo) GetAwsSsoGroup() GroupRemoteInfoAwsSsoGroup` @@ -570,6 +598,56 @@ 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. + [[Back to Model list]](../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/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/GroupTypeEnum.md b/docs/GroupTypeEnum.md index 3b900ae..84f972a 100644 --- a/docs/GroupTypeEnum.md +++ b/docs/GroupTypeEnum.md @@ -51,6 +51,12 @@ * `GIT_HUB_ENTERPRISE_TEAM` (value: `"GIT_HUB_ENTERPRISE_TEAM"`) +* `GRAFANA_TEAM` (value: `"GRAFANA_TEAM"`) + +* `CLICKHOUSE_ROLE` (value: `"CLICKHOUSE_ROLE"`) + +* `TWINGATE_GROUP` (value: `"TWINGATE_GROUP"`) + [[Back to Model list]](../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/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/ResourceRemoteInfo.md b/docs/ResourceRemoteInfo.md index 4ef71db..d96df18 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,13 @@ 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] ## Methods @@ -1261,6 +1269,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 +1669,181 @@ 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. + [[Back to Model list]](../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/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/ResourceTypeEnum.md b/docs/ResourceTypeEnum.md index e7c49ed..751749d 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,20 @@ * `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"`) + [[Back to Model list]](../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..a50622b 100644 --- a/docs/ResourcesAPI.md +++ b/docs/ResourcesAPI.md @@ -1249,7 +1249,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 @@ -1276,10 +1276,11 @@ func main() { 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 +1309,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 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/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/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/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/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_group_remote_info.go b/model_group_remote_info.go index 57c1b7b..d811f1c 100644 --- a/model_group_remote_info.go +++ b/model_group_remote_info.go @@ -22,6 +22,7 @@ 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"` AwsSsoGroup *GroupRemoteInfoAwsSsoGroup `json:"aws_sso_group,omitempty"` DatabricksAccountGroup *GroupRemoteInfoDatabricksAccountGroup `json:"databricks_account_group,omitempty"` ConnectorGroup *GroupRemoteInfoConnectorGroup `json:"connector_group,omitempty"` @@ -41,6 +42,8 @@ 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"` AdditionalProperties map[string]interface{} } @@ -127,6 +130,38 @@ 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 +} + // GetAwsSsoGroup returns the AwsSsoGroup field value if set, zero value otherwise. func (o *GroupRemoteInfo) GetAwsSsoGroup() GroupRemoteInfoAwsSsoGroup { if o == nil || IsNil(o.AwsSsoGroup) { @@ -735,6 +770,70 @@ 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 +} + func (o GroupRemoteInfo) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -751,6 +850,9 @@ 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.AwsSsoGroup) { toSerialize["aws_sso_group"] = o.AwsSsoGroup } @@ -808,6 +910,12 @@ 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 + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -832,6 +940,7 @@ 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, "aws_sso_group") delete(additionalProperties, "databricks_account_group") delete(additionalProperties, "connector_group") @@ -851,6 +960,8 @@ 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") 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_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_type_enum.go b/model_group_type_enum.go index b5ba4b8..e7d4a9f 100644 --- a/model_group_type_enum.go +++ b/model_group_type_enum.go @@ -45,6 +45,9 @@ 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" ) // All allowed values of GroupTypeEnum enum @@ -73,6 +76,9 @@ var AllowedGroupTypeEnumEnumValues = []GroupTypeEnum{ "ROOTLY_ON_CALL_SCHEDULE", "DEVIN_GROUP", "GIT_HUB_ENTERPRISE_TEAM", + "GRAFANA_TEAM", + "CLICKHOUSE_ROLE", + "TWINGATE_GROUP", } func (v *GroupTypeEnum) UnmarshalJSON(src []byte) error { 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_remote_info.go b/model_resource_remote_info.go index 5057134..f8b96f6 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,13 @@ 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"` AdditionalProperties map[string]interface{} } @@ -1608,6 +1616,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 +2128,230 @@ 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 +} + func (o ResourceRemoteInfo) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -2239,6 +2503,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 +2551,27 @@ 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 + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -2353,6 +2641,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 +2657,13 @@ 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") 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_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_type_enum.go b/model_resource_type_enum.go index ac227ff..68acbda 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,13 @@ 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" ) // All allowed values of ResourceTypeEnum enum @@ -143,6 +152,8 @@ var AllowedResourceTypeEnumEnumValues = []ResourceTypeEnum{ "GOOGLE_WORKSPACE_ROLE", "MONGO_INSTANCE", "MONGO_ATLAS_INSTANCE", + "NETSUITE_ROLE", + "DATADOG_ROLE", "OKTA_APP", "OKTA_ROLE", "OPAL_ROLE", @@ -175,6 +186,13 @@ 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", } 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_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_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