models

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRecursiveFilterSchema

func GetRecursiveFilterSchema(depth, maxDepth int) map[string]schema.Attribute

func NestedModelToSDKFilter

func NestedModelToSDKFilter(ctx context.Context, model *NestedFilterModel) filterTypes.Filter

func RootModelToSDKFilter

func RootModelToSDKFilter(ctx context.Context, model *RootFilterModel) filterTypes.FilterRoot

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 *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.

func (*AssetGroupModel) ToCreateOrUpdateRequest added in v1.0.3

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 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 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 NestedFilterModel

type NestedFilterModel struct {
	And         []NestedFilterModel `tfsdk:"and" json:"AND,omitempty"`
	Or          []NestedFilterModel `tfsdk:"or" json:"OR,omitempty"`
	SearchField types.String        `tfsdk:"search_field" json:"SEARCH_FIELD"`
	SearchType  types.String        `tfsdk:"search_type" json:"SEARCH_TYPE"`
	SearchValue types.String        `tfsdk:"search_value" json:"SEARCH_VALUE"`
}

NestedFilterModel represents a nested filter condition.

func (*NestedFilterModel) UnmarshalJSON

func (m *NestedFilterModel) UnmarshalJSON(data []byte) error

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 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 RootFilterModel

type RootFilterModel struct {
	And []NestedFilterModel `tfsdk:"and" json:"AND,omitempty"`
	Or  []NestedFilterModel `tfsdk:"or" json:"OR,omitempty"`
}

RootFilterModel represents the root of the membership predicate.

func SDKToModel

func SDKToModel(ctx context.Context, sdkFilter filterTypes.FilterRoot) *RootFilterModel

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 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          []string           `tfsdk:"users"`
	GroupType      types.String       `tfsdk:"group_type"`
	NestedGroups   []NestedGroupModel `tfsdk:"nested_groups"` // read-only objects (from list)
	IDPGroups      []string           `tfsdk:"idp_groups"`
}

UserGroupModel is the model for the user_group resource.

func (*UserGroupModel) RefreshFromRemote

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

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

func (*UserGroupModel) ToCreateRequest

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

func (*UserGroupModel) ToEditRequest

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