models

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2026 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmailFormatIssue         = "ISSUE"
	EmailFormatAlertStandard = "ALERT_STANDARD"
	EmailFormatAlertLegacy   = "ALERT_LEGACY"
)

Variables

Functions

This section is empty.

Types

type AdvancedSettingsModel

type AdvancedSettingsModel struct {
	RelayState                types.String `tfsdk:"relay_state"`
	IdpSingleLogoutURL        types.String `tfsdk:"idp_single_logout_url"`
	ServiceProviderPublicCert types.String `tfsdk:"service_provider_public_cert"`
	ServiceProviderPrivateKey types.String `tfsdk:"service_provider_private_key"`
	AuthnContextEnabled       types.Bool   `tfsdk:"authn_context_enabled"`
	ForceAuthn                types.Bool   `tfsdk:"force_authn"`
}

AdvancedSettingsModel is the model for the advanced_settings nested attribute.

type AssetGroupModel

type AssetGroupModel struct {
	ID                  types.Int64             `tfsdk:"id"`
	Name                types.String            `tfsdk:"name"`
	Type                types.String            `tfsdk:"type"`
	Description         types.String            `tfsdk:"description"`
	MembershipPredicate *shared.RootFilterModel `tfsdk:"membership_predicate"`
	CreationTime        types.Int64             `tfsdk:"creation_time"`
	CreatedBy           types.String            `tfsdk:"created_by"`
	LastUpdateTime      types.Int64             `tfsdk:"last_update_time"`
	ModifiedBy          types.String            `tfsdk:"modified_by"`
}

AssetGroupModel is the model for the asset_group resource.

func (*AssetGroupModel) RefreshFromRemote

func (m *AssetGroupModel) RefreshFromRemote(ctx context.Context, diags *diag.Diagnostics, remote *platformTypes.AssetGroup)

RefreshFromRemote refreshes the model from the remote API response.

type AssetsModel

type AssetsModel struct {
	Mode        types.String              `tfsdk:"mode"`
	AssetGroups []ScopeAssetGroupRefModel `tfsdk:"asset_groups"`
}

AssetsModel represents the "assets" section in a Scope.

type AuthenticationSettingsModel

type AuthenticationSettingsModel struct {
	Name             types.String           `tfsdk:"name"`
	DefaultRole      types.String           `tfsdk:"default_role"`
	IsAccountRole    types.Bool             `tfsdk:"is_account_role"`
	Domain           types.String           `tfsdk:"domain"`
	Mappings         *MappingsModel         `tfsdk:"mappings"`
	AdvancedSettings *AdvancedSettingsModel `tfsdk:"advanced_settings"`
	TenantID         types.String           `tfsdk:"tenant_id"`
	IdpEnabled       types.Bool             `tfsdk:"idp_enabled"`
	IdpSsoUrl        types.String           `tfsdk:"idp_sso_url"`
	IdpCertificate   types.String           `tfsdk:"idp_certificate"`
	IdpIssuer        types.String           `tfsdk:"idp_issuer"`
	MetadataURL      types.String           `tfsdk:"metadata_url"`
	SpEntityID       types.String           `tfsdk:"sp_entity_id"`
	SpLogoutURL      types.String           `tfsdk:"sp_logout_url"`
	SpURL            types.String           `tfsdk:"sp_url"`
}

AuthenticationSettingsModel is the model for the authentication_settings resource.

func (*AuthenticationSettingsModel) RefreshFromRemote

func (m *AuthenticationSettingsModel) RefreshFromRemote(ctx context.Context, diags *diag.Diagnostics, remote *platformTypes.AuthSettings)

RefreshFromRemote refreshes the model from the remote API response.

type CasesIssuesModel

type CasesIssuesModel struct {
	Mode types.String `tfsdk:"mode"`
	Tags []TagModel   `tfsdk:"tags"`
}

CasesIssuesModel is the model for the cases issues scope.

