From b5b457639338369e5e165788b2781b7e3493bd07 Mon Sep 17 00:00:00 2001 From: ashmrtn Date: Tue, 31 Jan 2023 17:25:27 -0800 Subject: [PATCH] Run gofmt on beta package (#2340) ## Description This package is mostly generated code, but since it's not formatted and check in it causes subsequent runs of gofmt to format it and add chaff to git diff. Checking in the formatted version removes the chaff. ## Does this PR need a docs update or release note? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [x] :no_entry: No ## Type of change - [ ] :sunflower: Feature - [ ] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Test - [ ] :computer: CI/Deployment - [x] :broom: Tech Debt/Cleanup --- .../models/horizontal_section_layout_type.go | 76 ++--- .../models/meta_data_key_string_pair.go | 195 ++++++------ .../models/meta_data_key_string_pairable.go | 20 +- .../graph/betasdk/models/page_layout_type.go | 52 ++-- .../betasdk/models/page_promotion_type.go | 52 ++-- .../graph/betasdk/models/publication_facet.go | 195 ++++++------ .../betasdk/models/publication_facetable.go | 20 +- .../graph/betasdk/models/reactions_facet.go | 241 ++++++++------- .../betasdk/models/reactions_facetable.go | 24 +- .../betasdk/models/section_emphasis_type.go | 58 ++-- .../graph/betasdk/models/site_access_type.go | 46 +-- .../betasdk/models/site_security_level.go | 76 ++--- .../graph/betasdk/models/site_settings.go | 195 ++++++------ .../graph/betasdk/models/site_settingsable.go | 20 +- .../graph/betasdk/models/standard_web_part.go | 138 +++++---- .../betasdk/models/standard_web_partable.go | 16 +- .../graph/betasdk/models/text_web_part.go | 92 +++--- .../graph/betasdk/models/text_web_partable.go | 12 +- .../betasdk/models/title_area_layout_type.go | 58 ++-- .../models/title_area_text_alignment_type.go | 46 +-- .../graph/betasdk/models/web_part_position.go | 287 +++++++++--------- .../betasdk/models/web_part_positionable.go | 28 +- 22 files changed, 1019 insertions(+), 928 deletions(-) diff --git a/src/internal/connector/graph/betasdk/models/horizontal_section_layout_type.go b/src/internal/connector/graph/betasdk/models/horizontal_section_layout_type.go index 43c2643a2..80e208ffe 100644 --- a/src/internal/connector/graph/betasdk/models/horizontal_section_layout_type.go +++ b/src/internal/connector/graph/betasdk/models/horizontal_section_layout_type.go @@ -1,52 +1,54 @@ package models + import ( - "errors" + "errors" ) + // Provides operations to call the remove method. type HorizontalSectionLayoutType int const ( - NONE_HORIZONTALSECTIONLAYOUTTYPE HorizontalSectionLayoutType = iota - ONECOLUMN_HORIZONTALSECTIONLAYOUTTYPE - TWOCOLUMNS_HORIZONTALSECTIONLAYOUTTYPE - THREECOLUMNS_HORIZONTALSECTIONLAYOUTTYPE - ONETHIRDLEFTCOLUMN_HORIZONTALSECTIONLAYOUTTYPE - ONETHIRDRIGHTCOLUMN_HORIZONTALSECTIONLAYOUTTYPE - FULLWIDTH_HORIZONTALSECTIONLAYOUTTYPE - UNKNOWNFUTUREVALUE_HORIZONTALSECTIONLAYOUTTYPE + NONE_HORIZONTALSECTIONLAYOUTTYPE HorizontalSectionLayoutType = iota + ONECOLUMN_HORIZONTALSECTIONLAYOUTTYPE + TWOCOLUMNS_HORIZONTALSECTIONLAYOUTTYPE + THREECOLUMNS_HORIZONTALSECTIONLAYOUTTYPE + ONETHIRDLEFTCOLUMN_HORIZONTALSECTIONLAYOUTTYPE + ONETHIRDRIGHTCOLUMN_HORIZONTALSECTIONLAYOUTTYPE + FULLWIDTH_HORIZONTALSECTIONLAYOUTTYPE + UNKNOWNFUTUREVALUE_HORIZONTALSECTIONLAYOUTTYPE ) func (i HorizontalSectionLayoutType) String() string { - return []string{"none", "oneColumn", "twoColumns", "threeColumns", "oneThirdLeftColumn", "oneThirdRightColumn", "fullWidth", "unknownFutureValue"}[i] + return []string{"none", "oneColumn", "twoColumns", "threeColumns", "oneThirdLeftColumn", "oneThirdRightColumn", "fullWidth", "unknownFutureValue"}[i] } func ParseHorizontalSectionLayoutType(v string) (interface{}, error) { - result := NONE_HORIZONTALSECTIONLAYOUTTYPE - switch v { - case "none": - result = NONE_HORIZONTALSECTIONLAYOUTTYPE - case "oneColumn": - result = ONECOLUMN_HORIZONTALSECTIONLAYOUTTYPE - case "twoColumns": - result = TWOCOLUMNS_HORIZONTALSECTIONLAYOUTTYPE - case "threeColumns": - result = THREECOLUMNS_HORIZONTALSECTIONLAYOUTTYPE - case "oneThirdLeftColumn": - result = ONETHIRDLEFTCOLUMN_HORIZONTALSECTIONLAYOUTTYPE - case "oneThirdRightColumn": - result = ONETHIRDRIGHTCOLUMN_HORIZONTALSECTIONLAYOUTTYPE - case "fullWidth": - result = FULLWIDTH_HORIZONTALSECTIONLAYOUTTYPE - case "unknownFutureValue": - result = UNKNOWNFUTUREVALUE_HORIZONTALSECTIONLAYOUTTYPE - default: - return 0, errors.New("Unknown HorizontalSectionLayoutType value: " + v) - } - return &result, nil + result := NONE_HORIZONTALSECTIONLAYOUTTYPE + switch v { + case "none": + result = NONE_HORIZONTALSECTIONLAYOUTTYPE + case "oneColumn": + result = ONECOLUMN_HORIZONTALSECTIONLAYOUTTYPE + case "twoColumns": + result = TWOCOLUMNS_HORIZONTALSECTIONLAYOUTTYPE + case "threeColumns": + result = THREECOLUMNS_HORIZONTALSECTIONLAYOUTTYPE + case "oneThirdLeftColumn": + result = ONETHIRDLEFTCOLUMN_HORIZONTALSECTIONLAYOUTTYPE + case "oneThirdRightColumn": + result = ONETHIRDRIGHTCOLUMN_HORIZONTALSECTIONLAYOUTTYPE + case "fullWidth": + result = FULLWIDTH_HORIZONTALSECTIONLAYOUTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_HORIZONTALSECTIONLAYOUTTYPE + default: + return 0, errors.New("Unknown HorizontalSectionLayoutType value: " + v) + } + return &result, nil } func SerializeHorizontalSectionLayoutType(values []HorizontalSectionLayoutType) []string { - result := make([]string, len(values)) - for i, v := range values { - result[i] = v.String() - } - return result + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result } diff --git a/src/internal/connector/graph/betasdk/models/meta_data_key_string_pair.go b/src/internal/connector/graph/betasdk/models/meta_data_key_string_pair.go index e7df06165..c79f17cfb 100644 --- a/src/internal/connector/graph/betasdk/models/meta_data_key_string_pair.go +++ b/src/internal/connector/graph/betasdk/models/meta_data_key_string_pair.go @@ -1,123 +1,134 @@ package models import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// MetaDataKeyStringPair +// MetaDataKeyStringPair type MetaDataKeyStringPair struct { - // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additionalData map[string]interface{} - // Key of the meta data. - key *string - // The OdataType property - odataType *string - // Value of the meta data. - value *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Key of the meta data. + key *string + // The OdataType property + odataType *string + // Value of the meta data. + value *string } + // NewMetaDataKeyStringPair instantiates a new metaDataKeyStringPair and sets the default values. -func NewMetaDataKeyStringPair()(*MetaDataKeyStringPair) { - m := &MetaDataKeyStringPair{ - } - m.SetAdditionalData(make(map[string]interface{})); - return m +func NewMetaDataKeyStringPair() *MetaDataKeyStringPair { + m := &MetaDataKeyStringPair{} + m.SetAdditionalData(make(map[string]interface{})) + return m } + // CreateMetaDataKeyStringPairFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateMetaDataKeyStringPairFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewMetaDataKeyStringPair(), nil +func CreateMetaDataKeyStringPairFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMetaDataKeyStringPair(), 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 *MetaDataKeyStringPair) GetAdditionalData()(map[string]interface{}) { - return m.additionalData +func (m *MetaDataKeyStringPair) GetAdditionalData() map[string]interface{} { + return m.additionalData } + // GetFieldDeserializers the deserialization information for the current model -func (m *MetaDataKeyStringPair) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetKey(val) - } - return nil - } - res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetOdataType(val) - } - return nil - } - res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetValue(val) - } - return nil - } - return res +func (m *MetaDataKeyStringPair) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) + res["key"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["@odata.type"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataType(val) + } + return nil + } + res["value"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res } + // GetKey gets the key property value. Key of the meta data. -func (m *MetaDataKeyStringPair) GetKey()(*string) { - return m.key +func (m *MetaDataKeyStringPair) GetKey() *string { + return m.key } + // GetOdataType gets the @odata.type property value. The OdataType property -func (m *MetaDataKeyStringPair) GetOdataType()(*string) { - return m.odataType +func (m *MetaDataKeyStringPair) GetOdataType() *string { + return m.odataType } + // GetValue gets the value property value. Value of the meta data. -func (m *MetaDataKeyStringPair) GetValue()(*string) { - return m.value +func (m *MetaDataKeyStringPair) GetValue() *string { + return m.value } + // Serialize serializes information the current object -func (m *MetaDataKeyStringPair) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("key", m.GetKey()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("@odata.type", m.GetOdataType()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("value", m.GetValue()) - if err != nil { - return err - } - } - { - err := writer.WriteAdditionalData(m.GetAdditionalData()) - if err != nil { - return err - } - } - return nil +func (m *MetaDataKeyStringPair) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + { + err := writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + 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 *MetaDataKeyStringPair) SetAdditionalData(value map[string]interface{})() { - m.additionalData = value +func (m *MetaDataKeyStringPair) SetAdditionalData(value map[string]interface{}) { + m.additionalData = value } + // SetKey sets the key property value. Key of the meta data. -func (m *MetaDataKeyStringPair) SetKey(value *string)() { - m.key = value +func (m *MetaDataKeyStringPair) SetKey(value *string) { + m.key = value } + // SetOdataType sets the @odata.type property value. The OdataType property -func (m *MetaDataKeyStringPair) SetOdataType(value *string)() { - m.odataType = value +func (m *MetaDataKeyStringPair) SetOdataType(value *string) { + m.odataType = value } + // SetValue sets the value property value. Value of the meta data. -func (m *MetaDataKeyStringPair) SetValue(value *string)() { - m.value = value +func (m *MetaDataKeyStringPair) SetValue(value *string) { + m.value = value } diff --git a/src/internal/connector/graph/betasdk/models/meta_data_key_string_pairable.go b/src/internal/connector/graph/betasdk/models/meta_data_key_string_pairable.go index 49908469e..4168f4dce 100644 --- a/src/internal/connector/graph/betasdk/models/meta_data_key_string_pairable.go +++ b/src/internal/connector/graph/betasdk/models/meta_data_key_string_pairable.go @@ -1,17 +1,17 @@ package models import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// MetaDataKeyStringPairable +// MetaDataKeyStringPairable type MetaDataKeyStringPairable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetKey()(*string) - GetOdataType()(*string) - GetValue()(*string) - SetKey(value *string)() - SetOdataType(value *string)() - SetValue(value *string)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKey() *string + GetOdataType() *string + GetValue() *string + SetKey(value *string) + SetOdataType(value *string) + SetValue(value *string) } diff --git a/src/internal/connector/graph/betasdk/models/page_layout_type.go b/src/internal/connector/graph/betasdk/models/page_layout_type.go index 0338a5c30..fce795760 100644 --- a/src/internal/connector/graph/betasdk/models/page_layout_type.go +++ b/src/internal/connector/graph/betasdk/models/page_layout_type.go @@ -1,40 +1,42 @@ package models + import ( - "errors" + "errors" ) + // Provides operations to call the remove method. type PageLayoutType int const ( - MICROSOFTRESERVED_PAGELAYOUTTYPE PageLayoutType = iota - ARTICLE_PAGELAYOUTTYPE - HOME_PAGELAYOUTTYPE - UNKNOWNFUTUREVALUE_PAGELAYOUTTYPE + MICROSOFTRESERVED_PAGELAYOUTTYPE PageLayoutType = iota + ARTICLE_PAGELAYOUTTYPE + HOME_PAGELAYOUTTYPE + UNKNOWNFUTUREVALUE_PAGELAYOUTTYPE ) func (i PageLayoutType) String() string { - return []string{"microsoftReserved", "article", "home", "unknownFutureValue"}[i] + return []string{"microsoftReserved", "article", "home", "unknownFutureValue"}[i] } func ParsePageLayoutType(v string) (interface{}, error) { - result := MICROSOFTRESERVED_PAGELAYOUTTYPE - switch v { - case "microsoftReserved": - result = MICROSOFTRESERVED_PAGELAYOUTTYPE - case "article": - result = ARTICLE_PAGELAYOUTTYPE - case "home": - result = HOME_PAGELAYOUTTYPE - case "unknownFutureValue": - result = UNKNOWNFUTUREVALUE_PAGELAYOUTTYPE - default: - return 0, errors.New("Unknown PageLayoutType value: " + v) - } - return &result, nil + result := MICROSOFTRESERVED_PAGELAYOUTTYPE + switch v { + case "microsoftReserved": + result = MICROSOFTRESERVED_PAGELAYOUTTYPE + case "article": + result = ARTICLE_PAGELAYOUTTYPE + case "home": + result = HOME_PAGELAYOUTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PAGELAYOUTTYPE + default: + return 0, errors.New("Unknown PageLayoutType value: " + v) + } + return &result, nil } func SerializePageLayoutType(values []PageLayoutType) []string { - result := make([]string, len(values)) - for i, v := range values { - result[i] = v.String() - } - return result + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result } diff --git a/src/internal/connector/graph/betasdk/models/page_promotion_type.go b/src/internal/connector/graph/betasdk/models/page_promotion_type.go index a8cbcd058..e78ce63f0 100644 --- a/src/internal/connector/graph/betasdk/models/page_promotion_type.go +++ b/src/internal/connector/graph/betasdk/models/page_promotion_type.go @@ -1,40 +1,42 @@ package models + import ( - "errors" + "errors" ) + // Provides operations to call the remove method. type PagePromotionType int const ( - MICROSOFTRESERVED_PAGEPROMOTIONTYPE PagePromotionType = iota - PAGE_PAGEPROMOTIONTYPE - NEWSPOST_PAGEPROMOTIONTYPE - UNKNOWNFUTUREVALUE_PAGEPROMOTIONTYPE + MICROSOFTRESERVED_PAGEPROMOTIONTYPE PagePromotionType = iota + PAGE_PAGEPROMOTIONTYPE + NEWSPOST_PAGEPROMOTIONTYPE + UNKNOWNFUTUREVALUE_PAGEPROMOTIONTYPE ) func (i PagePromotionType) String() string { - return []string{"microsoftReserved", "page", "newsPost", "unknownFutureValue"}[i] + return []string{"microsoftReserved", "page", "newsPost", "unknownFutureValue"}[i] } func ParsePagePromotionType(v string) (interface{}, error) { - result := MICROSOFTRESERVED_PAGEPROMOTIONTYPE - switch v { - case "microsoftReserved": - result = MICROSOFTRESERVED_PAGEPROMOTIONTYPE - case "page": - result = PAGE_PAGEPROMOTIONTYPE - case "newsPost": - result = NEWSPOST_PAGEPROMOTIONTYPE - case "unknownFutureValue": - result = UNKNOWNFUTUREVALUE_PAGEPROMOTIONTYPE - default: - return 0, errors.New("Unknown PagePromotionType value: " + v) - } - return &result, nil + result := MICROSOFTRESERVED_PAGEPROMOTIONTYPE + switch v { + case "microsoftReserved": + result = MICROSOFTRESERVED_PAGEPROMOTIONTYPE + case "page": + result = PAGE_PAGEPROMOTIONTYPE + case "newsPost": + result = NEWSPOST_PAGEPROMOTIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PAGEPROMOTIONTYPE + default: + return 0, errors.New("Unknown PagePromotionType value: " + v) + } + return &result, nil } func SerializePagePromotionType(values []PagePromotionType) []string { - result := make([]string, len(values)) - for i, v := range values { - result[i] = v.String() - } - return result + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result } diff --git a/src/internal/connector/graph/betasdk/models/publication_facet.go b/src/internal/connector/graph/betasdk/models/publication_facet.go index 87e59d34b..860b88bf3 100644 --- a/src/internal/connector/graph/betasdk/models/publication_facet.go +++ b/src/internal/connector/graph/betasdk/models/publication_facet.go @@ -1,123 +1,134 @@ package models import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// PublicationFacet +// PublicationFacet type PublicationFacet struct { - // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additionalData map[string]interface{} - // The state of publication for this document. Either published or checkout. Read-only. - level *string - // The OdataType property - odataType *string - // The unique identifier for the version that is visible to the current caller. Read-only. - versionId *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The state of publication for this document. Either published or checkout. Read-only. + level *string + // The OdataType property + odataType *string + // The unique identifier for the version that is visible to the current caller. Read-only. + versionId *string } + // NewPublicationFacet instantiates a new publicationFacet and sets the default values. -func NewPublicationFacet()(*PublicationFacet) { - m := &PublicationFacet{ - } - m.SetAdditionalData(make(map[string]interface{})); - return m +func NewPublicationFacet() *PublicationFacet { + m := &PublicationFacet{} + m.SetAdditionalData(make(map[string]interface{})) + return m } + // CreatePublicationFacetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreatePublicationFacetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewPublicationFacet(), nil +func CreatePublicationFacetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPublicationFacet(), 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 *PublicationFacet) GetAdditionalData()(map[string]interface{}) { - return m.additionalData +func (m *PublicationFacet) GetAdditionalData() map[string]interface{} { + return m.additionalData } + // GetFieldDeserializers the deserialization information for the current model -func (m *PublicationFacet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["level"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetLevel(val) - } - return nil - } - res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetOdataType(val) - } - return nil - } - res["versionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetVersionId(val) - } - return nil - } - return res +func (m *PublicationFacet) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) + res["level"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLevel(val) + } + return nil + } + res["@odata.type"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataType(val) + } + return nil + } + res["versionId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersionId(val) + } + return nil + } + return res } + // GetLevel gets the level property value. The state of publication for this document. Either published or checkout. Read-only. -func (m *PublicationFacet) GetLevel()(*string) { - return m.level +func (m *PublicationFacet) GetLevel() *string { + return m.level } + // GetOdataType gets the @odata.type property value. The OdataType property -func (m *PublicationFacet) GetOdataType()(*string) { - return m.odataType +func (m *PublicationFacet) GetOdataType() *string { + return m.odataType } + // GetVersionId gets the versionId property value. The unique identifier for the version that is visible to the current caller. Read-only. -func (m *PublicationFacet) GetVersionId()(*string) { - return m.versionId +func (m *PublicationFacet) GetVersionId() *string { + return m.versionId } + // Serialize serializes information the current object -func (m *PublicationFacet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("level", m.GetLevel()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("@odata.type", m.GetOdataType()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("versionId", m.GetVersionId()) - if err != nil { - return err - } - } - { - err := writer.WriteAdditionalData(m.GetAdditionalData()) - if err != nil { - return err - } - } - return nil +func (m *PublicationFacet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + { + err := writer.WriteStringValue("level", m.GetLevel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("versionId", m.GetVersionId()) + 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 *PublicationFacet) SetAdditionalData(value map[string]interface{})() { - m.additionalData = value +func (m *PublicationFacet) SetAdditionalData(value map[string]interface{}) { + m.additionalData = value } + // SetLevel sets the level property value. The state of publication for this document. Either published or checkout. Read-only. -func (m *PublicationFacet) SetLevel(value *string)() { - m.level = value +func (m *PublicationFacet) SetLevel(value *string) { + m.level = value } + // SetOdataType sets the @odata.type property value. The OdataType property -func (m *PublicationFacet) SetOdataType(value *string)() { - m.odataType = value +func (m *PublicationFacet) SetOdataType(value *string) { + m.odataType = value } + // SetVersionId sets the versionId property value. The unique identifier for the version that is visible to the current caller. Read-only. -func (m *PublicationFacet) SetVersionId(value *string)() { - m.versionId = value +func (m *PublicationFacet) SetVersionId(value *string) { + m.versionId = value } diff --git a/src/internal/connector/graph/betasdk/models/publication_facetable.go b/src/internal/connector/graph/betasdk/models/publication_facetable.go index 20d82ccf8..4098c89b1 100644 --- a/src/internal/connector/graph/betasdk/models/publication_facetable.go +++ b/src/internal/connector/graph/betasdk/models/publication_facetable.go @@ -1,17 +1,17 @@ package models import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// PublicationFacetable +// PublicationFacetable type PublicationFacetable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetLevel()(*string) - GetOdataType()(*string) - GetVersionId()(*string) - SetLevel(value *string)() - SetOdataType(value *string)() - SetVersionId(value *string)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLevel() *string + GetOdataType() *string + GetVersionId() *string + SetLevel(value *string) + SetOdataType(value *string) + SetVersionId(value *string) } diff --git a/src/internal/connector/graph/betasdk/models/reactions_facet.go b/src/internal/connector/graph/betasdk/models/reactions_facet.go index b298a9fe1..c971925dc 100644 --- a/src/internal/connector/graph/betasdk/models/reactions_facet.go +++ b/src/internal/connector/graph/betasdk/models/reactions_facet.go @@ -1,149 +1,162 @@ package models import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// ReactionsFacet +// ReactionsFacet type ReactionsFacet struct { - // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additionalData map[string]interface{} - // Count of comments. - commentCount *int32 - // Count of likes. - likeCount *int32 - // The OdataType property - odataType *string - // Count of shares. - shareCount *int32 + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Count of comments. + commentCount *int32 + // Count of likes. + likeCount *int32 + // The OdataType property + odataType *string + // Count of shares. + shareCount *int32 } + // NewReactionsFacet instantiates a new reactionsFacet and sets the default values. -func NewReactionsFacet()(*ReactionsFacet) { - m := &ReactionsFacet{ - } - m.SetAdditionalData(make(map[string]interface{})); - return m +func NewReactionsFacet() *ReactionsFacet { + m := &ReactionsFacet{} + m.SetAdditionalData(make(map[string]interface{})) + return m } + // CreateReactionsFacetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateReactionsFacetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewReactionsFacet(), nil +func CreateReactionsFacetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReactionsFacet(), 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 *ReactionsFacet) GetAdditionalData()(map[string]interface{}) { - return m.additionalData +func (m *ReactionsFacet) GetAdditionalData() map[string]interface{} { + return m.additionalData } + // GetCommentCount gets the commentCount property value. Count of comments. -func (m *ReactionsFacet) GetCommentCount()(*int32) { - return m.commentCount +func (m *ReactionsFacet) GetCommentCount() *int32 { + return m.commentCount } + // GetFieldDeserializers the deserialization information for the current model -func (m *ReactionsFacet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["commentCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetCommentCount(val) - } - return nil - } - res["likeCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetLikeCount(val) - } - return nil - } - res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetOdataType(val) - } - return nil - } - res["shareCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetInt32Value() - if err != nil { - return err - } - if val != nil { - m.SetShareCount(val) - } - return nil - } - return res +func (m *ReactionsFacet) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) + res["commentCount"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCommentCount(val) + } + return nil + } + res["likeCount"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLikeCount(val) + } + return nil + } + res["@odata.type"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataType(val) + } + return nil + } + res["shareCount"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetShareCount(val) + } + return nil + } + return res } + // GetLikeCount gets the likeCount property value. Count of likes. -func (m *ReactionsFacet) GetLikeCount()(*int32) { - return m.likeCount +func (m *ReactionsFacet) GetLikeCount() *int32 { + return m.likeCount } + // GetOdataType gets the @odata.type property value. The OdataType property -func (m *ReactionsFacet) GetOdataType()(*string) { - return m.odataType +func (m *ReactionsFacet) GetOdataType() *string { + return m.odataType } + // GetShareCount gets the shareCount property value. Count of shares. -func (m *ReactionsFacet) GetShareCount()(*int32) { - return m.shareCount +func (m *ReactionsFacet) GetShareCount() *int32 { + return m.shareCount } + // Serialize serializes information the current object -func (m *ReactionsFacet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteInt32Value("commentCount", m.GetCommentCount()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("likeCount", m.GetLikeCount()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("@odata.type", m.GetOdataType()) - if err != nil { - return err - } - } - { - err := writer.WriteInt32Value("shareCount", m.GetShareCount()) - if err != nil { - return err - } - } - { - err := writer.WriteAdditionalData(m.GetAdditionalData()) - if err != nil { - return err - } - } - return nil +func (m *ReactionsFacet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + { + err := writer.WriteInt32Value("commentCount", m.GetCommentCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("likeCount", m.GetLikeCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("shareCount", m.GetShareCount()) + 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 *ReactionsFacet) SetAdditionalData(value map[string]interface{})() { - m.additionalData = value +func (m *ReactionsFacet) SetAdditionalData(value map[string]interface{}) { + m.additionalData = value } + // SetCommentCount sets the commentCount property value. Count of comments. -func (m *ReactionsFacet) SetCommentCount(value *int32)() { - m.commentCount = value +func (m *ReactionsFacet) SetCommentCount(value *int32) { + m.commentCount = value } + // SetLikeCount sets the likeCount property value. Count of likes. -func (m *ReactionsFacet) SetLikeCount(value *int32)() { - m.likeCount = value +func (m *ReactionsFacet) SetLikeCount(value *int32) { + m.likeCount = value } + // SetOdataType sets the @odata.type property value. The OdataType property -func (m *ReactionsFacet) SetOdataType(value *string)() { - m.odataType = value +func (m *ReactionsFacet) SetOdataType(value *string) { + m.odataType = value } + // SetShareCount sets the shareCount property value. Count of shares. -func (m *ReactionsFacet) SetShareCount(value *int32)() { - m.shareCount = value +func (m *ReactionsFacet) SetShareCount(value *int32) { + m.shareCount = value } diff --git a/src/internal/connector/graph/betasdk/models/reactions_facetable.go b/src/internal/connector/graph/betasdk/models/reactions_facetable.go index 4e5086047..acdefec37 100644 --- a/src/internal/connector/graph/betasdk/models/reactions_facetable.go +++ b/src/internal/connector/graph/betasdk/models/reactions_facetable.go @@ -1,19 +1,19 @@ package models import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// ReactionsFacetable +// ReactionsFacetable type ReactionsFacetable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetCommentCount()(*int32) - GetLikeCount()(*int32) - GetOdataType()(*string) - GetShareCount()(*int32) - SetCommentCount(value *int32)() - SetLikeCount(value *int32)() - SetOdataType(value *string)() - SetShareCount(value *int32)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCommentCount() *int32 + GetLikeCount() *int32 + GetOdataType() *string + GetShareCount() *int32 + SetCommentCount(value *int32) + SetLikeCount(value *int32) + SetOdataType(value *string) + SetShareCount(value *int32) } diff --git a/src/internal/connector/graph/betasdk/models/section_emphasis_type.go b/src/internal/connector/graph/betasdk/models/section_emphasis_type.go index 0016aec10..301ae839f 100644 --- a/src/internal/connector/graph/betasdk/models/section_emphasis_type.go +++ b/src/internal/connector/graph/betasdk/models/section_emphasis_type.go @@ -1,43 +1,45 @@ package models + import ( - "errors" + "errors" ) + // Provides operations to call the remove method. type SectionEmphasisType int const ( - NONE_SECTIONEMPHASISTYPE SectionEmphasisType = iota - NEUTRAL_SECTIONEMPHASISTYPE - SOFT_SECTIONEMPHASISTYPE - STRONG_SECTIONEMPHASISTYPE - UNKNOWNFUTUREVALUE_SECTIONEMPHASISTYPE + NONE_SECTIONEMPHASISTYPE SectionEmphasisType = iota + NEUTRAL_SECTIONEMPHASISTYPE + SOFT_SECTIONEMPHASISTYPE + STRONG_SECTIONEMPHASISTYPE + UNKNOWNFUTUREVALUE_SECTIONEMPHASISTYPE ) func (i SectionEmphasisType) String() string { - return []string{"none", "neutral", "soft", "strong", "unknownFutureValue"}[i] + return []string{"none", "neutral", "soft", "strong", "unknownFutureValue"}[i] } func ParseSectionEmphasisType(v string) (interface{}, error) { - result := NONE_SECTIONEMPHASISTYPE - switch v { - case "none": - result = NONE_SECTIONEMPHASISTYPE - case "neutral": - result = NEUTRAL_SECTIONEMPHASISTYPE - case "soft": - result = SOFT_SECTIONEMPHASISTYPE - case "strong": - result = STRONG_SECTIONEMPHASISTYPE - case "unknownFutureValue": - result = UNKNOWNFUTUREVALUE_SECTIONEMPHASISTYPE - default: - return 0, errors.New("Unknown SectionEmphasisType value: " + v) - } - return &result, nil + result := NONE_SECTIONEMPHASISTYPE + switch v { + case "none": + result = NONE_SECTIONEMPHASISTYPE + case "neutral": + result = NEUTRAL_SECTIONEMPHASISTYPE + case "soft": + result = SOFT_SECTIONEMPHASISTYPE + case "strong": + result = STRONG_SECTIONEMPHASISTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SECTIONEMPHASISTYPE + default: + return 0, errors.New("Unknown SectionEmphasisType value: " + v) + } + return &result, nil } func SerializeSectionEmphasisType(values []SectionEmphasisType) []string { - result := make([]string, len(values)) - for i, v := range values { - result[i] = v.String() - } - return result + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result } diff --git a/src/internal/connector/graph/betasdk/models/site_access_type.go b/src/internal/connector/graph/betasdk/models/site_access_type.go index 052a2efdb..2d4cedffe 100644 --- a/src/internal/connector/graph/betasdk/models/site_access_type.go +++ b/src/internal/connector/graph/betasdk/models/site_access_type.go @@ -1,37 +1,39 @@ package models + import ( - "errors" + "errors" ) + // Provides operations to call the remove method. type SiteAccessType int const ( - BLOCK_SITEACCESSTYPE SiteAccessType = iota - FULL_SITEACCESSTYPE - LIMITED_SITEACCESSTYPE + BLOCK_SITEACCESSTYPE SiteAccessType = iota + FULL_SITEACCESSTYPE + LIMITED_SITEACCESSTYPE ) func (i SiteAccessType) String() string { - return []string{"block", "full", "limited"}[i] + return []string{"block", "full", "limited"}[i] } func ParseSiteAccessType(v string) (interface{}, error) { - result := BLOCK_SITEACCESSTYPE - switch v { - case "block": - result = BLOCK_SITEACCESSTYPE - case "full": - result = FULL_SITEACCESSTYPE - case "limited": - result = LIMITED_SITEACCESSTYPE - default: - return 0, errors.New("Unknown SiteAccessType value: " + v) - } - return &result, nil + result := BLOCK_SITEACCESSTYPE + switch v { + case "block": + result = BLOCK_SITEACCESSTYPE + case "full": + result = FULL_SITEACCESSTYPE + case "limited": + result = LIMITED_SITEACCESSTYPE + default: + return 0, errors.New("Unknown SiteAccessType value: " + v) + } + return &result, nil } func SerializeSiteAccessType(values []SiteAccessType) []string { - result := make([]string, len(values)) - for i, v := range values { - result[i] = v.String() - } - return result + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result } diff --git a/src/internal/connector/graph/betasdk/models/site_security_level.go b/src/internal/connector/graph/betasdk/models/site_security_level.go index d2733ce47..0c75c164e 100644 --- a/src/internal/connector/graph/betasdk/models/site_security_level.go +++ b/src/internal/connector/graph/betasdk/models/site_security_level.go @@ -1,52 +1,54 @@ package models + import ( - "errors" + "errors" ) + // Provides operations to call the add method. type SiteSecurityLevel int const ( - // User Defined, default value, no intent. - USERDEFINED_SITESECURITYLEVEL SiteSecurityLevel = iota - // Low. - LOW_SITESECURITYLEVEL - // Medium-low. - MEDIUMLOW_SITESECURITYLEVEL - // Medium. - MEDIUM_SITESECURITYLEVEL - // Medium-high. - MEDIUMHIGH_SITESECURITYLEVEL - // High. - HIGH_SITESECURITYLEVEL + // User Defined, default value, no intent. + USERDEFINED_SITESECURITYLEVEL SiteSecurityLevel = iota + // Low. + LOW_SITESECURITYLEVEL + // Medium-low. + MEDIUMLOW_SITESECURITYLEVEL + // Medium. + MEDIUM_SITESECURITYLEVEL + // Medium-high. + MEDIUMHIGH_SITESECURITYLEVEL + // High. + HIGH_SITESECURITYLEVEL ) func (i SiteSecurityLevel) String() string { - return []string{"userDefined", "low", "mediumLow", "medium", "mediumHigh", "high"}[i] + return []string{"userDefined", "low", "mediumLow", "medium", "mediumHigh", "high"}[i] } func ParseSiteSecurityLevel(v string) (interface{}, error) { - result := USERDEFINED_SITESECURITYLEVEL - switch v { - case "userDefined": - result = USERDEFINED_SITESECURITYLEVEL - case "low": - result = LOW_SITESECURITYLEVEL - case "mediumLow": - result = MEDIUMLOW_SITESECURITYLEVEL - case "medium": - result = MEDIUM_SITESECURITYLEVEL - case "mediumHigh": - result = MEDIUMHIGH_SITESECURITYLEVEL - case "high": - result = HIGH_SITESECURITYLEVEL - default: - return 0, errors.New("Unknown SiteSecurityLevel value: " + v) - } - return &result, nil + result := USERDEFINED_SITESECURITYLEVEL + switch v { + case "userDefined": + result = USERDEFINED_SITESECURITYLEVEL + case "low": + result = LOW_SITESECURITYLEVEL + case "mediumLow": + result = MEDIUMLOW_SITESECURITYLEVEL + case "medium": + result = MEDIUM_SITESECURITYLEVEL + case "mediumHigh": + result = MEDIUMHIGH_SITESECURITYLEVEL + case "high": + result = HIGH_SITESECURITYLEVEL + default: + return 0, errors.New("Unknown SiteSecurityLevel value: " + v) + } + return &result, nil } func SerializeSiteSecurityLevel(values []SiteSecurityLevel) []string { - result := make([]string, len(values)) - for i, v := range values { - result[i] = v.String() - } - return result + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result } diff --git a/src/internal/connector/graph/betasdk/models/site_settings.go b/src/internal/connector/graph/betasdk/models/site_settings.go index a2a36d94a..1f8930408 100644 --- a/src/internal/connector/graph/betasdk/models/site_settings.go +++ b/src/internal/connector/graph/betasdk/models/site_settings.go @@ -1,123 +1,134 @@ package models import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// SiteSettings +// SiteSettings type SiteSettings struct { - // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additionalData map[string]interface{} - // The language tag for the language used on this site. - languageTag *string - // The OdataType property - odataType *string - // Indicates the time offset for the time zone of the site from Coordinated Universal Time (UTC). - timeZone *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The language tag for the language used on this site. + languageTag *string + // The OdataType property + odataType *string + // Indicates the time offset for the time zone of the site from Coordinated Universal Time (UTC). + timeZone *string } + // NewSiteSettings instantiates a new siteSettings and sets the default values. -func NewSiteSettings()(*SiteSettings) { - m := &SiteSettings{ - } - m.SetAdditionalData(make(map[string]interface{})); - return m +func NewSiteSettings() *SiteSettings { + m := &SiteSettings{} + m.SetAdditionalData(make(map[string]interface{})) + return m } + // CreateSiteSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateSiteSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewSiteSettings(), nil +func CreateSiteSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSiteSettings(), 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 *SiteSettings) GetAdditionalData()(map[string]interface{}) { - return m.additionalData +func (m *SiteSettings) GetAdditionalData() map[string]interface{} { + return m.additionalData } + // GetFieldDeserializers the deserialization information for the current model -func (m *SiteSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["languageTag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetLanguageTag(val) - } - return nil - } - res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetOdataType(val) - } - return nil - } - res["timeZone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetTimeZone(val) - } - return nil - } - return res +func (m *SiteSettings) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) + res["languageTag"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguageTag(val) + } + return nil + } + res["@odata.type"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataType(val) + } + return nil + } + res["timeZone"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTimeZone(val) + } + return nil + } + return res } + // GetLanguageTag gets the languageTag property value. The language tag for the language used on this site. -func (m *SiteSettings) GetLanguageTag()(*string) { - return m.languageTag +func (m *SiteSettings) GetLanguageTag() *string { + return m.languageTag } + // GetOdataType gets the @odata.type property value. The OdataType property -func (m *SiteSettings) GetOdataType()(*string) { - return m.odataType +func (m *SiteSettings) GetOdataType() *string { + return m.odataType } + // GetTimeZone gets the timeZone property value. Indicates the time offset for the time zone of the site from Coordinated Universal Time (UTC). -func (m *SiteSettings) GetTimeZone()(*string) { - return m.timeZone +func (m *SiteSettings) GetTimeZone() *string { + return m.timeZone } + // Serialize serializes information the current object -func (m *SiteSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteStringValue("languageTag", m.GetLanguageTag()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("@odata.type", m.GetOdataType()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("timeZone", m.GetTimeZone()) - if err != nil { - return err - } - } - { - err := writer.WriteAdditionalData(m.GetAdditionalData()) - if err != nil { - return err - } - } - return nil +func (m *SiteSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + { + err := writer.WriteStringValue("languageTag", m.GetLanguageTag()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("timeZone", m.GetTimeZone()) + 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 *SiteSettings) SetAdditionalData(value map[string]interface{})() { - m.additionalData = value +func (m *SiteSettings) SetAdditionalData(value map[string]interface{}) { + m.additionalData = value } + // SetLanguageTag sets the languageTag property value. The language tag for the language used on this site. -func (m *SiteSettings) SetLanguageTag(value *string)() { - m.languageTag = value +func (m *SiteSettings) SetLanguageTag(value *string) { + m.languageTag = value } + // SetOdataType sets the @odata.type property value. The OdataType property -func (m *SiteSettings) SetOdataType(value *string)() { - m.odataType = value +func (m *SiteSettings) SetOdataType(value *string) { + m.odataType = value } + // SetTimeZone sets the timeZone property value. Indicates the time offset for the time zone of the site from Coordinated Universal Time (UTC). -func (m *SiteSettings) SetTimeZone(value *string)() { - m.timeZone = value +func (m *SiteSettings) SetTimeZone(value *string) { + m.timeZone = value } diff --git a/src/internal/connector/graph/betasdk/models/site_settingsable.go b/src/internal/connector/graph/betasdk/models/site_settingsable.go index 0423550ea..1b3825e05 100644 --- a/src/internal/connector/graph/betasdk/models/site_settingsable.go +++ b/src/internal/connector/graph/betasdk/models/site_settingsable.go @@ -1,17 +1,17 @@ package models import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// SiteSettingsable +// SiteSettingsable type SiteSettingsable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetLanguageTag()(*string) - GetOdataType()(*string) - GetTimeZone()(*string) - SetLanguageTag(value *string)() - SetOdataType(value *string)() - SetTimeZone(value *string)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLanguageTag() *string + GetOdataType() *string + GetTimeZone() *string + SetLanguageTag(value *string) + SetOdataType(value *string) + SetTimeZone(value *string) } diff --git a/src/internal/connector/graph/betasdk/models/standard_web_part.go b/src/internal/connector/graph/betasdk/models/standard_web_part.go index 0b7b4427a..4532e1d24 100644 --- a/src/internal/connector/graph/betasdk/models/standard_web_part.go +++ b/src/internal/connector/graph/betasdk/models/standard_web_part.go @@ -1,88 +1,96 @@ package models import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// StandardWebPart +// StandardWebPart type StandardWebPart struct { - WebPart - // Data of the webPart. - data WebPartDataable - // A Guid which indicates the type of the webParts - webPartType *string + WebPart + // Data of the webPart. + data WebPartDataable + // A Guid which indicates the type of the webParts + webPartType *string } + // NewStandardWebPart instantiates a new StandardWebPart and sets the default values. -func NewStandardWebPart()(*StandardWebPart) { - m := &StandardWebPart{ - WebPart: *NewWebPart(), - } - odataTypeValue := "#microsoft.graph.standardWebPart"; - m.SetOdataType(&odataTypeValue); - return m +func NewStandardWebPart() *StandardWebPart { + m := &StandardWebPart{ + WebPart: *NewWebPart(), + } + odataTypeValue := "#microsoft.graph.standardWebPart" + m.SetOdataType(&odataTypeValue) + return m } + // CreateStandardWebPartFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateStandardWebPartFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewStandardWebPart(), nil +func CreateStandardWebPartFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStandardWebPart(), nil } + // GetData gets the data property value. Data of the webPart. -func (m *StandardWebPart) GetData()(WebPartDataable) { - return m.data +func (m *StandardWebPart) GetData() WebPartDataable { + return m.data } + // GetFieldDeserializers the deserialization information for the current model -func (m *StandardWebPart) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.WebPart.GetFieldDeserializers() - res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetObjectValue(CreateWebPartDataFromDiscriminatorValue) - if err != nil { - return err - } - if val != nil { - m.SetData(val.(WebPartDataable)) - } - return nil - } - res["webPartType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetWebPartType(val) - } - return nil - } - return res +func (m *StandardWebPart) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := m.WebPart.GetFieldDeserializers() + res["data"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWebPartDataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetData(val.(WebPartDataable)) + } + return nil + } + res["webPartType"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebPartType(val) + } + return nil + } + return res } + // GetWebPartType gets the webPartType property value. A Guid which indicates the type of the webParts -func (m *StandardWebPart) GetWebPartType()(*string) { - return m.webPartType +func (m *StandardWebPart) GetWebPartType() *string { + return m.webPartType } + // Serialize serializes information the current object -func (m *StandardWebPart) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.WebPart.Serialize(writer) - if err != nil { - return err - } - { - err = writer.WriteObjectValue("data", m.GetData()) - if err != nil { - return err - } - } - { - err = writer.WriteStringValue("webPartType", m.GetWebPartType()) - if err != nil { - return err - } - } - return nil +func (m *StandardWebPart) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + err := m.WebPart.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("data", m.GetData()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webPartType", m.GetWebPartType()) + if err != nil { + return err + } + } + return nil } + // SetData sets the data property value. Data of the webPart. -func (m *StandardWebPart) SetData(value WebPartDataable)() { - m.data = value +func (m *StandardWebPart) SetData(value WebPartDataable) { + m.data = value } + // SetWebPartType sets the webPartType property value. A Guid which indicates the type of the webParts -func (m *StandardWebPart) SetWebPartType(value *string)() { - m.webPartType = value +func (m *StandardWebPart) SetWebPartType(value *string) { + m.webPartType = value } diff --git a/src/internal/connector/graph/betasdk/models/standard_web_partable.go b/src/internal/connector/graph/betasdk/models/standard_web_partable.go index e09160b2b..b33c25f15 100644 --- a/src/internal/connector/graph/betasdk/models/standard_web_partable.go +++ b/src/internal/connector/graph/betasdk/models/standard_web_partable.go @@ -1,15 +1,15 @@ package models import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// StandardWebPartable +// StandardWebPartable type StandardWebPartable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - WebPartable - GetData()(WebPartDataable) - GetWebPartType()(*string) - SetData(value WebPartDataable)() - SetWebPartType(value *string)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + WebPartable + GetData() WebPartDataable + GetWebPartType() *string + SetData(value WebPartDataable) + SetWebPartType(value *string) } diff --git a/src/internal/connector/graph/betasdk/models/text_web_part.go b/src/internal/connector/graph/betasdk/models/text_web_part.go index f607ffa31..1ae554671 100644 --- a/src/internal/connector/graph/betasdk/models/text_web_part.go +++ b/src/internal/connector/graph/betasdk/models/text_web_part.go @@ -1,62 +1,68 @@ package models import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// TextWebPart +// TextWebPart type TextWebPart struct { - WebPart - // The HTML string in text web part. - innerHtml *string + WebPart + // The HTML string in text web part. + innerHtml *string } + // NewTextWebPart instantiates a new TextWebPart and sets the default values. -func NewTextWebPart()(*TextWebPart) { - m := &TextWebPart{ - WebPart: *NewWebPart(), - } - odataTypeValue := "#microsoft.graph.textWebPart"; - m.SetOdataType(&odataTypeValue); - return m +func NewTextWebPart() *TextWebPart { + m := &TextWebPart{ + WebPart: *NewWebPart(), + } + odataTypeValue := "#microsoft.graph.textWebPart" + m.SetOdataType(&odataTypeValue) + return m } + // CreateTextWebPartFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateTextWebPartFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewTextWebPart(), nil +func CreateTextWebPartFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTextWebPart(), nil } + // GetFieldDeserializers the deserialization information for the current model -func (m *TextWebPart) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := m.WebPart.GetFieldDeserializers() - res["innerHtml"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetInnerHtml(val) - } - return nil - } - return res +func (m *TextWebPart) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := m.WebPart.GetFieldDeserializers() + res["innerHtml"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInnerHtml(val) + } + return nil + } + return res } + // GetInnerHtml gets the innerHtml property value. The HTML string in text web part. -func (m *TextWebPart) GetInnerHtml()(*string) { - return m.innerHtml +func (m *TextWebPart) GetInnerHtml() *string { + return m.innerHtml } + // Serialize serializes information the current object -func (m *TextWebPart) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - err := m.WebPart.Serialize(writer) - if err != nil { - return err - } - { - err = writer.WriteStringValue("innerHtml", m.GetInnerHtml()) - if err != nil { - return err - } - } - return nil +func (m *TextWebPart) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + err := m.WebPart.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("innerHtml", m.GetInnerHtml()) + if err != nil { + return err + } + } + return nil } + // SetInnerHtml sets the innerHtml property value. The HTML string in text web part. -func (m *TextWebPart) SetInnerHtml(value *string)() { - m.innerHtml = value +func (m *TextWebPart) SetInnerHtml(value *string) { + m.innerHtml = value } diff --git a/src/internal/connector/graph/betasdk/models/text_web_partable.go b/src/internal/connector/graph/betasdk/models/text_web_partable.go index 45e21d92b..f58b6a0c8 100644 --- a/src/internal/connector/graph/betasdk/models/text_web_partable.go +++ b/src/internal/connector/graph/betasdk/models/text_web_partable.go @@ -1,13 +1,13 @@ package models import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// TextWebPartable +// TextWebPartable type TextWebPartable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - WebPartable - GetInnerHtml()(*string) - SetInnerHtml(value *string)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + WebPartable + GetInnerHtml() *string + SetInnerHtml(value *string) } diff --git a/src/internal/connector/graph/betasdk/models/title_area_layout_type.go b/src/internal/connector/graph/betasdk/models/title_area_layout_type.go index 375b68874..3621288a4 100644 --- a/src/internal/connector/graph/betasdk/models/title_area_layout_type.go +++ b/src/internal/connector/graph/betasdk/models/title_area_layout_type.go @@ -1,43 +1,45 @@ package models + import ( - "errors" + "errors" ) + // Provides operations to call the remove method. type TitleAreaLayoutType int const ( - IMAGEANDTITLE_TITLEAREALAYOUTTYPE TitleAreaLayoutType = iota - PLAIN_TITLEAREALAYOUTTYPE - COLORBLOCK_TITLEAREALAYOUTTYPE - OVERLAP_TITLEAREALAYOUTTYPE - UNKNOWNFUTUREVALUE_TITLEAREALAYOUTTYPE + IMAGEANDTITLE_TITLEAREALAYOUTTYPE TitleAreaLayoutType = iota + PLAIN_TITLEAREALAYOUTTYPE + COLORBLOCK_TITLEAREALAYOUTTYPE + OVERLAP_TITLEAREALAYOUTTYPE + UNKNOWNFUTUREVALUE_TITLEAREALAYOUTTYPE ) func (i TitleAreaLayoutType) String() string { - return []string{"imageAndTitle", "plain", "colorBlock", "overlap", "unknownFutureValue"}[i] + return []string{"imageAndTitle", "plain", "colorBlock", "overlap", "unknownFutureValue"}[i] } func ParseTitleAreaLayoutType(v string) (interface{}, error) { - result := IMAGEANDTITLE_TITLEAREALAYOUTTYPE - switch v { - case "imageAndTitle": - result = IMAGEANDTITLE_TITLEAREALAYOUTTYPE - case "plain": - result = PLAIN_TITLEAREALAYOUTTYPE - case "colorBlock": - result = COLORBLOCK_TITLEAREALAYOUTTYPE - case "overlap": - result = OVERLAP_TITLEAREALAYOUTTYPE - case "unknownFutureValue": - result = UNKNOWNFUTUREVALUE_TITLEAREALAYOUTTYPE - default: - return 0, errors.New("Unknown TitleAreaLayoutType value: " + v) - } - return &result, nil + result := IMAGEANDTITLE_TITLEAREALAYOUTTYPE + switch v { + case "imageAndTitle": + result = IMAGEANDTITLE_TITLEAREALAYOUTTYPE + case "plain": + result = PLAIN_TITLEAREALAYOUTTYPE + case "colorBlock": + result = COLORBLOCK_TITLEAREALAYOUTTYPE + case "overlap": + result = OVERLAP_TITLEAREALAYOUTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_TITLEAREALAYOUTTYPE + default: + return 0, errors.New("Unknown TitleAreaLayoutType value: " + v) + } + return &result, nil } func SerializeTitleAreaLayoutType(values []TitleAreaLayoutType) []string { - result := make([]string, len(values)) - for i, v := range values { - result[i] = v.String() - } - return result + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result } diff --git a/src/internal/connector/graph/betasdk/models/title_area_text_alignment_type.go b/src/internal/connector/graph/betasdk/models/title_area_text_alignment_type.go index 27b1e1dba..a34f41dbe 100644 --- a/src/internal/connector/graph/betasdk/models/title_area_text_alignment_type.go +++ b/src/internal/connector/graph/betasdk/models/title_area_text_alignment_type.go @@ -1,37 +1,39 @@ package models + import ( - "errors" + "errors" ) + // Provides operations to call the remove method. type TitleAreaTextAlignmentType int const ( - LEFT_TITLEAREATEXTALIGNMENTTYPE TitleAreaTextAlignmentType = iota - CENTER_TITLEAREATEXTALIGNMENTTYPE - UNKNOWNFUTUREVALUE_TITLEAREATEXTALIGNMENTTYPE + LEFT_TITLEAREATEXTALIGNMENTTYPE TitleAreaTextAlignmentType = iota + CENTER_TITLEAREATEXTALIGNMENTTYPE + UNKNOWNFUTUREVALUE_TITLEAREATEXTALIGNMENTTYPE ) func (i TitleAreaTextAlignmentType) String() string { - return []string{"left", "center", "unknownFutureValue"}[i] + return []string{"left", "center", "unknownFutureValue"}[i] } func ParseTitleAreaTextAlignmentType(v string) (interface{}, error) { - result := LEFT_TITLEAREATEXTALIGNMENTTYPE - switch v { - case "left": - result = LEFT_TITLEAREATEXTALIGNMENTTYPE - case "center": - result = CENTER_TITLEAREATEXTALIGNMENTTYPE - case "unknownFutureValue": - result = UNKNOWNFUTUREVALUE_TITLEAREATEXTALIGNMENTTYPE - default: - return 0, errors.New("Unknown TitleAreaTextAlignmentType value: " + v) - } - return &result, nil + result := LEFT_TITLEAREATEXTALIGNMENTTYPE + switch v { + case "left": + result = LEFT_TITLEAREATEXTALIGNMENTTYPE + case "center": + result = CENTER_TITLEAREATEXTALIGNMENTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_TITLEAREATEXTALIGNMENTTYPE + default: + return 0, errors.New("Unknown TitleAreaTextAlignmentType value: " + v) + } + return &result, nil } func SerializeTitleAreaTextAlignmentType(values []TitleAreaTextAlignmentType) []string { - result := make([]string, len(values)) - for i, v := range values { - result[i] = v.String() - } - return result + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result } diff --git a/src/internal/connector/graph/betasdk/models/web_part_position.go b/src/internal/connector/graph/betasdk/models/web_part_position.go index f2f1c3c9e..f3be0e651 100644 --- a/src/internal/connector/graph/betasdk/models/web_part_position.go +++ b/src/internal/connector/graph/betasdk/models/web_part_position.go @@ -1,175 +1,190 @@ package models import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// WebPartPosition +// WebPartPosition type WebPartPosition struct { - // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additionalData map[string]interface{} - // Indicates the identifier of the column where the web part is located. - columnId *float64 - // Indicates the horizontal section where the web part is located. - horizontalSectionId *float64 - // Indicates whether the web part is located in the vertical section. - isInVerticalSection *bool - // The OdataType property - odataType *string - // Index of the current web part. Represents the order of the web part in this column or section. - webPartIndex *float64 + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Indicates the identifier of the column where the web part is located. + columnId *float64 + // Indicates the horizontal section where the web part is located. + horizontalSectionId *float64 + // Indicates whether the web part is located in the vertical section. + isInVerticalSection *bool + // The OdataType property + odataType *string + // Index of the current web part. Represents the order of the web part in this column or section. + webPartIndex *float64 } + // NewWebPartPosition instantiates a new webPartPosition and sets the default values. -func NewWebPartPosition()(*WebPartPosition) { - m := &WebPartPosition{ - } - m.SetAdditionalData(make(map[string]interface{})); - return m +func NewWebPartPosition() *WebPartPosition { + m := &WebPartPosition{} + m.SetAdditionalData(make(map[string]interface{})) + return m } + // CreateWebPartPositionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value -func CreateWebPartPositionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { - return NewWebPartPosition(), nil +func CreateWebPartPositionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWebPartPosition(), 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 *WebPartPosition) GetAdditionalData()(map[string]interface{}) { - return m.additionalData +func (m *WebPartPosition) GetAdditionalData() map[string]interface{} { + return m.additionalData } + // GetColumnId gets the columnId property value. Indicates the identifier of the column where the web part is located. -func (m *WebPartPosition) GetColumnId()(*float64) { - return m.columnId +func (m *WebPartPosition) GetColumnId() *float64 { + return m.columnId } + // GetFieldDeserializers the deserialization information for the current model -func (m *WebPartPosition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { - res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) - res["columnId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetFloat64Value() - if err != nil { - return err - } - if val != nil { - m.SetColumnId(val) - } - return nil - } - res["horizontalSectionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetFloat64Value() - if err != nil { - return err - } - if val != nil { - m.SetHorizontalSectionId(val) - } - return nil - } - res["isInVerticalSection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetBoolValue() - if err != nil { - return err - } - if val != nil { - m.SetIsInVerticalSection(val) - } - return nil - } - res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetStringValue() - if err != nil { - return err - } - if val != nil { - m.SetOdataType(val) - } - return nil - } - res["webPartIndex"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { - val, err := n.GetFloat64Value() - if err != nil { - return err - } - if val != nil { - m.SetWebPartIndex(val) - } - return nil - } - return res +func (m *WebPartPosition) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) + res["columnId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetColumnId(val) + } + return nil + } + res["horizontalSectionId"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetHorizontalSectionId(val) + } + return nil + } + res["isInVerticalSection"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsInVerticalSection(val) + } + return nil + } + res["@odata.type"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataType(val) + } + return nil + } + res["webPartIndex"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetWebPartIndex(val) + } + return nil + } + return res } + // GetHorizontalSectionId gets the horizontalSectionId property value. Indicates the horizontal section where the web part is located. -func (m *WebPartPosition) GetHorizontalSectionId()(*float64) { - return m.horizontalSectionId +func (m *WebPartPosition) GetHorizontalSectionId() *float64 { + return m.horizontalSectionId } + // GetIsInVerticalSection gets the isInVerticalSection property value. Indicates whether the web part is located in the vertical section. -func (m *WebPartPosition) GetIsInVerticalSection()(*bool) { - return m.isInVerticalSection +func (m *WebPartPosition) GetIsInVerticalSection() *bool { + return m.isInVerticalSection } + // GetOdataType gets the @odata.type property value. The OdataType property -func (m *WebPartPosition) GetOdataType()(*string) { - return m.odataType +func (m *WebPartPosition) GetOdataType() *string { + return m.odataType } + // GetWebPartIndex gets the webPartIndex property value. Index of the current web part. Represents the order of the web part in this column or section. -func (m *WebPartPosition) GetWebPartIndex()(*float64) { - return m.webPartIndex +func (m *WebPartPosition) GetWebPartIndex() *float64 { + return m.webPartIndex } + // Serialize serializes information the current object -func (m *WebPartPosition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { - { - err := writer.WriteFloat64Value("columnId", m.GetColumnId()) - if err != nil { - return err - } - } - { - err := writer.WriteFloat64Value("horizontalSectionId", m.GetHorizontalSectionId()) - if err != nil { - return err - } - } - { - err := writer.WriteBoolValue("isInVerticalSection", m.GetIsInVerticalSection()) - if err != nil { - return err - } - } - { - err := writer.WriteStringValue("@odata.type", m.GetOdataType()) - if err != nil { - return err - } - } - { - err := writer.WriteFloat64Value("webPartIndex", m.GetWebPartIndex()) - if err != nil { - return err - } - } - { - err := writer.WriteAdditionalData(m.GetAdditionalData()) - if err != nil { - return err - } - } - return nil +func (m *WebPartPosition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { + { + err := writer.WriteFloat64Value("columnId", m.GetColumnId()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("horizontalSectionId", m.GetHorizontalSectionId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isInVerticalSection", m.GetIsInVerticalSection()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("webPartIndex", m.GetWebPartIndex()) + 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 *WebPartPosition) SetAdditionalData(value map[string]interface{})() { - m.additionalData = value +func (m *WebPartPosition) SetAdditionalData(value map[string]interface{}) { + m.additionalData = value } + // SetColumnId sets the columnId property value. Indicates the identifier of the column where the web part is located. -func (m *WebPartPosition) SetColumnId(value *float64)() { - m.columnId = value +func (m *WebPartPosition) SetColumnId(value *float64) { + m.columnId = value } + // SetHorizontalSectionId sets the horizontalSectionId property value. Indicates the horizontal section where the web part is located. -func (m *WebPartPosition) SetHorizontalSectionId(value *float64)() { - m.horizontalSectionId = value +func (m *WebPartPosition) SetHorizontalSectionId(value *float64) { + m.horizontalSectionId = value } + // SetIsInVerticalSection sets the isInVerticalSection property value. Indicates whether the web part is located in the vertical section. -func (m *WebPartPosition) SetIsInVerticalSection(value *bool)() { - m.isInVerticalSection = value +func (m *WebPartPosition) SetIsInVerticalSection(value *bool) { + m.isInVerticalSection = value } + // SetOdataType sets the @odata.type property value. The OdataType property -func (m *WebPartPosition) SetOdataType(value *string)() { - m.odataType = value +func (m *WebPartPosition) SetOdataType(value *string) { + m.odataType = value } + // SetWebPartIndex sets the webPartIndex property value. Index of the current web part. Represents the order of the web part in this column or section. -func (m *WebPartPosition) SetWebPartIndex(value *float64)() { - m.webPartIndex = value +func (m *WebPartPosition) SetWebPartIndex(value *float64) { + m.webPartIndex = value } diff --git a/src/internal/connector/graph/betasdk/models/web_part_positionable.go b/src/internal/connector/graph/betasdk/models/web_part_positionable.go index f0939db2e..9655ac285 100644 --- a/src/internal/connector/graph/betasdk/models/web_part_positionable.go +++ b/src/internal/connector/graph/betasdk/models/web_part_positionable.go @@ -1,21 +1,21 @@ package models import ( - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) -// WebPartPositionable +// WebPartPositionable type WebPartPositionable interface { - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder - i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable - GetColumnId()(*float64) - GetHorizontalSectionId()(*float64) - GetIsInVerticalSection()(*bool) - GetOdataType()(*string) - GetWebPartIndex()(*float64) - SetColumnId(value *float64)() - SetHorizontalSectionId(value *float64)() - SetIsInVerticalSection(value *bool)() - SetOdataType(value *string)() - SetWebPartIndex(value *float64)() + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColumnId() *float64 + GetHorizontalSectionId() *float64 + GetIsInVerticalSection() *bool + GetOdataType() *string + GetWebPartIndex() *float64 + SetColumnId(value *float64) + SetHorizontalSectionId(value *float64) + SetIsInVerticalSection(value *bool) + SetOdataType(value *string) + SetWebPartIndex(value *float64) }