Files
upstream-ory-kratos/pkg/client-go/model_ui_node_division_attributes.go
upstream-mirror c60cc7ca75
Some checks failed
CI / Run tests and lints (push) Failing after 29s
CI / Build CLI docs (push) Has been skipped
CI / Run Playwright end-to-end tests (mysql) (push) Failing after 3s
CI / Run Playwright end-to-end tests (postgres) (push) Failing after 2s
CI / Run Playwright end-to-end tests (sqlite) (push) Failing after 3s
CodeQL / Analyze (go) (push) Failing after 4s
CodeQL / Analyze (javascript) (push) Failing after 3s
Docker Image Scanners / scanners (push) Failing after 4s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Run end-to-end tests (postgres) (push) Failing after 19s
CI / Run end-to-end tests (sqlite) (push) Failing after 2s
CI / Run Playwright end-to-end tests (cockroach) (push) Failing after 2s
CI / Draft newsletter (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped
snapshot of https://github.com/ory/kratos.git (master, 2026-09-15; blobs > 131072B omitted)
2026-09-15 21:19:12 +05:00

275 lines
7.6 KiB
Go

/*
Ory Identities API
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
API version:
Contact: office@ory.sh
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package client
import (
"encoding/json"
"fmt"
)
// checks if the UiNodeDivisionAttributes type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UiNodeDivisionAttributes{}
// UiNodeDivisionAttributes Division sections are used for interactive widgets that require a hook in the DOM / view.
type UiNodeDivisionAttributes struct {
// A classname that should be rendered into the DOM.
Class *string `json:"class,omitempty"`
// Data is a map of key-value pairs that are passed to the division. They may be used for `data-...` attributes.
Data *map[string]string `json:"data,omitempty"`
// A unique identifier
Id string `json:"id"`
// NodeType represents this node's type. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"script\". text Text input Input img Image a Anchor script Script div Division
NodeType string `json:"node_type"`
AdditionalProperties map[string]interface{}
}
type _UiNodeDivisionAttributes UiNodeDivisionAttributes
// NewUiNodeDivisionAttributes instantiates a new UiNodeDivisionAttributes 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 NewUiNodeDivisionAttributes(id string, nodeType string) *UiNodeDivisionAttributes {
this := UiNodeDivisionAttributes{}
this.Id = id
this.NodeType = nodeType
return &this
}
// NewUiNodeDivisionAttributesWithDefaults instantiates a new UiNodeDivisionAttributes 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 NewUiNodeDivisionAttributesWithDefaults() *UiNodeDivisionAttributes {
this := UiNodeDivisionAttributes{}
return &this
}
// GetClass returns the Class field value if set, zero value otherwise.
func (o *UiNodeDivisionAttributes) GetClass() string {
if o == nil || IsNil(o.Class) {
var ret string
return ret
}
return *o.Class
}
// GetClassOk returns a tuple with the Class field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UiNodeDivisionAttributes) GetClassOk() (*string, bool) {
if o == nil || IsNil(o.Class) {
return nil, false
}
return o.Class, true
}
// HasClass returns a boolean if a field has been set.
func (o *UiNodeDivisionAttributes) HasClass() bool {
if o != nil && !IsNil(o.Class) {
return true
}
return false
}
// SetClass gets a reference to the given string and assigns it to the Class field.
func (o *UiNodeDivisionAttributes) SetClass(v string) {
o.Class = &v
}
// GetData returns the Data field value if set, zero value otherwise.
func (o *UiNodeDivisionAttributes) GetData() map[string]string {
if o == nil || IsNil(o.Data) {
var ret map[string]string
return ret
}
return *o.Data
}
// GetDataOk returns a tuple with the Data field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UiNodeDivisionAttributes) GetDataOk() (*map[string]string, bool) {
if o == nil || IsNil(o.Data) {
return nil, false
}
return o.Data, true
}
// HasData returns a boolean if a field has been set.
func (o *UiNodeDivisionAttributes) HasData() bool {
if o != nil && !IsNil(o.Data) {
return true
}
return false
}
// SetData gets a reference to the given map[string]string and assigns it to the Data field.
func (o *UiNodeDivisionAttributes) SetData(v map[string]string) {
o.Data = &v
}
// GetId returns the Id field value
func (o *UiNodeDivisionAttributes) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *UiNodeDivisionAttributes) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *UiNodeDivisionAttributes) SetId(v string) {
o.Id = v
}
// GetNodeType returns the NodeType field value
func (o *UiNodeDivisionAttributes) GetNodeType() string {
if o == nil {
var ret string
return ret
}
return o.NodeType
}
// GetNodeTypeOk returns a tuple with the NodeType field value
// and a boolean to check if the value has been set.
func (o *UiNodeDivisionAttributes) GetNodeTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.NodeType, true
}
// SetNodeType sets field value
func (o *UiNodeDivisionAttributes) SetNodeType(v string) {
o.NodeType = v
}
func (o UiNodeDivisionAttributes) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o UiNodeDivisionAttributes) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Class) {
toSerialize["class"] = o.Class
}
if !IsNil(o.Data) {
toSerialize["data"] = o.Data
}
toSerialize["id"] = o.Id
toSerialize["node_type"] = o.NodeType
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *UiNodeDivisionAttributes) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"id",
"node_type",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err
}
for _, requiredProperty := range requiredProperties {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varUiNodeDivisionAttributes := _UiNodeDivisionAttributes{}
err = json.Unmarshal(data, &varUiNodeDivisionAttributes)
if err != nil {
return err
}
*o = UiNodeDivisionAttributes(varUiNodeDivisionAttributes)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "class")
delete(additionalProperties, "data")
delete(additionalProperties, "id")
delete(additionalProperties, "node_type")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableUiNodeDivisionAttributes struct {
value *UiNodeDivisionAttributes
isSet bool
}
func (v NullableUiNodeDivisionAttributes) Get() *UiNodeDivisionAttributes {
return v.value
}
func (v *NullableUiNodeDivisionAttributes) Set(val *UiNodeDivisionAttributes) {
v.value = val
v.isSet = true
}
func (v NullableUiNodeDivisionAttributes) IsSet() bool {
return v.isSet
}
func (v *NullableUiNodeDivisionAttributes) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUiNodeDivisionAttributes(val *UiNodeDivisionAttributes) *NullableUiNodeDivisionAttributes {
return &NullableUiNodeDivisionAttributes{value: val, isSet: true}
}
func (v NullableUiNodeDivisionAttributes) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUiNodeDivisionAttributes) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}