type DatasetGroupModel

type DatasetGroupModel struct {
	Datasets        []string `tfsdk:"datasets"`
	DatasetCategory string   `tfsdk:"dataset_category"`
}

type DatasetPermissionModel

type DatasetPermissionModel struct {
	Category    types.String `tfsdk:"category"`
	AccessAll   types.Bool   `tfsdk:"access_all"`
	Permissions types.Set    `tfsdk:"permissions"`
}

type DatasetsRowsModel

type DatasetsRowsModel struct {
	DefaultFilterMode types.String  `tfsdk:"default_filter_mode"`
	Filters           []FilterModel `tfsdk:"filters"`
}

DatasetsRowsModel is the model for the datasets rows scope.

type EmailConfigIssuesModel added in v1.0.4

type EmailConfigIssuesModel struct {
	DistributionList  types.List   `tfsdk:"distribution_list"`
	Subject           types.String `tfsdk:"subject"`
	Format            types.String `tfsdk:"format"`
	GroupingTimeframe types.Int32  `tfsdk:"grouping_timeframe"`
}

EmailConfigIssuesModel is the model for email notification forwarding settings as represented in the Issues notification forwarding configuration type.

func (*EmailConfigIssuesModel) Equals added in v1.0.4

func (m *EmailConfigIssuesModel) Equals(other *EmailConfigIssuesModel) (isEqual bool)

func (*EmailConfigIssuesModel) ToSDK added in v1.0.4

type EmailConfigModel added in v1.0.4

type EmailConfigModel struct {
	DistributionList  types.List   `tfsdk:"distribution_list"`
	Subject           types.String `tfsdk:"subject"`
	GroupingTimeframe types.Int32  `tfsdk:"grouping_timeframe"`
}

EmailConfigModel is the model for email notification forwarding settings.

func (*EmailConfigModel) Equals added in v1.0.4

func (m *EmailConfigModel) Equals(other *EmailConfigModel) (isEqual bool)

Equals compares two EmailConfigModel structs and returns true if all of their fields are equal, false otherwise.

func (*EmailConfigModel) ToSDK added in v1.0.4

type EndpointGroupsModel

type EndpointGroupsModel struct {
	Mode types.String `tfsdk:"mode"`
	Tags []TagModel   `tfsdk:"tags"`
}

EndpointGroupsModel is the model for the endpoint groups scope.

type EndpointTagsModel

type EndpointTagsModel struct {
	Mode types.String `tfsdk:"mode"`
	Tags []TagModel   `tfsdk:"tags"`
}

EndpointTagsModel is the model for the endpoint tags scope.

type EndpointsModel

type EndpointsModel struct {
	EndpointGroups *EndpointGroupsModel `tfsdk:"endpoint_groups"`
	EndpointTags   *EndpointTagsModel   `tfsdk:"endpoint_tags"`
}

EndpointsModel is the model for the endpoints scope.

type FilterModel

type FilterModel struct {
	Dataset types.String `tfsdk:"dataset"`
	Filter  types.String `tfsdk:"filter"`
}

FilterModel is the model for a filter in the datasets rows scope.

type INotificationForwardingConfigurationModel added in v1.0.4

type INotificationForwardingConfigurationModel interface {
	Type() string
	ValidateConfig(ctx context.Context, diags *diag.Diagnostics, resp *resource.ValidateConfigResponse)
	Equals(ctx context.Context, diags *diag.Diagnostics, other INotificationForwardingConfigurationModel) (isEqual bool)
	RefreshFromRemote(ctx context.Context, diags *diag.Diagnostics, resp platformTypes.NotificationForwardingConfiguration)
}

type ITfsdkConfig added in v1.0.4

type ITfsdkConfig interface {
	Get(ctx context.Context, target any) diag.Diagnostics
	GetAttribute(ctx context.Context, path path.Path, target any) diag.Diagnostics
	PathMatches(ctx context.Context, pathExpr path.Expression) (path.Paths, diag.Diagnostics)
}

