fleet-memory/hindsight-clients/go/model_bank_template_config.go
Nicolò Boschi 30a319a6ab
feat: bank template import/export with Template Hub (#819)
* feat(api): add bank template import/export endpoints

Add POST /banks/{bank_id}/import and GET /banks/{bank_id}/export
endpoints for declarative bank setup via JSON manifests.

A template manifest (version 1) can include bank config overrides
and mental model definitions. Import creates or updates mental
models matched by id, applies config as per-bank overrides, and
returns async operation IDs for content generation.

Export dumps a bank's explicit overrides and mental models as a
manifest that can be re-imported into another bank.

Includes control plane UI: bank creation dialog now accepts an
optional template JSON to pre-configure the bank on creation.

* docs: add Template Gallery page and bank templates reference

- Template Gallery (/templates) with search, category filter, manifest
  preview modal with copy-to-clipboard
- 5 starter templates: Customer Support, Research Assistant, Personal
  Journal, Code Review Buddy, Meeting Notes
- Bank Templates API reference doc (developer/api/bank-templates)
- Sidebar entry under API section

* docs: add Template Gallery links to navbar and sidebar

- Top navbar: "Templates" link between Integrations and Changelog
- Sidebar: "Template Gallery" in Resources section

* fix(docs): remove emoji icons, autofocus search, fix placeholder in template gallery

* docs: rename to Bank Templates, move to Resources sidebar only

* docs: add Bank Templates to Resources navbar dropdown

* feat(api): add directives to bank template import/export

- Add BankTemplateDirective model with name, content, priority, is_active, tags
- Import creates/updates directives matched by name
- Export includes all directives (active and inactive)
- Validation: duplicate names rejected, empty name/content caught
- Tests: 24 tests covering directives create/update, existing vs new
  bank import, validation, export with directives, full round-trip

* docs: add directives to bank templates docs and sample templates

* feat(api): add JSON Schema endpoint for bank template validation

- GET /v1/default/bank-template-schema returns the JSON Schema
  auto-generated from the Pydantic BankTemplateManifest model
- Static schema file at docs/static/bank-template-schema.json
- Docs updated with schema endpoint, static file link, and
  validation examples (Python jsonschema, Node ajv-cli)

* feat(api): live schema validation on import, fix schema endpoint path

- Move schema endpoint to /v1/bank-template-schema (system-level, not per-bank)
- Import endpoint now accepts raw JSON and validates with Pydantic manually,
  returning clean 400 errors instead of raw 422s for all validation failures
- All validation (schema + semantic) returns consistent 400 with detailed messages

* docs: add interactive JSON Schema viewer to Bank Templates page

Renders the Pydantic-generated schema as a collapsible property tree
with types, required badges, defaults, and descriptions. The schema
is imported from the static bank-template-schema.json file.

* ui: add template toggle switch and browse link to bank creation dialog

- Replace always-visible textarea with a switch toggle ("Import from template")
- Textarea only shows when switch is on, keeping the dialog clean by default
- Add "Browse templates" link pointing to hindsight.vectorize.io/templates
- Reset template state when switch is toggled off or dialog is cancelled

* ui: add empty state with Add Document CTA to data view

When a bank has 0 memories, the data view (all tabs: constellation,
graph, table, timeline) shows a centered empty state with a CTA
button that opens the Add Document dialog.

* docs: replace templates with Conversation and Coding Agent

Remove generic placeholder templates. Add two practical templates
based on actual integration patterns:

- Conversation: for chat agents (LiteLLM, LangGraph, Pydantic AI,
  Vercel AI SDK). Tracks user preferences, open threads.
- Coding Agent: for Claude Code/Codex. Tracks technical decisions,
  project context, developer preferences. High literalism.

* docs: rename gallery to Bank Templates Hub, keep API doc as Bank Templates

* docs: register layout-template and file-json icons in navbar and sidebar

* docs: register layout-template icon in DefaultNavbarItem for dropdown items

* docs: show integration icons on template cards

Templates now have an optional `integrations` field referencing
integration IDs from integrations.json. Icons are resolved at render
time and shown in the card header next to the category badge.

* docs: add Personal Assistant template for OpenClaw, Hermes, NemoClaw

* feat: add Export Template to bank actions + map all integrations to templates

- Add "Export Template" to the bank Actions dropdown — exports config,
  mental models, and directives as JSON, copies to clipboard
- Add export API route and client method
- Map remaining integrations to templates: CrewAI, AG2, Agno, Strands,
  LlamaIndex, local-mcp, skills → Conversation; hindclaw → Personal Assistant

* feat: add --template flag to LoCoMo benchmark + remove schema from Hub

- LoCoMo benchmark accepts --template <path> to apply a bank template
  manifest (config, mental models, directives) before ingestion
- Template is applied per-bank in both single-phase and two-phase modes
- BenchmarkRunner.apply_template() reuses the same engine methods as
  the /import API endpoint
- Remove Manifest Schema section from Bank Templates Hub page
  (schema stays in the API reference doc)

* refactor: remove description field from bank template manifest

* docs: remove tags, fact_types, and directives from starter templates

* docs: remove reflect_mission and disposition fields from starter templates

* build: validate template manifests against JSON Schema during docs build

* cleanup: remove unused JsonSchemaViewer component

* docs: remove retain_extraction_mode from starter templates

* ui: enable word wrap in template manifest preview

* docs: add link to Bank Templates reference doc from Hub page

* docs: convert bank templates doc to mdx with multi-language code snippets

- Convert bank-templates.md to .mdx with Tabs/CodeSnippet components
- Add example files: bank-templates.py, .mjs, .sh, .go with doc markers
- Examples cover import, dry-run, export, round-trip, and schema
- Regenerate OpenAPI spec and all client SDKs (Python, TS, Rust, Go)

* fix: migration revision collision + use typed models in benchmark template

- Rename merge migration d6e7f8a9b0c1 -> d6e7f8a9b0c2 to resolve
  revision ID collision with case_insensitive_entities_trgm_index
- Update a4b5c6d7e8f9 down_revision to point to the renamed migration
- Fix f-string lint in case_insensitive migration
- BenchmarkRunner.apply_template() now validates manifest through
  BankTemplateManifest Pydantic model instead of raw dict access
- Remove redundant inline imports (json, Path already at module top)

* fix(docs): add missing Go tab to dry-run code snippet

* ci: retrigger

* fix: sync skills openapi.json + fix bankId null type error in export

- Copy updated openapi.json to skills/hindsight-docs/references/
- Add null guard for bankId in Export Template onClick handler

* fix: sync generated files (memory_engine formatting, docs skill references)

* cleanup: remove obsolete migration collision workaround
2026-04-02 12:21:53 +02:00

633 lines
22 KiB
Go

/*
Hindsight HTTP API
HTTP API for Hindsight
API version: 0.4.22
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hindsight
import (
"encoding/json"
)
// checks if the BankTemplateConfig type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BankTemplateConfig{}
// BankTemplateConfig Bank configuration fields within a template manifest. Only includes configurable (per-bank) fields. Credential fields (API keys, base URLs) are intentionally excluded for security.
type BankTemplateConfig struct {
ReflectMission NullableString `json:"reflect_mission,omitempty"`
RetainMission NullableString `json:"retain_mission,omitempty"`
RetainExtractionMode NullableString `json:"retain_extraction_mode,omitempty"`
RetainCustomInstructions NullableString `json:"retain_custom_instructions,omitempty"`
RetainChunkSize NullableInt32 `json:"retain_chunk_size,omitempty"`
EnableObservations NullableBool `json:"enable_observations,omitempty"`
ObservationsMission NullableString `json:"observations_mission,omitempty"`
DispositionSkepticism NullableInt32 `json:"disposition_skepticism,omitempty"`
DispositionLiteralism NullableInt32 `json:"disposition_literalism,omitempty"`
DispositionEmpathy NullableInt32 `json:"disposition_empathy,omitempty"`
EntityLabels []string `json:"entity_labels,omitempty"`
EntitiesAllowFreeForm NullableBool `json:"entities_allow_free_form,omitempty"`
}
// NewBankTemplateConfig instantiates a new BankTemplateConfig 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 NewBankTemplateConfig() *BankTemplateConfig {
this := BankTemplateConfig{}
return &this
}
// NewBankTemplateConfigWithDefaults instantiates a new BankTemplateConfig 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 NewBankTemplateConfigWithDefaults() *BankTemplateConfig {
this := BankTemplateConfig{}
return &this
}
// GetReflectMission returns the ReflectMission field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BankTemplateConfig) GetReflectMission() string {
if o == nil || IsNil(o.ReflectMission.Get()) {
var ret string
return ret
}
return *o.ReflectMission.Get()
}
// GetReflectMissionOk returns a tuple with the ReflectMission field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BankTemplateConfig) GetReflectMissionOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ReflectMission.Get(), o.ReflectMission.IsSet()
}
// HasReflectMission returns a boolean if a field has been set.
func (o *BankTemplateConfig) HasReflectMission() bool {
if o != nil && o.ReflectMission.IsSet() {
return true
}
return false
}
// SetReflectMission gets a reference to the given NullableString and assigns it to the ReflectMission field.
func (o *BankTemplateConfig) SetReflectMission(v string) {
o.ReflectMission.Set(&v)
}
// SetReflectMissionNil sets the value for ReflectMission to be an explicit nil
func (o *BankTemplateConfig) SetReflectMissionNil() {
o.ReflectMission.Set(nil)
}
// UnsetReflectMission ensures that no value is present for ReflectMission, not even an explicit nil
func (o *BankTemplateConfig) UnsetReflectMission() {
o.ReflectMission.Unset()
}
// GetRetainMission returns the RetainMission field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BankTemplateConfig) GetRetainMission() string {
if o == nil || IsNil(o.RetainMission.Get()) {
var ret string
return ret
}
return *o.RetainMission.Get()
}
// GetRetainMissionOk returns a tuple with the RetainMission field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BankTemplateConfig) GetRetainMissionOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.RetainMission.Get(), o.RetainMission.IsSet()
}
// HasRetainMission returns a boolean if a field has been set.
func (o *BankTemplateConfig) HasRetainMission() bool {
if o != nil && o.RetainMission.IsSet() {
return true
}
return false
}
// SetRetainMission gets a reference to the given NullableString and assigns it to the RetainMission field.
func (o *BankTemplateConfig) SetRetainMission(v string) {
o.RetainMission.Set(&v)
}
// SetRetainMissionNil sets the value for RetainMission to be an explicit nil
func (o *BankTemplateConfig) SetRetainMissionNil() {
o.RetainMission.Set(nil)
}
// UnsetRetainMission ensures that no value is present for RetainMission, not even an explicit nil
func (o *BankTemplateConfig) UnsetRetainMission() {
o.RetainMission.Unset()
}
// GetRetainExtractionMode returns the RetainExtractionMode field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BankTemplateConfig) GetRetainExtractionMode() string {
if o == nil || IsNil(o.RetainExtractionMode.Get()) {
var ret string
return ret
}
return *o.RetainExtractionMode.Get()
}
// GetRetainExtractionModeOk returns a tuple with the RetainExtractionMode field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BankTemplateConfig) GetRetainExtractionModeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.RetainExtractionMode.Get(), o.RetainExtractionMode.IsSet()
}
// HasRetainExtractionMode returns a boolean if a field has been set.
func (o *BankTemplateConfig) HasRetainExtractionMode() bool {
if o != nil && o.RetainExtractionMode.IsSet() {
return true
}
return false
}
// SetRetainExtractionMode gets a reference to the given NullableString and assigns it to the RetainExtractionMode field.
func (o *BankTemplateConfig) SetRetainExtractionMode(v string) {
o.RetainExtractionMode.Set(&v)
}
// SetRetainExtractionModeNil sets the value for RetainExtractionMode to be an explicit nil
func (o *BankTemplateConfig) SetRetainExtractionModeNil() {
o.RetainExtractionMode.Set(nil)
}
// UnsetRetainExtractionMode ensures that no value is present for RetainExtractionMode, not even an explicit nil
func (o *BankTemplateConfig) UnsetRetainExtractionMode() {
o.RetainExtractionMode.Unset()
}
// GetRetainCustomInstructions returns the RetainCustomInstructions field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BankTemplateConfig) GetRetainCustomInstructions() string {
if o == nil || IsNil(o.RetainCustomInstructions.Get()) {
var ret string
return ret
}
return *o.RetainCustomInstructions.Get()
}
// GetRetainCustomInstructionsOk returns a tuple with the RetainCustomInstructions field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BankTemplateConfig) GetRetainCustomInstructionsOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.RetainCustomInstructions.Get(), o.RetainCustomInstructions.IsSet()
}
// HasRetainCustomInstructions returns a boolean if a field has been set.
func (o *BankTemplateConfig) HasRetainCustomInstructions() bool {
if o != nil && o.RetainCustomInstructions.IsSet() {
return true
}
return false
}
// SetRetainCustomInstructions gets a reference to the given NullableString and assigns it to the RetainCustomInstructions field.
func (o *BankTemplateConfig) SetRetainCustomInstructions(v string) {
o.RetainCustomInstructions.Set(&v)
}
// SetRetainCustomInstructionsNil sets the value for RetainCustomInstructions to be an explicit nil
func (o *BankTemplateConfig) SetRetainCustomInstructionsNil() {
o.RetainCustomInstructions.Set(nil)
}
// UnsetRetainCustomInstructions ensures that no value is present for RetainCustomInstructions, not even an explicit nil
func (o *BankTemplateConfig) UnsetRetainCustomInstructions() {
o.RetainCustomInstructions.Unset()
}
// GetRetainChunkSize returns the RetainChunkSize field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BankTemplateConfig) GetRetainChunkSize() int32 {
if o == nil || IsNil(o.RetainChunkSize.Get()) {
var ret int32
return ret
}
return *o.RetainChunkSize.Get()
}
// GetRetainChunkSizeOk returns a tuple with the RetainChunkSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BankTemplateConfig) GetRetainChunkSizeOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.RetainChunkSize.Get(), o.RetainChunkSize.IsSet()
}
// HasRetainChunkSize returns a boolean if a field has been set.
func (o *BankTemplateConfig) HasRetainChunkSize() bool {
if o != nil && o.RetainChunkSize.IsSet() {
return true
}
return false
}
// SetRetainChunkSize gets a reference to the given NullableInt32 and assigns it to the RetainChunkSize field.
func (o *BankTemplateConfig) SetRetainChunkSize(v int32) {
o.RetainChunkSize.Set(&v)
}
// SetRetainChunkSizeNil sets the value for RetainChunkSize to be an explicit nil
func (o *BankTemplateConfig) SetRetainChunkSizeNil() {
o.RetainChunkSize.Set(nil)
}
// UnsetRetainChunkSize ensures that no value is present for RetainChunkSize, not even an explicit nil
func (o *BankTemplateConfig) UnsetRetainChunkSize() {
o.RetainChunkSize.Unset()
}
// GetEnableObservations returns the EnableObservations field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BankTemplateConfig) GetEnableObservations() bool {
if o == nil || IsNil(o.EnableObservations.Get()) {
var ret bool
return ret
}
return *o.EnableObservations.Get()
}
// GetEnableObservationsOk returns a tuple with the EnableObservations field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BankTemplateConfig) GetEnableObservationsOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.EnableObservations.Get(), o.EnableObservations.IsSet()
}
// HasEnableObservations returns a boolean if a field has been set.
func (o *BankTemplateConfig) HasEnableObservations() bool {
if o != nil && o.EnableObservations.IsSet() {
return true
}
return false
}
// SetEnableObservations gets a reference to the given NullableBool and assigns it to the EnableObservations field.
func (o *BankTemplateConfig) SetEnableObservations(v bool) {
o.EnableObservations.Set(&v)
}
// SetEnableObservationsNil sets the value for EnableObservations to be an explicit nil
func (o *BankTemplateConfig) SetEnableObservationsNil() {
o.EnableObservations.Set(nil)
}
// UnsetEnableObservations ensures that no value is present for EnableObservations, not even an explicit nil
func (o *BankTemplateConfig) UnsetEnableObservations() {
o.EnableObservations.Unset()
}
// GetObservationsMission returns the ObservationsMission field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BankTemplateConfig) GetObservationsMission() string {
if o == nil || IsNil(o.ObservationsMission.Get()) {
var ret string
return ret
}
return *o.ObservationsMission.Get()
}
// GetObservationsMissionOk returns a tuple with the ObservationsMission field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BankTemplateConfig) GetObservationsMissionOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ObservationsMission.Get(), o.ObservationsMission.IsSet()
}
// HasObservationsMission returns a boolean if a field has been set.
func (o *BankTemplateConfig) HasObservationsMission() bool {
if o != nil && o.ObservationsMission.IsSet() {
return true
}
return false
}
// SetObservationsMission gets a reference to the given NullableString and assigns it to the ObservationsMission field.
func (o *BankTemplateConfig) SetObservationsMission(v string) {
o.ObservationsMission.Set(&v)
}
// SetObservationsMissionNil sets the value for ObservationsMission to be an explicit nil
func (o *BankTemplateConfig) SetObservationsMissionNil() {
o.ObservationsMission.Set(nil)
}
// UnsetObservationsMission ensures that no value is present for ObservationsMission, not even an explicit nil
func (o *BankTemplateConfig) UnsetObservationsMission() {
o.ObservationsMission.Unset()
}
// GetDispositionSkepticism returns the DispositionSkepticism field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BankTemplateConfig) GetDispositionSkepticism() int32 {
if o == nil || IsNil(o.DispositionSkepticism.Get()) {
var ret int32
return ret
}
return *o.DispositionSkepticism.Get()
}
// GetDispositionSkepticismOk returns a tuple with the DispositionSkepticism field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BankTemplateConfig) GetDispositionSkepticismOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.DispositionSkepticism.Get(), o.DispositionSkepticism.IsSet()
}
// HasDispositionSkepticism returns a boolean if a field has been set.
func (o *BankTemplateConfig) HasDispositionSkepticism() bool {
if o != nil && o.DispositionSkepticism.IsSet() {
return true
}
return false
}
// SetDispositionSkepticism gets a reference to the given NullableInt32 and assigns it to the DispositionSkepticism field.
func (o *BankTemplateConfig) SetDispositionSkepticism(v int32) {
o.DispositionSkepticism.Set(&v)
}
// SetDispositionSkepticismNil sets the value for DispositionSkepticism to be an explicit nil
func (o *BankTemplateConfig) SetDispositionSkepticismNil() {
o.DispositionSkepticism.Set(nil)
}
// UnsetDispositionSkepticism ensures that no value is present for DispositionSkepticism, not even an explicit nil
func (o *BankTemplateConfig) UnsetDispositionSkepticism() {
o.DispositionSkepticism.Unset()
}
// GetDispositionLiteralism returns the DispositionLiteralism field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BankTemplateConfig) GetDispositionLiteralism() int32 {
if o == nil || IsNil(o.DispositionLiteralism.Get()) {
var ret int32
return ret
}
return *o.DispositionLiteralism.Get()
}
// GetDispositionLiteralismOk returns a tuple with the DispositionLiteralism field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BankTemplateConfig) GetDispositionLiteralismOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.DispositionLiteralism.Get(), o.DispositionLiteralism.IsSet()
}
// HasDispositionLiteralism returns a boolean if a field has been set.
func (o *BankTemplateConfig) HasDispositionLiteralism() bool {
if o != nil && o.DispositionLiteralism.IsSet() {
return true
}
return false
}
// SetDispositionLiteralism gets a reference to the given NullableInt32 and assigns it to the DispositionLiteralism field.
func (o *BankTemplateConfig) SetDispositionLiteralism(v int32) {
o.DispositionLiteralism.Set(&v)
}
// SetDispositionLiteralismNil sets the value for DispositionLiteralism to be an explicit nil
func (o *BankTemplateConfig) SetDispositionLiteralismNil() {
o.DispositionLiteralism.Set(nil)
}
// UnsetDispositionLiteralism ensures that no value is present for DispositionLiteralism, not even an explicit nil
func (o *BankTemplateConfig) UnsetDispositionLiteralism() {
o.DispositionLiteralism.Unset()
}
// GetDispositionEmpathy returns the DispositionEmpathy field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BankTemplateConfig) GetDispositionEmpathy() int32 {
if o == nil || IsNil(o.DispositionEmpathy.Get()) {
var ret int32
return ret
}
return *o.DispositionEmpathy.Get()
}
// GetDispositionEmpathyOk returns a tuple with the DispositionEmpathy field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BankTemplateConfig) GetDispositionEmpathyOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.DispositionEmpathy.Get(), o.DispositionEmpathy.IsSet()
}
// HasDispositionEmpathy returns a boolean if a field has been set.
func (o *BankTemplateConfig) HasDispositionEmpathy() bool {
if o != nil && o.DispositionEmpathy.IsSet() {
return true
}
return false
}
// SetDispositionEmpathy gets a reference to the given NullableInt32 and assigns it to the DispositionEmpathy field.
func (o *BankTemplateConfig) SetDispositionEmpathy(v int32) {
o.DispositionEmpathy.Set(&v)
}
// SetDispositionEmpathyNil sets the value for DispositionEmpathy to be an explicit nil
func (o *BankTemplateConfig) SetDispositionEmpathyNil() {
o.DispositionEmpathy.Set(nil)
}
// UnsetDispositionEmpathy ensures that no value is present for DispositionEmpathy, not even an explicit nil
func (o *BankTemplateConfig) UnsetDispositionEmpathy() {
o.DispositionEmpathy.Unset()
}
// GetEntityLabels returns the EntityLabels field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BankTemplateConfig) GetEntityLabels() []string {
if o == nil {
var ret []string
return ret
}
return o.EntityLabels
}
// GetEntityLabelsOk returns a tuple with the EntityLabels field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BankTemplateConfig) GetEntityLabelsOk() ([]string, bool) {
if o == nil || IsNil(o.EntityLabels) {
return nil, false
}
return o.EntityLabels, true
}
// HasEntityLabels returns a boolean if a field has been set.
func (o *BankTemplateConfig) HasEntityLabels() bool {
if o != nil && !IsNil(o.EntityLabels) {
return true
}
return false
}
// SetEntityLabels gets a reference to the given []string and assigns it to the EntityLabels field.
func (o *BankTemplateConfig) SetEntityLabels(v []string) {
o.EntityLabels = v
}
// GetEntitiesAllowFreeForm returns the EntitiesAllowFreeForm field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *BankTemplateConfig) GetEntitiesAllowFreeForm() bool {
if o == nil || IsNil(o.EntitiesAllowFreeForm.Get()) {
var ret bool
return ret
}
return *o.EntitiesAllowFreeForm.Get()
}
// GetEntitiesAllowFreeFormOk returns a tuple with the EntitiesAllowFreeForm field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *BankTemplateConfig) GetEntitiesAllowFreeFormOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.EntitiesAllowFreeForm.Get(), o.EntitiesAllowFreeForm.IsSet()
}
// HasEntitiesAllowFreeForm returns a boolean if a field has been set.
func (o *BankTemplateConfig) HasEntitiesAllowFreeForm() bool {
if o != nil && o.EntitiesAllowFreeForm.IsSet() {
return true
}
return false
}
// SetEntitiesAllowFreeForm gets a reference to the given NullableBool and assigns it to the EntitiesAllowFreeForm field.
func (o *BankTemplateConfig) SetEntitiesAllowFreeForm(v bool) {
o.EntitiesAllowFreeForm.Set(&v)
}
// SetEntitiesAllowFreeFormNil sets the value for EntitiesAllowFreeForm to be an explicit nil
func (o *BankTemplateConfig) SetEntitiesAllowFreeFormNil() {
o.EntitiesAllowFreeForm.Set(nil)
}
// UnsetEntitiesAllowFreeForm ensures that no value is present for EntitiesAllowFreeForm, not even an explicit nil
func (o *BankTemplateConfig) UnsetEntitiesAllowFreeForm() {
o.EntitiesAllowFreeForm.Unset()
}
func (o BankTemplateConfig) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o BankTemplateConfig) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.ReflectMission.IsSet() {
toSerialize["reflect_mission"] = o.ReflectMission.Get()
}
if o.RetainMission.IsSet() {
toSerialize["retain_mission"] = o.RetainMission.Get()
}
if o.RetainExtractionMode.IsSet() {
toSerialize["retain_extraction_mode"] = o.RetainExtractionMode.Get()
}
if o.RetainCustomInstructions.IsSet() {
toSerialize["retain_custom_instructions"] = o.RetainCustomInstructions.Get()
}
if o.RetainChunkSize.IsSet() {
toSerialize["retain_chunk_size"] = o.RetainChunkSize.Get()
}
if o.EnableObservations.IsSet() {
toSerialize["enable_observations"] = o.EnableObservations.Get()
}
if o.ObservationsMission.IsSet() {
toSerialize["observations_mission"] = o.ObservationsMission.Get()
}
if o.DispositionSkepticism.IsSet() {
toSerialize["disposition_skepticism"] = o.DispositionSkepticism.Get()
}
if o.DispositionLiteralism.IsSet() {
toSerialize["disposition_literalism"] = o.DispositionLiteralism.Get()
}
if o.DispositionEmpathy.IsSet() {
toSerialize["disposition_empathy"] = o.DispositionEmpathy.Get()
}
if o.EntityLabels != nil {
toSerialize["entity_labels"] = o.EntityLabels
}
if o.EntitiesAllowFreeForm.IsSet() {
toSerialize["entities_allow_free_form"] = o.EntitiesAllowFreeForm.Get()
}
return toSerialize, nil
}
type NullableBankTemplateConfig struct {
value *BankTemplateConfig
isSet bool
}
func (v NullableBankTemplateConfig) Get() *BankTemplateConfig {
return v.value
}
func (v *NullableBankTemplateConfig) Set(val *BankTemplateConfig) {
v.value = val
v.isSet = true
}
func (v NullableBankTemplateConfig) IsSet() bool {
return v.isSet
}
func (v *NullableBankTemplateConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBankTemplateConfig(val *BankTemplateConfig) *NullableBankTemplateConfig {
return &NullableBankTemplateConfig{value: val, isSet: true}
}
func (v NullableBankTemplateConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBankTemplateConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}