From b4f6b1ffe897ad348653fcd4b7786a1b2ee5d7a6 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Thu, 1 Feb 2024 16:47:18 +0100 Subject: [PATCH] chore: regenerated go-sdk files after PR #4273 --- go-sdk/pkg/registryclient-v3/kiota-lock.json | 2 +- .../models/user_interface_config.go | 146 +++++++++++++++ .../models/user_interface_config_auth.go | 177 ++++++++++++++++++ .../models/user_interface_config_auth_type.go | 39 ++++ .../models/user_interface_config_features.go | 176 +++++++++++++++++ .../models/user_interface_config_ui.go | 146 +++++++++++++++ .../system/system_request_builder.go | 5 + .../system/ui_config_request_builder.go | 70 +++++++ 8 files changed, 760 insertions(+), 1 deletion(-) create mode 100644 go-sdk/pkg/registryclient-v3/models/user_interface_config.go create mode 100644 go-sdk/pkg/registryclient-v3/models/user_interface_config_auth.go create mode 100644 go-sdk/pkg/registryclient-v3/models/user_interface_config_auth_type.go create mode 100644 go-sdk/pkg/registryclient-v3/models/user_interface_config_features.go create mode 100644 go-sdk/pkg/registryclient-v3/models/user_interface_config_ui.go create mode 100644 go-sdk/pkg/registryclient-v3/system/ui_config_request_builder.go diff --git a/go-sdk/pkg/registryclient-v3/kiota-lock.json b/go-sdk/pkg/registryclient-v3/kiota-lock.json index f6443d3799..2eb9eddd5a 100644 --- a/go-sdk/pkg/registryclient-v3/kiota-lock.json +++ b/go-sdk/pkg/registryclient-v3/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "967ADC717A463A5DA6DB8B9144AF2322D342099593ECE500309C1A425DF17C90E21DA74BDD09BFE58A4B324FDEC0F4CADE1D8E2E6A9B6C312615C2720A40C483", + "descriptionHash": "7B06E24B28BDCE1EFE2101E8144FF68C2A0B5CC1D45F783689583B526A9C641AF64E72D5E4B6D57B4E1A519F9498C6EF10BE5C5975F176470E3AE59E246934B4", "descriptionLocation": "../../v3.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.10.1", diff --git a/go-sdk/pkg/registryclient-v3/models/user_interface_config.go b/go-sdk/pkg/registryclient-v3/models/user_interface_config.go new file mode 100644 index 0000000000..4a7340fa75 --- /dev/null +++ b/go-sdk/pkg/registryclient-v3/models/user_interface_config.go @@ -0,0 +1,146 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserInterfaceConfig defines the user interface configuration data type. +type UserInterfaceConfig struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The auth property + auth UserInterfaceConfigAuthable + // The features property + features UserInterfaceConfigFeaturesable + // The ui property + ui UserInterfaceConfigUiable +} + +// NewUserInterfaceConfig instantiates a new UserInterfaceConfig and sets the default values. +func NewUserInterfaceConfig() *UserInterfaceConfig { + m := &UserInterfaceConfig{} + m.SetAdditionalData(make(map[string]any)) + return m +} + +// CreateUserInterfaceConfigFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUserInterfaceConfigFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserInterfaceConfig(), nil +} + +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UserInterfaceConfig) GetAdditionalData() map[string]any { + return m.additionalData +} + +// GetAuth gets the auth property value. The auth property +func (m *UserInterfaceConfig) GetAuth() UserInterfaceConfigAuthable { + return m.auth +} + +// GetFeatures gets the features property value. The features property +func (m *UserInterfaceConfig) GetFeatures() UserInterfaceConfigFeaturesable { + return m.features +} + +// GetFieldDeserializers the deserialization information for the current model +func (m *UserInterfaceConfig) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) + res["auth"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserInterfaceConfigAuthFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuth(val.(UserInterfaceConfigAuthable)) + } + return nil + } + res["features"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserInterfaceConfigFeaturesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFeatures(val.(UserInterfaceConfigFeaturesable)) + } + return nil + } + res["ui"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserInterfaceConfigUiFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUi(val.(UserInterfaceConfigUiable)) + } + return nil + } + return res +} + +// GetUi gets the ui property value. The ui property +func (m *UserInterfaceConfig) GetUi() UserInterfaceConfigUiable { + return m.ui +} + +// Serialize serializes information the current object +func (m *UserInterfaceConfig) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + { + err := writer.WriteObjectValue("auth", m.GetAuth()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("features", m.GetFeatures()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("ui", m.GetUi()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} + +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UserInterfaceConfig) SetAdditionalData(value map[string]any) { + m.additionalData = value +} + +// SetAuth sets the auth property value. The auth property +func (m *UserInterfaceConfig) SetAuth(value UserInterfaceConfigAuthable) { + m.auth = value +} + +// SetFeatures sets the features property value. The features property +func (m *UserInterfaceConfig) SetFeatures(value UserInterfaceConfigFeaturesable) { + m.features = value +} + +// SetUi sets the ui property value. The ui property +func (m *UserInterfaceConfig) SetUi(value UserInterfaceConfigUiable) { + m.ui = value +} + +// UserInterfaceConfigable +type UserInterfaceConfigable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuth() UserInterfaceConfigAuthable + GetFeatures() UserInterfaceConfigFeaturesable + GetUi() UserInterfaceConfigUiable + SetAuth(value UserInterfaceConfigAuthable) + SetFeatures(value UserInterfaceConfigFeaturesable) + SetUi(value UserInterfaceConfigUiable) +} diff --git a/go-sdk/pkg/registryclient-v3/models/user_interface_config_auth.go b/go-sdk/pkg/registryclient-v3/models/user_interface_config_auth.go new file mode 100644 index 0000000000..9abc74a9b5 --- /dev/null +++ b/go-sdk/pkg/registryclient-v3/models/user_interface_config_auth.go @@ -0,0 +1,177 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserInterfaceConfigAuth +type UserInterfaceConfigAuth struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The obacEnabled property + obacEnabled *bool + // User-defined name-value pairs. Name and value must be strings. + options Propertiesable + // The rbacEnabled property + rbacEnabled *bool + // The type property + typeEscaped *UserInterfaceConfigAuth_type +} + +// NewUserInterfaceConfigAuth instantiates a new UserInterfaceConfigAuth and sets the default values. +func NewUserInterfaceConfigAuth() *UserInterfaceConfigAuth { + m := &UserInterfaceConfigAuth{} + m.SetAdditionalData(make(map[string]any)) + return m +} + +// CreateUserInterfaceConfigAuthFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUserInterfaceConfigAuthFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserInterfaceConfigAuth(), nil +} + +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UserInterfaceConfigAuth) GetAdditionalData() map[string]any { + return m.additionalData +} + +// GetFieldDeserializers the deserialization information for the current model +func (m *UserInterfaceConfigAuth) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) + res["obacEnabled"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetObacEnabled(val) + } + return nil + } + res["options"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePropertiesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOptions(val.(Propertiesable)) + } + return nil + } + res["rbacEnabled"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRbacEnabled(val) + } + return nil + } + res["type"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUserInterfaceConfigAuth_type) + if err != nil { + return err + } + if val != nil { + m.SetTypeEscaped(val.(*UserInterfaceConfigAuth_type)) + } + return nil + } + return res +} + +// GetObacEnabled gets the obacEnabled property value. The obacEnabled property +func (m *UserInterfaceConfigAuth) GetObacEnabled() *bool { + return m.obacEnabled +} + +// GetOptions gets the options property value. User-defined name-value pairs. Name and value must be strings. +func (m *UserInterfaceConfigAuth) GetOptions() Propertiesable { + return m.options +} + +// GetRbacEnabled gets the rbacEnabled property value. The rbacEnabled property +func (m *UserInterfaceConfigAuth) GetRbacEnabled() *bool { + return m.rbacEnabled +} + +// GetTypeEscaped gets the type property value. The type property +func (m *UserInterfaceConfigAuth) GetTypeEscaped() *UserInterfaceConfigAuth_type { + return m.typeEscaped +} + +// Serialize serializes information the current object +func (m *UserInterfaceConfigAuth) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + { + err := writer.WriteBoolValue("obacEnabled", m.GetObacEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("options", m.GetOptions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("rbacEnabled", m.GetRbacEnabled()) + if err != nil { + return err + } + } + if m.GetTypeEscaped() != nil { + cast := (*m.GetTypeEscaped()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} + +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UserInterfaceConfigAuth) SetAdditionalData(value map[string]any) { + m.additionalData = value +} + +// SetObacEnabled sets the obacEnabled property value. The obacEnabled property +func (m *UserInterfaceConfigAuth) SetObacEnabled(value *bool) { + m.obacEnabled = value +} + +// SetOptions sets the options property value. User-defined name-value pairs. Name and value must be strings. +func (m *UserInterfaceConfigAuth) SetOptions(value Propertiesable) { + m.options = value +} + +// SetRbacEnabled sets the rbacEnabled property value. The rbacEnabled property +func (m *UserInterfaceConfigAuth) SetRbacEnabled(value *bool) { + m.rbacEnabled = value +} + +// SetTypeEscaped sets the type property value. The type property +func (m *UserInterfaceConfigAuth) SetTypeEscaped(value *UserInterfaceConfigAuth_type) { + m.typeEscaped = value +} + +// UserInterfaceConfigAuthable +type UserInterfaceConfigAuthable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetObacEnabled() *bool + GetOptions() Propertiesable + GetRbacEnabled() *bool + GetTypeEscaped() *UserInterfaceConfigAuth_type + SetObacEnabled(value *bool) + SetOptions(value Propertiesable) + SetRbacEnabled(value *bool) + SetTypeEscaped(value *UserInterfaceConfigAuth_type) +} diff --git a/go-sdk/pkg/registryclient-v3/models/user_interface_config_auth_type.go b/go-sdk/pkg/registryclient-v3/models/user_interface_config_auth_type.go new file mode 100644 index 0000000000..3822cd5298 --- /dev/null +++ b/go-sdk/pkg/registryclient-v3/models/user_interface_config_auth_type.go @@ -0,0 +1,39 @@ +package models + +import ( + "errors" +) + +// This endpoint is used by the user interface to retrieve UI specific configurationin a JSON payload. This allows the UI and the backend to be configured in the same place (the backend process/pod). When the UI loads, it will make an API callto this endpoint to determine what UI features and options are configured. +type UserInterfaceConfigAuth_type int + +const ( + NONE_USERINTERFACECONFIGAUTH_TYPE UserInterfaceConfigAuth_type = iota + OIDC_USERINTERFACECONFIGAUTH_TYPE +) + +func (i UserInterfaceConfigAuth_type) String() string { + return []string{"none", "oidc"}[i] +} +func ParseUserInterfaceConfigAuth_type(v string) (any, error) { + result := NONE_USERINTERFACECONFIGAUTH_TYPE + switch v { + case "none": + result = NONE_USERINTERFACECONFIGAUTH_TYPE + case "oidc": + result = OIDC_USERINTERFACECONFIGAUTH_TYPE + default: + return 0, errors.New("Unknown UserInterfaceConfigAuth_type value: " + v) + } + return &result, nil +} +func SerializeUserInterfaceConfigAuth_type(values []UserInterfaceConfigAuth_type) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} +func (i UserInterfaceConfigAuth_type) isMultiValue() bool { + return false +} diff --git a/go-sdk/pkg/registryclient-v3/models/user_interface_config_features.go b/go-sdk/pkg/registryclient-v3/models/user_interface_config_features.go new file mode 100644 index 0000000000..d74961466b --- /dev/null +++ b/go-sdk/pkg/registryclient-v3/models/user_interface_config_features.go @@ -0,0 +1,176 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserInterfaceConfigFeatures +type UserInterfaceConfigFeatures struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The breadcrumbs property + breadcrumbs *bool + // The readOnly property + readOnly *bool + // The roleManagement property + roleManagement *bool + // The settings property + settings *bool +} + +// NewUserInterfaceConfigFeatures instantiates a new UserInterfaceConfigFeatures and sets the default values. +func NewUserInterfaceConfigFeatures() *UserInterfaceConfigFeatures { + m := &UserInterfaceConfigFeatures{} + m.SetAdditionalData(make(map[string]any)) + return m +} + +// CreateUserInterfaceConfigFeaturesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUserInterfaceConfigFeaturesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserInterfaceConfigFeatures(), nil +} + +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UserInterfaceConfigFeatures) GetAdditionalData() map[string]any { + return m.additionalData +} + +// GetBreadcrumbs gets the breadcrumbs property value. The breadcrumbs property +func (m *UserInterfaceConfigFeatures) GetBreadcrumbs() *bool { + return m.breadcrumbs +} + +// GetFieldDeserializers the deserialization information for the current model +func (m *UserInterfaceConfigFeatures) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) + res["breadcrumbs"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBreadcrumbs(val) + } + return nil + } + res["readOnly"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetReadOnly(val) + } + return nil + } + res["roleManagement"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleManagement(val) + } + return nil + } + res["settings"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSettings(val) + } + return nil + } + return res +} + +// GetReadOnly gets the readOnly property value. The readOnly property +func (m *UserInterfaceConfigFeatures) GetReadOnly() *bool { + return m.readOnly +} + +// GetRoleManagement gets the roleManagement property value. The roleManagement property +func (m *UserInterfaceConfigFeatures) GetRoleManagement() *bool { + return m.roleManagement +} + +// GetSettings gets the settings property value. The settings property +func (m *UserInterfaceConfigFeatures) GetSettings() *bool { + return m.settings +} + +// Serialize serializes information the current object +func (m *UserInterfaceConfigFeatures) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + { + err := writer.WriteBoolValue("breadcrumbs", m.GetBreadcrumbs()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("readOnly", m.GetReadOnly()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("roleManagement", m.GetRoleManagement()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} + +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UserInterfaceConfigFeatures) SetAdditionalData(value map[string]any) { + m.additionalData = value +} + +// SetBreadcrumbs sets the breadcrumbs property value. The breadcrumbs property +func (m *UserInterfaceConfigFeatures) SetBreadcrumbs(value *bool) { + m.breadcrumbs = value +} + +// SetReadOnly sets the readOnly property value. The readOnly property +func (m *UserInterfaceConfigFeatures) SetReadOnly(value *bool) { + m.readOnly = value +} + +// SetRoleManagement sets the roleManagement property value. The roleManagement property +func (m *UserInterfaceConfigFeatures) SetRoleManagement(value *bool) { + m.roleManagement = value +} + +// SetSettings sets the settings property value. The settings property +func (m *UserInterfaceConfigFeatures) SetSettings(value *bool) { + m.settings = value +} + +// UserInterfaceConfigFeaturesable +type UserInterfaceConfigFeaturesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBreadcrumbs() *bool + GetReadOnly() *bool + GetRoleManagement() *bool + GetSettings() *bool + SetBreadcrumbs(value *bool) + SetReadOnly(value *bool) + SetRoleManagement(value *bool) + SetSettings(value *bool) +} diff --git a/go-sdk/pkg/registryclient-v3/models/user_interface_config_ui.go b/go-sdk/pkg/registryclient-v3/models/user_interface_config_ui.go new file mode 100644 index 0000000000..20eb722b6a --- /dev/null +++ b/go-sdk/pkg/registryclient-v3/models/user_interface_config_ui.go @@ -0,0 +1,146 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserInterfaceConfigUi +type UserInterfaceConfigUi struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]any + // The contextPath property + contextPath *string + // The navPrefixPath property + navPrefixPath *string + // The oaiDocsUrl property + oaiDocsUrl *string +} + +// NewUserInterfaceConfigUi instantiates a new UserInterfaceConfigUi and sets the default values. +func NewUserInterfaceConfigUi() *UserInterfaceConfigUi { + m := &UserInterfaceConfigUi{} + m.SetAdditionalData(make(map[string]any)) + return m +} + +// CreateUserInterfaceConfigUiFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUserInterfaceConfigUiFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserInterfaceConfigUi(), nil +} + +// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UserInterfaceConfigUi) GetAdditionalData() map[string]any { + return m.additionalData +} + +// GetContextPath gets the contextPath property value. The contextPath property +func (m *UserInterfaceConfigUi) GetContextPath() *string { + return m.contextPath +} + +// GetFieldDeserializers the deserialization information for the current model +func (m *UserInterfaceConfigUi) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) + res["contextPath"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContextPath(val) + } + return nil + } + res["navPrefixPath"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNavPrefixPath(val) + } + return nil + } + res["oaiDocsUrl"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOaiDocsUrl(val) + } + return nil + } + return res +} + +// GetNavPrefixPath gets the navPrefixPath property value. The navPrefixPath property +func (m *UserInterfaceConfigUi) GetNavPrefixPath() *string { + return m.navPrefixPath +} + +// GetOaiDocsUrl gets the oaiDocsUrl property value. The oaiDocsUrl property +func (m *UserInterfaceConfigUi) GetOaiDocsUrl() *string { + return m.oaiDocsUrl +} + +// Serialize serializes information the current object +func (m *UserInterfaceConfigUi) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + { + err := writer.WriteStringValue("contextPath", m.GetContextPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("navPrefixPath", m.GetNavPrefixPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("oaiDocsUrl", m.GetOaiDocsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} + +// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UserInterfaceConfigUi) SetAdditionalData(value map[string]any) { + m.additionalData = value +} + +// SetContextPath sets the contextPath property value. The contextPath property +func (m *UserInterfaceConfigUi) SetContextPath(value *string) { + m.contextPath = value +} + +// SetNavPrefixPath sets the navPrefixPath property value. The navPrefixPath property +func (m *UserInterfaceConfigUi) SetNavPrefixPath(value *string) { + m.navPrefixPath = value +} + +// SetOaiDocsUrl sets the oaiDocsUrl property value. The oaiDocsUrl property +func (m *UserInterfaceConfigUi) SetOaiDocsUrl(value *string) { + m.oaiDocsUrl = value +} + +// UserInterfaceConfigUiable +type UserInterfaceConfigUiable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContextPath() *string + GetNavPrefixPath() *string + GetOaiDocsUrl() *string + SetContextPath(value *string) + SetNavPrefixPath(value *string) + SetOaiDocsUrl(value *string) +} diff --git a/go-sdk/pkg/registryclient-v3/system/system_request_builder.go b/go-sdk/pkg/registryclient-v3/system/system_request_builder.go index 2181558170..32f00dab79 100644 --- a/go-sdk/pkg/registryclient-v3/system/system_request_builder.go +++ b/go-sdk/pkg/registryclient-v3/system/system_request_builder.go @@ -33,3 +33,8 @@ func (m *SystemRequestBuilder) Info() *InfoRequestBuilder { func (m *SystemRequestBuilder) Limits() *LimitsRequestBuilder { return NewLimitsRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) } + +// UiConfig this endpoint is used by the user interface to retrieve UI specific configurationin a JSON payload. This allows the UI and the backend to be configured in the same place (the backend process/pod). When the UI loads, it will make an API callto this endpoint to determine what UI features and options are configured. +func (m *SystemRequestBuilder) UiConfig() *UiConfigRequestBuilder { + return NewUiConfigRequestBuilderInternal(m.BaseRequestBuilder.PathParameters, m.BaseRequestBuilder.RequestAdapter) +} diff --git a/go-sdk/pkg/registryclient-v3/system/ui_config_request_builder.go b/go-sdk/pkg/registryclient-v3/system/ui_config_request_builder.go new file mode 100644 index 0000000000..f5cbfe1161 --- /dev/null +++ b/go-sdk/pkg/registryclient-v3/system/ui_config_request_builder.go @@ -0,0 +1,70 @@ +package system + +import ( + "context" + i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71 "github.com/apicurio/apicurio-registry/go-sdk/pkg/registryclient-v3/models" + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" +) + +// UiConfigRequestBuilder this endpoint is used by the user interface to retrieve UI specific configurationin a JSON payload. This allows the UI and the backend to be configured in the same place (the backend process/pod). When the UI loads, it will make an API callto this endpoint to determine what UI features and options are configured. +type UiConfigRequestBuilder struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder +} + +// UiConfigRequestBuilderGetRequestConfiguration configuration for the request such as headers, query parameters, and middleware options. +type UiConfigRequestBuilderGetRequestConfiguration struct { + // Request headers + Headers *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestHeaders + // Request options + Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption +} + +// NewUiConfigRequestBuilderInternal instantiates a new UiConfigRequestBuilder and sets the default values. +func NewUiConfigRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *UiConfigRequestBuilder { + m := &UiConfigRequestBuilder{ + BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/system/uiConfig", pathParameters), + } + return m +} + +// NewUiConfigRequestBuilder instantiates a new UiConfigRequestBuilder and sets the default values. +func NewUiConfigRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *UiConfigRequestBuilder { + urlParams := make(map[string]string) + urlParams["request-raw-url"] = rawUrl + return NewUiConfigRequestBuilderInternal(urlParams, requestAdapter) +} + +// Get returns the UI configuration properties for this server. The registry UI can beconnected to a backend using just a URL. The rest of the UI configuration can thenbe fetched from the backend using this operation. This allows UI and backend toboth be configured in the same place.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +func (m *UiConfigRequestBuilder) Get(ctx context.Context, requestConfiguration *UiConfigRequestBuilderGetRequestConfiguration) (i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.UserInterfaceConfigable, error) { + requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration) + if err != nil { + return nil, err + } + errorMapping := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ErrorMappings{ + "500": i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateErrorFromDiscriminatorValue, + } + res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.CreateUserInterfaceConfigFromDiscriminatorValue, errorMapping) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return res.(i00eb2e63d156923d00d8e86fe16b5d74daf30e363c9f185a8165cb42aa2f2c71.UserInterfaceConfigable), nil +} + +// ToGetRequestInformation returns the UI configuration properties for this server. The registry UI can beconnected to a backend using just a URL. The rest of the UI configuration can thenbe fetched from the backend using this operation. This allows UI and backend toboth be configured in the same place.This operation may fail for one of the following reasons:* A server error occurred (HTTP error `500`) +func (m *UiConfigRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *UiConfigRequestBuilderGetRequestConfiguration) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { + requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) + if requestConfiguration != nil { + requestInfo.Headers.AddAll(requestConfiguration.Headers) + requestInfo.AddRequestOptions(requestConfiguration.Options) + } + requestInfo.Headers.TryAdd("Accept", "application/json") + return requestInfo, nil +} + +// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. +func (m *UiConfigRequestBuilder) WithUrl(rawUrl string) *UiConfigRequestBuilder { + return NewUiConfigRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter) +}