type IamPermissionConfigModel

type IamPermissionConfigModel struct {
	ID              types.String `tfsdk:"id"`
	RbacPermissions types.List   `tfsdk:"rbac_permissions"`
	DatasetGroups   types.List   `tfsdk:"dataset_groups"`
}

type IamRoleDataSourceModel

type IamRoleDataSourceModel struct {
	RoleID      types.String `tfsdk:"role_id"`
	PrettyName  types.String `tfsdk:"pretty_name"`
	Description types.String `tfsdk:"description"`
	IsCustom    types.Bool   `tfsdk:"is_custom"`
	CreatedBy   types.String `tfsdk:"created_by"`
	CreatedTs   types.Int64  `tfsdk:"created_ts"`
	UpdatedTs   types.Int64  `tfsdk:"updated_ts"`
}

IamRoleDataSourceModel is a minimal view of IAM Role as returned by List/Get endpoints. DO NOT add create/update-only fields here.

func (*IamRoleDataSourceModel) RefreshFromRemote

func (m *IamRoleDataSourceModel) RefreshFromRemote(r *platformTypes.RoleListItem)

type IamRoleModel

type IamRoleModel struct {
	ID                   types.String `tfsdk:"id"`
	PrettyName           types.String `tfsdk:"pretty_name"`
	Description          types.String `tfsdk:"description"`
	ComponentPermissions types.Set    `tfsdk:"component_permissions"`
	DatasetPermissions   types.Set    `tfsdk:"dataset_permissions"`
	IsCustom             types.Bool   `tfsdk:"is_custom"`
	CreatedBy            types.String `tfsdk:"created_by"`
	CreatedTs            types.Int64  `tfsdk:"created_ts"`
	UpdatedTs            types.Int64  `tfsdk:"updated_ts"`
}

func (*IamRoleModel) RefreshFromRemote

func (m *IamRoleModel) RefreshFromRemote(ctx context.Context, diags *diag.Diagnostics, r *platformTypes.RoleListItem)

RefreshFromRemote maps RoleListItem → state fields.

type MappingsModel

type MappingsModel struct {
	Email     types.String `tfsdk:"email"`
	FirstName types.String `tfsdk:"first_name"`
	LastName  types.String `tfsdk:"last_name"`
	GroupName types.String `tfsdk:"group_name"`
}

MappingsModel is the model for the mappings nested attribute.

type NestedGroupModel

type NestedGroupModel struct {
	GroupID   types.String `tfsdk:"group_id"`
	GroupName types.String `tfsdk:"group_name"`
}

NestedGroupModel is the model for a nested user group.

type NotificationForwardingConfigurationAgentAuditLogsModel added in v1.0.4

type NotificationForwardingConfigurationAgentAuditLogsModel struct {
	Shared       NotificationForwardingConfigurationSharedFields
	EmailConfig  *EmailConfigModel  `tfsdk:"email_config"`
	SyslogConfig *SyslogConfigModel `tfsdk:"syslog_config"`
}

NotificationForwardingConfigurationAuditLogsModel is the model for the notification_forwarding_config_agent_audit_logs resource.

func (*NotificationForwardingConfigurationAgentAuditLogsModel) Equals added in v1.0.4

Equals compares two NotificationForwardingConfigurationAgentAuditLogsModel structs and returns true if all of their fields are equal, false otherwise.

func (*NotificationForwardingConfigurationAgentAuditLogsModel) FromTfsdk added in v1.0.4

func (*NotificationForwardingConfigurationAgentAuditLogsModel) RefreshFromRemote added in v1.0.4

RefreshFromRemote refreshes the model from the remote API response.

func (*NotificationForwardingConfigurationAgentAuditLogsModel) ToCreateOrUpdateRequest added in v1.0.4

ToCreateOrUpdateRequest returns a new CreateOrUpdateNotificationForwardingConfigurationRequest using the values of the NotificationForwardingConfigurationAgentAuditLogsModel's fields.

func (*NotificationForwardingConfigurationAgentAuditLogsModel) Type added in v1.0.4

func (*NotificationForwardingConfigurationAgentAuditLogsModel) ValidateConfig added in v1.0.4

type NotificationForwardingConfigurationCasesModel added in v1.0.4

type NotificationForwardingConfigurationCasesModel struct {
	Shared      NotificationForwardingConfigurationSharedFields
	EmailConfig *EmailConfigModel `tfsdk:"email_config"`
}

NotificationForwardingConfigurationCasesModel is the model for the notification_forwarding_config_cases resource.

func (*NotificationForwardingConfigurationCasesModel) Equals added in v1.0.4

Equals compares two NotificationForwardingConfigurationCasesModel structs and returns true if all of their fields are equal, false otherwise.

func (*NotificationForwardingConfigurationCasesModel) FromTfsdk added in v1.0.4

func (*NotificationForwardingConfigurationCasesModel) RefreshFromRemote added in v1.0.4

RefreshFromRemote refreshes the model from the remote API response.

func (*NotificationForwardingConfigurationCasesModel) ToCreateOrUpdateRequest added in v1.0.4

ToCreateOrUpdateRequest returns a new CreateOrUpdateNotificationForwardingConfigurationRequest using the values of the NotificationForwardingConfigurationCasesModel struct's fields.

type NotificationForwardingConfigurationIssuesModel added in v1.0.4

type NotificationForwardingConfigurationIssuesModel struct {
	Shared       NotificationForwardingConfigurationSharedFields
	EmailConfig  *EmailConfigIssuesModel  `tfsdk:"email_config"`
	SyslogConfig *SyslogConfigIssuesModel `tfsdk:"syslog_config"`
}

NotificationForwardingConfigurationIssuesModel is the model for the notification_forwarding_config_issues resource.

func (*NotificationForwardingConfigurationIssuesModel) Equals added in v1.0.4

Equals compares two NotificationForwardingConfigurationIssuesModel structs and returns true if all of their fields are equal, false otherwise.

func (*NotificationForwardingConfigurationIssuesModel) FromTfsdk added in v1.0.4

func (*NotificationForwardingConfigurationIssuesModel) RefreshFromRemote added in v1.0.4

RefreshFromRemote refreshes the model from the remote API response.

func (*NotificationForwardingConfigurationIssuesModel) ToCreateOrUpdateRequest added in v1.0.4

ToCreateOrUpdateRequest returns a new CreateOrUpdateNotificationForwardingConfigurationRequest using the values of the NotificationForwardingConfigIssuesModel's fields.

type NotificationForwardingConfigurationMgmtAuditLogsModel added in v1.0.4

type NotificationForwardingConfigurationMgmtAuditLogsModel struct {
	Shared       NotificationForwardingConfigurationSharedFields
	EmailConfig  *EmailConfigModel  `tfsdk:"email_config"`
	SyslogConfig *SyslogConfigModel `tfsdk:"syslog_config"`
}

NotificationForwardingConfigurationMgmtAuditLogsModel is the model for the notification_forwarding_config_mgmt_audit_logs resource.

func (*NotificationForwardingConfigurationMgmtAuditLogsModel) Equals added in v1.0.4

Equals compares two NotificationForwardingConfigurationMgmtAuditLogsModel structs and returns true if all of their fields are equal, false otherwise.

func (*NotificationForwardingConfigurationMgmtAuditLogsModel) FromTfsdk added in v1.0.4

func (*NotificationForwardingConfigurationMgmtAuditLogsModel) RefreshFromRemote added in v1.0.4

RefreshFromRemote refreshes the model from the remote API response.

func (*NotificationForwardingConfigurationMgmtAuditLogsModel) ToCreateOrUpdateRequest added in v1.0.4

ToCreateOrUpdateRequest returns a new CreateOrUpdateNotificationForwardingConfigurationRequest using the values of the NotificationForwardingConfigurationMgmtAuditLogsModel's fields.

func (*NotificationForwardingConfigurationMgmtAuditLogsModel) Type added in v1.0.4

func (*NotificationForwardingConfigurationMgmtAuditLogsModel) ValidateConfig added in v1.0.4

type NotificationForwardingConfigurationSharedFields added in v1.0.4

type NotificationForwardingConfigurationSharedFields struct {
	ID          types.String                  `tfsdk:"id"`
	Name        types.String                  `tfsdk:"name"`
	Description types.String                  `tfsdk:"description"`
	Enabled     types.Bool                    `tfsdk:"enabled"`
	Scope       *sharedModels.RootFilterModel `tfsdk:"scope"`
	Timezone    types.String                  `tfsdk:"timezone"`
}

func (*NotificationForwardingConfigurationSharedFields) Equals added in v1.0.4

Equals compares two NotificationForwardingConfigurationSharedFields structs and returns true if all of their fields are equal, false otherwise.

func (*NotificationForwardingConfigurationSharedFields) FromTfsdk added in v1.0.4

type PermissionConfigModel

type PermissionConfigModel struct {
	Name           string               `tfsdk:"name"`
	ViewName       string               `tfsdk:"view_name"`
	ActionName     string               `tfsdk:"action_name"`
	SubPermissions []SubPermissionModel `tfsdk:"sub_permissions"`
}

type RbacPermissionModel

type RbacPermissionModel struct {
	CategoryName  string             `tfsdk:"category_name"`
	SubCategories []SubCategoryModel `tfsdk:"sub_categories"`
}

type ScopeAssetGroupRefModel

type ScopeAssetGroupRefModel struct {
	AssetGroupID   types.Int64  `tfsdk:"asset_group_id"`
	AssetGroupName types.String `tfsdk:"asset_group_name"`
}

ScopeAssetGroupRefModel

type ScopeModel

type ScopeModel struct {
	ID           types.String       `tfsdk:"id"`
	EntityType   types.String       `tfsdk:"entity_type"`
	EntityID     types.String       `tfsdk:"entity_id"`
	Assets       *AssetsModel       `tfsdk:"assets"`
	DatasetsRows *DatasetsRowsModel `tfsdk:"datasets_rows"`
	Endpoints    *EndpointsModel    `tfsdk:"endpoints"`
	CasesIssues  *CasesIssuesModel  `tfsdk:"cases_issues"`
}

ScopeModel is the model for the scope resource.

func (*ScopeModel) RefreshFromRemote

func (m *ScopeModel) RefreshFromRemote(ctx context.Context, diags *diag.Diagnostics, remote *platformtypes.Scope)

RefreshFromRemote populates the model from the SDK's Scope object.

func (*ScopeModel) ToEditRequest

func (m *ScopeModel) ToEditRequest() platformtypes.EditScopeRequestData

ToEditRequest converts the model to an EditScopeRequestData for the SDK.

type SubCategoryModel

type SubCategoryModel struct {
	SubCategoryName string                  `tfsdk:"sub_category_name"`
	Permissions     []PermissionConfigModel `tfsdk:"permissions"`
}

type SubPermissionModel

type SubPermissionModel struct {
	ActionName string `tfsdk:"action_name"`
	Name       string `tfsdk:"name"`
}

type SyslogConfigIssuesModel added in v1.0.4

type SyslogConfigIssuesModel struct {
	ServerID types.Int64  `tfsdk:"server_id"`
	Format   types.String `tfsdk:"format"`
}

SyslogConfigIssuesModel is the model for syslog notification forwarding settings as represented in the Issues notification forwarding configuration type.

func (*SyslogConfigIssuesModel) Equals added in v1.0.4

func (m *SyslogConfigIssuesModel) Equals(other *SyslogConfigIssuesModel) (isEqual bool)

func (*SyslogConfigIssuesModel) ToSDK added in v1.0.4

type SyslogConfigModel added in v1.0.4

type SyslogConfigModel struct {
	ServerID types.Int64 `tfsdk:"server_id"`
}

SyslogConfigModel is the model for syslog notification forwarding settings.

func (*SyslogConfigModel) Equals added in v1.0.4

func (m *SyslogConfigModel) Equals(other *SyslogConfigModel) (isEqual bool)

Equals compares two SyslogConfigModel structs and returns true if all of their fields are equal, false otherwise.

func (*SyslogConfigModel) ToSDK added in v1.0.4

type TagModel

type TagModel struct {
	TagID   types.String `tfsdk:"tag_id"`
	TagName types.String `tfsdk:"tag_name"`
}

TagModel is the model for a tag in the scope.

type UserGroupModel

type UserGroupModel struct {
	ID             types.String       `tfsdk:"id"`
	GroupName      types.String       `tfsdk:"group_name"`
	Description    types.String       `tfsdk:"description"`
	RoleID         types.String       `tfsdk:"role_id"`
	PrettyRoleName types.String       `tfsdk:"pretty_role_name"`
	CreatedBy      types.String       `tfsdk:"created_by"`
	CreatedTS      types.Int64        `tfsdk:"created_ts"`
	UpdatedTS      types.Int64        `tfsdk:"updated_ts"`
	Users          types.Set          `tfsdk:"users"`
	AllUsers       types.Set          `tfsdk:"all_users"`
	GroupType      types.String       `tfsdk:"group_type"`
	NestedGroups   []NestedGroupModel `tfsdk:"nested_groups"` // read-only objects (from list)
	IDPGroups      types.Set          `tfsdk:"idp_groups"`
}

UserGroupModel is the model for the user_group resource.

func (*UserGroupModel) RefreshFromRemote

func (m *UserGroupModel) RefreshFromRemote(ctx context.Context, diagnostics *diag.Diagnostics, remote *platformtypes.UserGroup)

RefreshFromRemote populates the model from the SDK's UserGroup object.

func (*UserGroupModel) ToCreateRequest

func (m *UserGroupModel) ToCreateRequest(ctx context.Context, diagnostics *diag.Diagnostics) platformtypes.UserGroupCreateRequest

ToCreateRequest converts the model to a CreateUserGroup request for the SDK.

func (*UserGroupModel) ToEditRequest

func (m *UserGroupModel) ToEditRequest(ctx context.Context, diagnostics *diag.Diagnostics) platformtypes.UserGroupEditRequest

ToEditRequest converts the model to an UserGroupEditRequest for the SDK.

type UserModel

type UserModel struct {
	Email        types.String `tfsdk:"user_email"`
	FirstName    types.String `tfsdk:"user_first_name"`
	LastName     types.String `tfsdk:"user_last_name"`
	PhoneNumber  types.String `tfsdk:"phone_number"`
	Status       types.String `tfsdk:"status"`
	RoleName     types.String `tfsdk:"role_name"`
	LastLoggedIn types.Int64  `tfsdk:"last_logged_in"`
	Hidden       types.Bool   `tfsdk:"hidden"`
	UserType     types.String `tfsdk:"user_type"`
	GroupIDs     types.List   `tfsdk:"group_ids"` // write intent
	Groups       types.List   `tfsdk:"groups"`    // read-only echo
}

UserModel is the model for the user resource.

func (*UserModel) RefreshFromRemote

func (m *UserModel) RefreshFromRemote(ctx context.Context, diags *diag.Diagnostics, remote *platformtypes.IamUser)

RefreshFromRemote populates the model from the SDK's IamUser object.

func (*UserModel) ToEditRequest

func (m *UserModel) ToEditRequest() platformtypes.IamUserEditRequest

ToEditRequest converts the model to an IamUserEditRequest for the SDK.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL